目前的render方式过于复杂,语法晦涩难懂,复杂的单元格简直没法看。并且不能实现数据分离,我们需要持久化columns,现在这种columns中定义函数无法实现持久化。
<Table :columns="columns" :data="data">
<template #name="{ row, index }">
<Input type="text" v-model="editName" v-if="editIndex === index" />
<span v-else>{{ row.name }}</span>
</template>
<template #age="{ row, index }">
<Input type="text" v-model="editAge" v-if="editIndex === index" />
<span v-else>{{ row.age }}</span>
</template>
<Table/>
This function solves the problem (这个功能解决的问题)
目前的render方式过于复杂,语法晦涩难懂,复杂的单元格简直没法看。并且不能实现数据分离,我们需要持久化columns,现在这种columns中定义函数无法实现持久化。
希望能是实现类似于iview或者antd的语法,【不是element那种,不够灵活】
https://www.iviewui.com/view-ui-plus/component/form/table
https://antdv.com/components/table-cn
Expected API (期望的 API)