vxe-table 实现列头授权自定义插槽模板,自定义输入框
查看官网:https://vxetable.cn
gitbub:https://github.com/x-extends/vxe-table
gitee:https://gitee.com/x-extends/vxe-table
代码
通过自定义插槽模板 floatingFilter 实现,可以同时自定义弹出筛选面板和浮动筛选的自定义模板,非常灵活实现自定义组件- <template>
-
- <vxe-grid ref="gridRef" v-bind="gridOptions">
- <template #nameFilter="{ option }">
- <vxe-input v-model="option.data" clearable @change="updateNameFilterStatus(option)"></vxe-input>
- </template>
- <template #nameFloatingFilter="{ option, column }">
- <vxe-input v-model="option.data" clearable @change="changeNameFilter(option, column)"></vxe-input>
- </template>
- </vxe-grid>
-
- </template>
复制代码 https://gitee.com/x-extends/vxe-table
来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |