UNPKG

vhb-table

Version:

一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...

43 lines (39 loc) 767 B
import { createOption, destroyOption, assemOption } from './util' const props = { value: null, label: { type: [String, Number, Boolean], default: '' }, visible: { type: Boolean, default: null }, className: [String, Function], disabled: Boolean } const watch = {} Object.keys(props).forEach(name => { watch[name] = function (value) { this.optionConfig.update(name, value) } }) export default { name: 'VhbOption', props, inject: { $xeselect: { default: null }, $xeoptgroup: { default: null } }, watch, mounted () { assemOption(this) }, created () { this.optionConfig = createOption(this.$xeselect, this) }, destroyed () { destroyOption(this) }, render (h) { return h('div') } }