首页 > 解决方案 > 在 Vue.js 中添加单元格不起作用

问题描述

我对在 Vue.js 3 + Vite + VueGoodTable 中添加新字段进行了完整搜索,但它不起作用!它看起来是空的。

我使用了来自指南的代码: https ://xaksis.github.io/vue-good-table/guide/advanced/#adding-custom-columns和来自这个https://jsfiddle.net/marekfilip/jm4ywzor/

使用来自 jsfiddles 的片段,它只显示:[![在此处输入图像描述][1]][1] [1]:https://i.stack.imgur.com/S8xv4.png

对于 jsfiddle,我只更改了新的 Vue:

<script>
    import { VueGoodTable } from 'vue-good-table-next';

    export default({
        components: {
            VueGoodTable
        },

有任何想法吗?

标签: vue.jsvuejs3vitevue-good-table

解决方案


经过广泛搜索后回到 vue-good-table-next 指南并更改
<template slot="table-row" slot-scope="props">

<template #table-row="props">

有效!
我想这与 tu Vue 3 和 vue-good-table-next 的新版本有关。

抱歉,添麻烦了。


推荐阅读