57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
import $Bus from "@/utils/mittBus";
|
|
export default {
|
|
component: () => import("./index.vue"),
|
|
groupName: "扩展组件", //分组
|
|
icon: "epic-icon-dept", //图标
|
|
defaultSchema: {
|
|
label: "部门", //组件名称
|
|
type: "epic-dept-select", //组件类型
|
|
field: "epic-dept-select",
|
|
input: true,
|
|
componentProps: {
|
|
placeholder: "请选择人员"
|
|
}
|
|
},
|
|
config: {
|
|
attribute: [
|
|
{
|
|
label: "字段名",
|
|
type: "input",
|
|
field: "field"
|
|
},
|
|
{
|
|
label: "标签文字",
|
|
type: "input",
|
|
field: "label"
|
|
},
|
|
{
|
|
label: "占位内容",
|
|
type: "input",
|
|
field: "componentProps.placeholder"
|
|
},
|
|
{
|
|
label: "弹窗择值",
|
|
type: "button",
|
|
field: "componentProps.openModal",
|
|
componentProps: {
|
|
onClick: () => {
|
|
$Bus.emit("trigger-dept-select-modal");
|
|
}
|
|
}
|
|
}
|
|
]
|
|
|
|
// event: [
|
|
// {
|
|
// type: "change",
|
|
// describe: "选择值变化时"
|
|
// },
|
|
// // 添加按钮点击事件定义
|
|
// {
|
|
// type: "buttonClick", // 自定义事件名,避免冲突
|
|
// describe: "点击选择人员按钮时"
|
|
// }
|
|
// ]
|
|
}
|
|
} as any;
|