@epic-designer/antd 1.1.3 → 1.1.4-beta.1

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.
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ const vue = require('vue');
4
+ const antDesignVue = require('ant-design-vue');
5
+
6
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7
+ __name: "input-number",
8
+ setup(__props) {
9
+ return (_ctx, _cache) => {
10
+ return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.InputNumber));
11
+ };
12
+ }
13
+ });
14
+
15
+ exports.default = _sfc_main;
@@ -0,0 +1,13 @@
1
+ import { defineComponent, createBlock, openBlock, unref } from 'vue';
2
+ import { InputNumber } from 'ant-design-vue';
3
+
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "input-number",
6
+ setup(__props) {
7
+ return (_ctx, _cache) => {
8
+ return openBlock(), createBlock(unref(InputNumber));
9
+ };
10
+ }
11
+ });
12
+
13
+ export { _sfc_main as default };
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ const vue = require('vue');
4
+ const antDesignVue = require('ant-design-vue');
5
+
6
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7
+ __name: "input",
8
+ props: {
9
+ componentSchema: { type: Object, required: true },
10
+ remoteSelector: { type: Boolean, required: true, default: false }
11
+ },
12
+ setup(__props) {
13
+ const props = __props;
14
+ const eventBus = vue.inject("eventBus");
15
+ const fromData = vue.inject("fromData", {});
16
+ const handleRemoteSelector = () => {
17
+ eventBus == null ? void 0 : eventBus.emit("openRemoteSelector", props.componentSchema);
18
+ };
19
+ eventBus == null ? void 0 : eventBus.on("setRemoteSelectorData", (data) => {
20
+ console.log("setRemoteSelectorData", data);
21
+ console.log("fromData", fromData);
22
+ });
23
+ return (_ctx, _cache) => {
24
+ return vue.openBlock(), vue.createBlock(
25
+ vue.unref(antDesignVue.Input),
26
+ null,
27
+ vue.createSlots({
28
+ _: 2
29
+ /* DYNAMIC */
30
+ }, [
31
+ props.remoteSelector ? {
32
+ name: "suffix",
33
+ fn: vue.withCtx(() => [
34
+ props.remoteSelector ? (vue.openBlock(), vue.createElementBlock("span", {
35
+ key: 0,
36
+ onClick: handleRemoteSelector,
37
+ class: "iconfont icon--epic--search-rounded icon--epic"
38
+ })) : vue.createCommentVNode("v-if", true)
39
+ ]),
40
+ key: "0"
41
+ } : void 0
42
+ ]),
43
+ 1024
44
+ /* DYNAMIC_SLOTS */
45
+ );
46
+ };
47
+ }
48
+ });
49
+
50
+ exports.default = _sfc_main;
@@ -0,0 +1,48 @@
1
+ import { defineComponent, inject, createBlock, openBlock, unref, createSlots, withCtx, createElementBlock, createCommentVNode } from 'vue';
2
+ import { Input } from 'ant-design-vue';
3
+
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "input",
6
+ props: {
7
+ componentSchema: { type: Object, required: true },
8
+ remoteSelector: { type: Boolean, required: true, default: false }
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ const eventBus = inject("eventBus");
13
+ const fromData = inject("fromData", {});
14
+ const handleRemoteSelector = () => {
15
+ eventBus == null ? void 0 : eventBus.emit("openRemoteSelector", props.componentSchema);
16
+ };
17
+ eventBus == null ? void 0 : eventBus.on("setRemoteSelectorData", (data) => {
18
+ console.log("setRemoteSelectorData", data);
19
+ console.log("fromData", fromData);
20
+ });
21
+ return (_ctx, _cache) => {
22
+ return openBlock(), createBlock(
23
+ unref(Input),
24
+ null,
25
+ createSlots({
26
+ _: 2
27
+ /* DYNAMIC */
28
+ }, [
29
+ props.remoteSelector ? {
30
+ name: "suffix",
31
+ fn: withCtx(() => [
32
+ props.remoteSelector ? (openBlock(), createElementBlock("span", {
33
+ key: 0,
34
+ onClick: handleRemoteSelector,
35
+ class: "iconfont icon--epic--search-rounded icon--epic"
36
+ })) : createCommentVNode("v-if", true)
37
+ ]),
38
+ key: "0"
39
+ } : void 0
40
+ ]),
41
+ 1024
42
+ /* DYNAMIC_SLOTS */
43
+ );
44
+ };
45
+ }
46
+ });
47
+
48
+ export { _sfc_main as default };
@@ -36,7 +36,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
36
  height: "calc(100vh - 108px)",
37
37
  padding: 0
38
38
  };
39
- const getprops = vue.computed(() => {
39
+ const getProps = vue.computed(() => {
40
40
  var _a, _b;
41
41
  return {
42
42
  ...props.componentSchema,
@@ -70,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
70
70
  return (_ctx, _cache) => {
71
71
  return vue.openBlock(), vue.createBlock(
72
72
  vue.unref(antDesignVue.Modal),
73
- vue.normalizeProps(vue.guardReactiveProps(getprops.value)),
73
+ vue.normalizeProps(vue.guardReactiveProps(getProps.value)),
74
74
  {
75
75
  default: vue.withCtx(() => [
76
76
  vue.createElementVNode("div", _hoisted_1, [
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  height: "calc(100vh - 108px)",
35
35
  padding: 0
36
36
  };
37
- const getprops = computed(() => {
37
+ const getProps = computed(() => {
38
38
  var _a, _b;
39
39
  return {
40
40
  ...props.componentSchema,
@@ -68,7 +68,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
68
  return (_ctx, _cache) => {
69
69
  return openBlock(), createBlock(
70
70
  unref(Modal),
71
- normalizeProps(guardReactiveProps(getprops.value)),
71
+ normalizeProps(guardReactiveProps(getProps.value)),
72
72
  {
73
73
  default: withCtx(() => [
74
74
  createElementVNode("div", _hoisted_1, [
package/dist/index.cjs CHANGED
@@ -1204,7 +1204,7 @@ const FormItem = {
1204
1204
 
1205
1205
  const Input = {
1206
1206
  bindModel: "value",
1207
- component: async () => (await import('ant-design-vue')).Input,
1207
+ component: () => import('./chunks/input.cjs'),
1208
1208
  config: {
1209
1209
  action: [
1210
1210
  {
@@ -1374,7 +1374,7 @@ const Input = {
1374
1374
 
1375
1375
  const InputNumber = {
1376
1376
  bindModel: "value",
1377
- component: async () => (await import('ant-design-vue')).InputNumber,
1377
+ component: () => import('./chunks/input-number.cjs'),
1378
1378
  config: {
1379
1379
  action: [
1380
1380
  {
@@ -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
@@ -1202,7 +1202,7 @@ const FormItem = {
1202
1202
 
1203
1203
  const Input = {
1204
1204
  bindModel: "value",
1205
- component: async () => (await import('ant-design-vue')).Input,
1205
+ component: () => import('./chunks/input.mjs'),
1206
1206
  config: {
1207
1207
  action: [
1208
1208
  {
@@ -1372,7 +1372,7 @@ const Input = {
1372
1372
 
1373
1373
  const InputNumber = {
1374
1374
  bindModel: "value",
1375
- component: async () => (await import('ant-design-vue')).InputNumber,
1375
+ component: () => import('./chunks/input-number.mjs'),
1376
1376
  config: {
1377
1377
  action: [
1378
1378
  {
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-designer/antd",
3
- "version": "1.1.3",
3
+ "version": "1.1.4-beta.1",
4
4
  "description": "epic-designer base antd ui",
5
5
  "private": false,
6
6
  "author": "kchengz",
@@ -7,7 +7,7 @@ const emits = defineEmits<{
7
7
  'update:modelValue': any;
8
8
  }>();
9
9
  const attrs = useAttrs();
10
- const getprops = computed(() => ({
10
+ const getProps = computed(() => ({
11
11
  ...attrs,
12
12
  'onUpdate:value': handleUpdate,
13
13
  showCheckedStrategy:
@@ -20,5 +20,5 @@ function handleUpdate(e = null): void {
20
20
  }
21
21
  </script>
22
22
  <template>
23
- <Cascader v-bind="getprops" />
23
+ <Cascader v-bind="getProps" />
24
24
  </template>
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,
@@ -2,7 +2,7 @@ import type { ComponentConfigModel } from '@epic-designer/types';
2
2
 
3
3
  export default {
4
4
  bindModel: 'value',
5
- component: async () => (await import('ant-design-vue')).Input,
5
+ component: () => import('./input.vue'),
6
6
  config: {
7
7
  action: [
8
8
  {
@@ -0,0 +1,41 @@
1
+ <script lang="ts" setup>
2
+ import type { ComponentSchema } from '@epic-designer/types';
3
+
4
+ import { inject } from 'vue';
5
+
6
+ import { EventBus } from '@epic-designer/hooks';
7
+ import { Input } from 'ant-design-vue';
8
+
9
+ const props = withDefaults(
10
+ defineProps<{
11
+ componentSchema: ComponentSchema;
12
+ remoteSelector: boolean;
13
+ }>(),
14
+ {
15
+ remoteSelector: false,
16
+ },
17
+ );
18
+
19
+ const eventBus = inject<EventBus>('eventBus');
20
+ const fromData = inject<any>('fromData', {});
21
+
22
+ const handleRemoteSelector = () => {
23
+ eventBus?.emit('openRemoteSelector', props.componentSchema);
24
+ };
25
+
26
+ eventBus?.on('setRemoteSelectorData', (data: any) => {
27
+ console.log('setRemoteSelectorData', data);
28
+ console.log('fromData', fromData);
29
+ });
30
+ </script>
31
+ <template>
32
+ <Input>
33
+ <template #suffix v-if="props.remoteSelector">
34
+ <span
35
+ v-if="props.remoteSelector"
36
+ @click="handleRemoteSelector"
37
+ class="iconfont icon--epic--search-rounded icon--epic"
38
+ ></span>
39
+ </template>
40
+ </Input>
41
+ </template>
@@ -2,7 +2,7 @@ import type { ComponentConfigModel } from '@epic-designer/types';
2
2
 
3
3
  export default {
4
4
  bindModel: 'value',
5
- component: async () => (await import('ant-design-vue')).InputNumber,
5
+ component: () => import('./input-number.vue'),
6
6
  config: {
7
7
  action: [
8
8
  {
@@ -0,0 +1,6 @@
1
+ <script lang="ts" setup>
2
+ import { InputNumber } from 'ant-design-vue';
3
+ </script>
4
+ <template>
5
+ <InputNumber />
6
+ </template>
@@ -42,7 +42,7 @@ const bodyStyle = {
42
42
  padding: 0,
43
43
  };
44
44
 
45
- const getprops = computed<Record<string, any>>(() => ({
45
+ const getProps = computed<Record<string, any>>(() => ({
46
46
  ...props.componentSchema,
47
47
  ...attrs,
48
48
  bodyStyle,
@@ -74,7 +74,7 @@ function handleClose() {
74
74
  </script>
75
75
 
76
76
  <template>
77
- <Modal v-bind="getprops">
77
+ <Modal v-bind="getProps">
78
78
  <div class="epic-modal-main epic-scoped">
79
79
  <slot>
80
80
  <slot name="edit-node">