1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > ant design table列表 合并列单元格

ant design table列表 合并列单元格

时间:2022-07-12 02:01:34

相关推荐

ant design table列表 合并列单元格

配置项

columns: [{title: "序号",dataIndex: "index",align: "center",slots: {title: "customTitle" },scopedSlots: {customRender: "serialNumber" },},{title: "整体1",align: "center",customRender: (text, row, index) => {return {children: <cell modalId={text.id}></cell>,attrs: {colSpan: 2, //设置合数单元格列数},};},},{title: "整体2",align: "center",customRender: (text, row, index) => {return {attrs: {colSpan: 0,},};},},],

效果:

注意:在children自定义组件时:不要这样写children: <cell :modalId="text.id"></cell>,而是children: <cell modalId={text.id}></cell>,

报错为:

?vue&type=script&lang=js& (./node_modules/cache-loader/dist/cjs.js??ref–12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/questionnairement/questionnaire.vue?vue&type=script&lang=js&)

Module build failed (from ./node_modules/babel-loader/lib/index.js):

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。