@epic-designer/antd 1.1.4-beta.0 → 1.1.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/input.cjs +12 -2
- package/dist/chunks/input.mjs +12 -2
- package/dist/index.cjs +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
- package/src/index.ts +5 -0
- package/src/input/input.vue +15 -2
package/dist/chunks/input.cjs
CHANGED
|
@@ -7,14 +7,24 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7
7
|
__name: "input",
|
|
8
8
|
props: {
|
|
9
9
|
componentSchema: { type: Object, required: true },
|
|
10
|
-
|
|
10
|
+
options: { type: Array, required: false, default: () => [] },
|
|
11
|
+
remoteSelector: { type: Boolean, required: false, default: false }
|
|
11
12
|
},
|
|
12
13
|
setup(__props) {
|
|
13
14
|
const props = __props;
|
|
14
15
|
const eventBus = vue.inject("eventBus");
|
|
16
|
+
const fromData = vue.inject("fromData", {});
|
|
15
17
|
const handleRemoteSelector = () => {
|
|
16
|
-
eventBus == null ? void 0 : eventBus.emit("openRemoteSelector", props.componentSchema);
|
|
18
|
+
eventBus == null ? void 0 : eventBus.emit("openRemoteSelector", props.componentSchema, props.options);
|
|
17
19
|
};
|
|
20
|
+
eventBus == null ? void 0 : eventBus.on("setRemoteSelectorData", (data) => {
|
|
21
|
+
if (data.nodeId !== props.componentSchema.id) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
console.log("setRemoteSelectorData", data.record);
|
|
25
|
+
console.log("fromData", fromData);
|
|
26
|
+
fromData[props.componentSchema.field] = data.record.value;
|
|
27
|
+
});
|
|
18
28
|
return (_ctx, _cache) => {
|
|
19
29
|
return vue.openBlock(), vue.createBlock(
|
|
20
30
|
vue.unref(antDesignVue.Input),
|
package/dist/chunks/input.mjs
CHANGED
|
@@ -5,14 +5,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5
5
|
__name: "input",
|
|
6
6
|
props: {
|
|
7
7
|
componentSchema: { type: Object, required: true },
|
|
8
|
-
|
|
8
|
+
options: { type: Array, required: false, default: () => [] },
|
|
9
|
+
remoteSelector: { type: Boolean, required: false, default: false }
|
|
9
10
|
},
|
|
10
11
|
setup(__props) {
|
|
11
12
|
const props = __props;
|
|
12
13
|
const eventBus = inject("eventBus");
|
|
14
|
+
const fromData = inject("fromData", {});
|
|
13
15
|
const handleRemoteSelector = () => {
|
|
14
|
-
eventBus == null ? void 0 : eventBus.emit("openRemoteSelector", props.componentSchema);
|
|
16
|
+
eventBus == null ? void 0 : eventBus.emit("openRemoteSelector", props.componentSchema, props.options);
|
|
15
17
|
};
|
|
18
|
+
eventBus == null ? void 0 : eventBus.on("setRemoteSelectorData", (data) => {
|
|
19
|
+
if (data.nodeId !== props.componentSchema.id) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
console.log("setRemoteSelectorData", data.record);
|
|
23
|
+
console.log("fromData", fromData);
|
|
24
|
+
fromData[props.componentSchema.field] = data.record.value;
|
|
25
|
+
});
|
|
16
26
|
return (_ctx, _cache) => {
|
|
17
27
|
return openBlock(), createBlock(
|
|
18
28
|
unref(Input),
|
package/dist/index.cjs
CHANGED
|
@@ -3005,6 +3005,10 @@ function setupAntd(pluginManager = epicDesigner.pluginManager) {
|
|
|
3005
3005
|
"CollapseItem",
|
|
3006
3006
|
async () => (await import('ant-design-vue')).CollapsePanel
|
|
3007
3007
|
);
|
|
3008
|
+
pluginManager.component.add(
|
|
3009
|
+
"epTable",
|
|
3010
|
+
async () => (await import('ant-design-vue')).Table
|
|
3011
|
+
);
|
|
3008
3012
|
const componentArray = [
|
|
3009
3013
|
Form,
|
|
3010
3014
|
FormItem,
|
package/dist/index.mjs
CHANGED
|
@@ -3003,6 +3003,10 @@ function setupAntd(pluginManager$1 = pluginManager) {
|
|
|
3003
3003
|
"CollapseItem",
|
|
3004
3004
|
async () => (await import('ant-design-vue')).CollapsePanel
|
|
3005
3005
|
);
|
|
3006
|
+
pluginManager$1.component.add(
|
|
3007
|
+
"epTable",
|
|
3008
|
+
async () => (await import('ant-design-vue')).Table
|
|
3009
|
+
);
|
|
3006
3010
|
const componentArray = [
|
|
3007
3011
|
Form,
|
|
3008
3012
|
FormItem,
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -76,6 +76,11 @@ export function setupAntd(pluginManager: PluginManager = pManager): void {
|
|
|
76
76
|
async () => (await import('ant-design-vue')).CollapsePanel,
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
+
pluginManager.component.add(
|
|
80
|
+
'epTable',
|
|
81
|
+
async () => (await import('ant-design-vue')).Table,
|
|
82
|
+
);
|
|
83
|
+
|
|
79
84
|
const componentArray = [
|
|
80
85
|
Form,
|
|
81
86
|
FormItem,
|
package/src/input/input.vue
CHANGED
|
@@ -9,18 +9,31 @@ import { Input } from 'ant-design-vue';
|
|
|
9
9
|
const props = withDefaults(
|
|
10
10
|
defineProps<{
|
|
11
11
|
componentSchema: ComponentSchema;
|
|
12
|
-
|
|
12
|
+
options?: any[];
|
|
13
|
+
remoteSelector?: boolean;
|
|
13
14
|
}>(),
|
|
14
15
|
{
|
|
16
|
+
options: () => [],
|
|
15
17
|
remoteSelector: false,
|
|
16
18
|
},
|
|
17
19
|
);
|
|
18
20
|
|
|
19
21
|
const eventBus = inject<EventBus>('eventBus');
|
|
22
|
+
const fromData = inject<any>('fromData', {});
|
|
20
23
|
|
|
21
24
|
const handleRemoteSelector = () => {
|
|
22
|
-
eventBus?.emit('openRemoteSelector', props.componentSchema);
|
|
25
|
+
eventBus?.emit('openRemoteSelector', props.componentSchema, props.options);
|
|
23
26
|
};
|
|
27
|
+
|
|
28
|
+
eventBus?.on('setRemoteSelectorData', (data: any) => {
|
|
29
|
+
// 检查是否是当前组件的返回数据,如果不是则不处理
|
|
30
|
+
if (data.nodeId !== props.componentSchema.id) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
console.log('setRemoteSelectorData', data.record);
|
|
34
|
+
console.log('fromData', fromData);
|
|
35
|
+
fromData[props.componentSchema.field!] = data.record.value;
|
|
36
|
+
});
|
|
24
37
|
</script>
|
|
25
38
|
<template>
|
|
26
39
|
<Input>
|