iview table 表格左侧单选栏

 columns1: [
                    {
                        type: 'selection',
                        width: 60,
                        align: 'center'
                    },
                    {
                        key: 'id',
                        width: 60,
                        align: 'center',
                        render: (h, params) => {
                            return h('Radio', {
                                props: {
                                    value: this.currentChoose == params.row.id
                                },
                                on: {
                                    'on-change': () => {
                                        this.currentChoose = params.row.id;
                                        let data = [params.row];
                                        this.tableChange(data);
                                    }
                                }
                            })
                        }
                    },
                    {
                        title: 'Name',
                        key: 'label'
                    }
                ],
发布了39 篇原创文章 · 获赞 2 · 访问量 4053

猜你喜欢

转载自blog.csdn.net/qq_43137725/article/details/103372831