天天看点

vue 非template模式_【Vue】iview 非 template/render 模式 Modal失效

添加

域名

域名

var vm = new Vue({

el: "#app",

data() {

let self = this;

return {

addModal: true,

editModal: false,

addVal: '',

col: [

{

title: "ID",

key: "id"

},

{

title: "域名",

key: "domain"

},

{

title: "操作",

key: "action",

align: "center",

render: (h, params) => {

return h('div', [

h('Button', {

props: {

type: 'primary',

size: 'small'

},

style: {

marginRight: '5px'

},

on: {

click: () => {

self.edit(params.index)

}

}

}, '编辑'),

h('Button', {

props: {

type: 'error',

size: 'small'

},

on: {

click: () => {

console.log(params);

self.del(params.index)

}

}

}, '删除')

]);

}

}

],

list: [],

editInfo: {},

page: {

total: 0,

pageSize: 0

}

}

},

created: function () {

this.getList();

},

methods: {

getList(page) {

//dosoming

},

add() {

var self = this;

self.addModal = true;

},

}

回答

哪个失效,没描述清楚,而且事件名没对应上还是什么

我也遇到这个问题了 == 请问一下楼主是最后是怎么处理的