IVIEW 的 Render



1 render: (h, params) => { 2 let isconfirm = params.row.isconfirm; 3 if (!isconfirm) { 4 return h('span', { 5 style: { 6 color: 'red' 7 } 8 }, "暂存"); 9 } else { 10 return h('span', "生效"); 11 } 12 }

2、新增/编辑/删除/

render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    on: {
                                        click: () => {
                                            this.handleEdit(params.row)
                                        }
                                    },
                                    props: {
                                        type: 'primary',
                                        size: 'small'
                                    },
                                    style: {
                                        marginRight: '5px'
                                    },
                                }, '编辑'),
                                h('Button', {
                                    on: {
                                        click: () => {
                                            this.modalDel = true,
                                                this.params = params
                                        }
                                    },
                                    props: {
                                        type: 'error',
                                        size: 'small'
                                    },
                                }, '删除')
                            ]); //end return
                        }

 

上一篇:uni-app小程序request请求封装


下一篇:实战:Windows Server 2008 RMS使用权限策略模板保护文档