您现在的位置是:主页 > news > 大学生文创产品设计方案/北京seo分析
大学生文创产品设计方案/北京seo分析
admin2025/6/22 22:26:59【news】
简介大学生文创产品设计方案,北京seo分析,网站建设结算方式,江苏省建设培训网站name:‘demo‘,/*// 说明:我在写这个demo的时候发现 render 函数中 使用指令时 使用局部指令 没有效果,使用全家指令有效果//使用指令操作 domdirectives: {focus: {// 指令的定义bind: function(el, bind){console.dir(el);console.log(el, bind, ‘bin…
name:‘demo‘,/*// 说明:我在写这个demo的时候发现 render 函数中 使用指令时 使用局部指令 没有效果,使用全家指令有效果
//使用指令操作 dom
directives: {
focus: {
// 指令的定义
bind: function(el, bind){
console.dir(el);
console.log(el, bind, ‘bind‘);
},
inserted: function (el, bind) {
//el.focus()
console.dir(el);
console.log(el, bind, ‘dom元素‘);
}
}
},*/data () {return{
columns1: [
{
title:‘Name‘,
key:‘name‘,//align: ‘center‘,
render: (h, params)=>{return h(‘div‘, {
style: {
color:‘green‘,
textAlign:‘center‘,
},//自定义指令。注意,你无法对 `binding` 中的 `oldValue`
//赋值,因为 Vue 已经自动为你进行了同步。
directives: [
{
name:‘cell‘,
arg:‘colSpan‘,
value:2,//value: ‘2‘
//expression: ‘1 + 1‘,
//modifiers: {
//bar: true
//}
},{
name:‘rmcell‘,
arg:‘colSpan‘,
value:2,
}
],
}, params.row.name);
}
},
{
title:‘演示合并列‘,
key:‘‘},
{
title:‘Age‘,
key:‘age‘},
{
title:‘Address‘,
key:‘address‘},
{
title:‘爱好‘,
key:‘hobby‘,
className:‘no-hover‘, //加在 td 上
render: (h, params)=>{
let dir= null;//第一个tr 元素 中的 td 合并,其他tr 多出的 td删除
if(params.index === 0){
dir=[
{
name:‘cell‘,
arg:‘rowSpan‘,
value:this.data1.length,//value: ‘2‘
//expression: ‘1 + 1‘,
//modifiers: {
//bar: true
//}
}
];
}else{
dir=[
{
name:‘rmcell‘,//arg: ‘‘,
//value: ‘‘,
//value: ‘2‘
//expression: ‘1 + 1‘,
//modifiers: {
//bar: true
//}
}
];
}return h(‘span‘, {
style: {
color:‘red‘},//自定义指令。注意,你无法对 `binding` 中的 `oldValue`
//赋值,因为 Vue 已经自动为你进行了同步。
directives: dir,
}, params.row.hobby);
}
},
],
data1: [
{
name:‘John Brown‘,
age:18,
address:‘New York No. 1 Lake Park‘,
date:‘2016-10-03‘,
hobby:‘编码‘,
},
{
name:‘Jim Green‘,
age:24,
address:‘London No. 1 Lake Park‘,
date:‘2016-10-01‘,
hobby:‘编码‘,
},
{
name:‘Joe Black‘,
age:30,
address:‘Sydney No. 1 Lake Park‘,
date:‘2016-10-02‘,
hobby:‘编码‘,
},
{
name:‘Jon Snow‘,
age:26,
address:‘Ottawa No. 2 Lake Park‘,
date:‘2016-10-04‘,
hobby:‘编码‘,
}
]
}
},
}
background: #fff;
}