snowy-designer
Version:
基于Epic-Designer-Pro版本的设计器,可视化开发页面表单
214 lines (213 loc) • 4.86 kB
JavaScript
const o = {
component: async () => (await import("element-plus")).ElCascader,
config: {
action: [
{
description: "获取当前选中节点",
type: "getCheckedNodes"
},
{
description: "切换 popper 可见状态",
type: "togglePopperVisible"
}
],
attribute: [
{
field: "field",
label: "字段名",
type: "EpField"
},
{
field: "label",
label: "标题",
type: "input"
},
{
field: "componentProps.defaultValue",
label: "默认值",
type: "cascader"
},
{
field: "componentProps.placeholder",
label: "占位内容",
type: "input"
},
{
componentProps: {
clearable: !0,
options: [
{
label: "大号",
value: "large"
},
{
label: "中等",
value: "default"
},
{
label: "小型",
value: "small"
}
],
placeholder: "请选择"
},
field: "componentProps.size",
label: "尺寸",
type: "select"
},
{
componentProps: {
placeholder: "请输入"
},
field: "componentProps.separator",
label: "分割符",
type: "input"
},
{
componentProps: {
clearable: !0,
options: [
{
label: "click",
value: "click"
},
{
label: "hover",
value: "hover"
}
],
placeholder: "请选择"
},
field: "componentProps.props.expandTrigger",
label: "次级菜单展开方式",
type: "select"
},
{
field: "componentProps.filterable",
label: "可搜索",
type: "switch"
},
{
field: "componentProps.props.multiple",
label: "可多选",
onChange: ({ value: e, values: l }) => {
l.componentProps.defaultValue = e ? [] : null;
},
type: "switch"
},
{
field: "componentProps.collapseTags",
label: "折叠Tag",
show: ({ values: e }) => e.componentProps.props.multiple,
type: "switch"
},
{
field: "componentProps.collapseTagsTooltip",
label: "显示被折叠标签",
show: ({ values: e }) => e.componentProps.props.multiple && e.componentProps.collapseTags,
type: "switch"
},
{
componentProps: {
activeValue: !1,
inactiveValue: !0
},
field: "componentProps.showAllLevels",
label: "不显示路径",
type: "switch"
},
{
description: "父子节点不互相关联",
field: "componentProps.props.checkStrictly",
label: "父级可选",
type: "switch"
},
{
componentProps: {
activeValue: !1,
inactiveValue: !0
},
field: "componentProps.props.emitPath",
label: "只获取选中节点",
type: "switch"
},
{
field: "componentProps.clearable",
label: "可清空",
type: "switch"
},
{
field: "componentProps.disabled",
label: "禁用",
type: "switch"
},
{
field: "componentProps.hidden",
label: "隐藏",
type: "switch"
},
{
componentProps: {
tree: !0
},
description: "配置选项",
field: "componentProps.options",
label: "选项管理",
layout: "vertical",
type: "EOptionsEditor"
},
{
componentProps: {
ruleType: "array"
},
description: "校验规则需要配合表单使用",
field: "rules",
label: "表单校验",
layout: "vertical",
type: "ERuleEditor"
}
],
event: [
{
description: "选中节点变化时",
type: "change"
},
{
description: " 当失去焦点时触发",
type: "blur"
},
{
description: "当获得焦点时触发",
type: "focus"
}
]
},
defaultSchema: {
componentProps: {
options: [
{
label: "选项1",
value: "选项1"
},
{
label: "选项2",
value: "选项2"
}
],
placeholder: "请选择",
props: {
expandTrigger: "click"
}
},
field: "cascader",
input: !0,
label: "级联选择器",
type: "cascader"
},
groupName: "表单",
icon: "icon--epic--full-coverage-outline",
sort: 900
};
export {
o as default
};