vue使用render函数创建具名插槽:

let table = h('table', {
    style: {}
    props: {}
    scopedSlots: {
        // 插槽名
        slotDemoName: (scope) => {
            return h('button', {
                props: {},
                on: {
                    click: () => {
                        deleteRowData(scope.$index);
                    }
                }
            }, '删除');
        }
    }
});

 

"正是因为得不到,所以才显得格外珍惜。"

相关文章:

  • 2023-03-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2021-10-29
  • 2022-12-23
相关资源
相似解决方案