form-tdesigner
Version:
好用的Vue低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
39 lines (36 loc) • 1.1 kB
JavaScript
import {localeOptions, localeProps} from '../../utils';
const label = '标签页';
const name = 'tTabs';
export default {
menu: 'layout',
icon: 'icon-tab',
label,
name,
mask: false,
event: ['tabClick', 'tabChange', 'tabRemove', 'tabAdd', 'edit'],
children: 'tTabPanel',
rule() {
return {
type: 't-tabs',
style: {width: '100%'},
children: []
};
},
props(_, {t}) {
return localeProps(t, name + '.props', [{
type: 'select',
field: 'type',
options: [{
label: 'card',
value: 'card'
}, {label: 'border-card', value: 'border-card'}]
}, {type: 'switch', field: 'closable'}, {
type: 'select',
field: 'tabPosition',
options: localeOptions(t, [{label: 'top', value: 'top'}, {label: 'right', value: 'right'}, {
label: 'left',
value: 'left'
}])
}, {type: 'switch', field: 'stretch'}]);
}
};