UNPKG

@zzdadelu/schema-builder

Version:

通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成

54 lines (53 loc) 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _utils = require("../utils"); var _default = exports.default = (0, _utils.createMeta)('Switch', { title: '开关', priority: 993, props: [{ title: '基础配置', type: 'group', display: 'accordion', items: (0, _utils.getNotInputPropsBasic)({ name: 'defaultValue', title: { label: '默认值', tip: 'defaultValue | 默认值' }, setter: 'BoolSetter' }) }, { title: '其他配置', display: 'accordion', type: 'group', items: [{ name: 'props.checkedChildren', title: { label: '选中时内容', tip: 'checkedChildren | 选中时内容' }, setter: 'StringSetter' }, { name: 'props.unCheckedChildren', title: { label: '非选中时内容', tip: 'unCheckedChildren | 非选中时内容' }, setter: 'StringSetter' }] }], snippets: [{ label: '开关', screenshot: 'icon-switch', schema: { componentName: 'Switch', props: { title: '开关', type: 'boolean' } } }] });