@epic-designer/antd 1.1.0 → 1.1.2-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.
Files changed (45) hide show
  1. package/dist/chunks/button.cjs +1 -1
  2. package/dist/chunks/button.mjs +1 -1
  3. package/dist/chunks/form.cjs +5 -5
  4. package/dist/chunks/form.mjs +5 -5
  5. package/dist/chunks/modal.cjs +2 -2
  6. package/dist/chunks/modal.mjs +2 -2
  7. package/dist/chunks/tabPane.cjs +42 -0
  8. package/dist/chunks/tabPane.mjs +40 -0
  9. package/dist/chunks/tabs.cjs +65 -0
  10. package/dist/chunks/tabs.mjs +63 -0
  11. package/dist/chunks/uploadImage.cjs +1 -1
  12. package/dist/chunks/uploadImage.mjs +1 -1
  13. package/dist/index.cjs +679 -706
  14. package/dist/index.mjs +679 -706
  15. package/package.json +1 -2
  16. package/src/button/button.vue +1 -1
  17. package/src/button/index.ts +25 -25
  18. package/src/card/index.ts +9 -9
  19. package/src/cascader/cascader.vue +2 -2
  20. package/src/cascader/index.ts +41 -41
  21. package/src/checkbox/index.ts +16 -16
  22. package/src/col/index.ts +6 -3
  23. package/src/color-picker/index.ts +16 -16
  24. package/src/date-picker/index.ts +79 -79
  25. package/src/form/form.vue +5 -5
  26. package/src/form/index.ts +34 -34
  27. package/src/index.ts +7 -15
  28. package/src/input/index.ts +25 -25
  29. package/src/input-number/index.ts +36 -36
  30. package/src/modal/modal.vue +2 -2
  31. package/src/radio/index.ts +16 -16
  32. package/src/row/index.ts +18 -15
  33. package/src/select/index.ts +37 -38
  34. package/src/slider/index.ts +28 -28
  35. package/src/switch/index.ts +38 -38
  36. package/src/tab-pane/index.ts +22 -0
  37. package/src/tab-pane/tabPane.ts +43 -0
  38. package/src/tabs/index.ts +107 -0
  39. package/src/tabs/tabs.ts +69 -0
  40. package/src/textarea/index.ts +28 -28
  41. package/src/time-picker/index.ts +42 -42
  42. package/src/upload-file/index.ts +18 -18
  43. package/src/upload-image/index.ts +15 -15
  44. package/src/upload-image/uploadImage.vue +1 -1
  45. package/src/input-password/index.ts +0 -154
@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
17
  var _a;
18
18
  return vue.openBlock(), vue.createBlock(
19
19
  vue.unref(antDesignVue.Button),
20
- vue.normalizeProps(vue.guardReactiveProps((_a = props.componentSchema) == null ? void 0 : _a.componentProps)),
20
+ vue.normalizeProps(vue.guardReactiveProps((_a = props.componentSchema) == null ? void 0 : _a.props)),
21
21
  {
22
22
  default: vue.withCtx(() => [
23
23
  vue.renderSlot(_ctx.$slots, "default", {}, () => {
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  var _a;
16
16
  return openBlock(), createBlock(
17
17
  unref(Button),
18
- normalizeProps(guardReactiveProps((_a = props.componentSchema) == null ? void 0 : _a.componentProps)),
18
+ normalizeProps(guardReactiveProps((_a = props.componentSchema) == null ? void 0 : _a.props)),
19
19
  {
20
20
  default: withCtx(() => [
21
21
  renderSlot(_ctx.$slots, "default", {}, () => {
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
20
  const forms = vue.inject("forms", {});
21
21
  const formData = pageManager.setFormData(
22
22
  {},
23
- (_b = (_a = props.componentSchema) == null ? void 0 : _a.componentProps) == null ? void 0 : _b.name
23
+ (_b = (_a = props.componentSchema) == null ? void 0 : _a.props) == null ? void 0 : _b.name
24
24
  );
25
25
  vue.provide("formData", formData);
26
26
  function getData() {
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
44
44
  var _a2, _b2, _c, _d, _e, _f, _g;
45
45
  form.value = (_a2 = vNode.component) == null ? void 0 : _a2.exposed;
46
46
  if (((_b2 = props.componentSchema) == null ? void 0 : _b2.type) === "form" && forms.value && form.value) {
47
- const name = (_g = (_f = (_d = (_c = props.componentSchema) == null ? void 0 : _c.componentProps) == null ? void 0 : _d.name) != null ? _f : (_e = props.componentSchema) == null ? void 0 : _e.name) != null ? _g : "default";
47
+ const name = (_g = (_f = (_d = (_c = props.componentSchema) == null ? void 0 : _c.props) == null ? void 0 : _d.name) != null ? _f : (_e = props.componentSchema) == null ? void 0 : _e.name) != null ? _g : "default";
48
48
  form.value.validate = validate;
49
49
  forms.value[name] = form.value;
50
50
  form.value.getData = getData;
@@ -52,8 +52,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
52
52
  return false;
53
53
  }
54
54
  };
55
- const componentProps = vue.computed(() => {
56
- const recordProps = props.componentSchema.componentProps;
55
+ const formProps = vue.computed(() => {
56
+ const recordProps = props.componentSchema.props;
57
57
  let labelCol = recordProps.labelCol;
58
58
  let wrapperCol = recordProps.wrapperCol;
59
59
  if (recordProps.layout === "vertical") {
@@ -86,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
86
86
  validate
87
87
  });
88
88
  return (_ctx, _cache) => {
89
- return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Form), vue.mergeProps({ model: vue.unref(formData) }, componentProps.value, {
89
+ return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Form), vue.mergeProps({ model: vue.unref(formData) }, formProps.value, {
90
90
  onFinish,
91
91
  onVnodeMounted: mountedForm
92
92
  }), {
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const forms = inject("forms", {});
19
19
  const formData = pageManager.setFormData(
20
20
  {},
21
- (_b = (_a = props.componentSchema) == null ? void 0 : _a.componentProps) == null ? void 0 : _b.name
21
+ (_b = (_a = props.componentSchema) == null ? void 0 : _a.props) == null ? void 0 : _b.name
22
22
  );
23
23
  provide("formData", formData);
24
24
  function getData() {
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  var _a2, _b2, _c, _d, _e, _f, _g;
43
43
  form.value = (_a2 = vNode.component) == null ? void 0 : _a2.exposed;
44
44
  if (((_b2 = props.componentSchema) == null ? void 0 : _b2.type) === "form" && forms.value && form.value) {
45
- const name = (_g = (_f = (_d = (_c = props.componentSchema) == null ? void 0 : _c.componentProps) == null ? void 0 : _d.name) != null ? _f : (_e = props.componentSchema) == null ? void 0 : _e.name) != null ? _g : "default";
45
+ const name = (_g = (_f = (_d = (_c = props.componentSchema) == null ? void 0 : _c.props) == null ? void 0 : _d.name) != null ? _f : (_e = props.componentSchema) == null ? void 0 : _e.name) != null ? _g : "default";
46
46
  form.value.validate = validate;
47
47
  forms.value[name] = form.value;
48
48
  form.value.getData = getData;
@@ -50,8 +50,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
50
  return false;
51
51
  }
52
52
  };
53
- const componentProps = computed(() => {
54
- const recordProps = props.componentSchema.componentProps;
53
+ const formProps = computed(() => {
54
+ const recordProps = props.componentSchema.props;
55
55
  let labelCol = recordProps.labelCol;
56
56
  let wrapperCol = recordProps.wrapperCol;
57
57
  if (recordProps.layout === "vertical") {
@@ -84,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
84
84
  validate
85
85
  });
86
86
  return (_ctx, _cache) => {
87
- return openBlock(), createBlock(unref(Form), mergeProps({ model: unref(formData) }, componentProps.value, {
87
+ return openBlock(), createBlock(unref(Form), mergeProps({ model: unref(formData) }, formProps.value, {
88
88
  onFinish,
89
89
  onVnodeMounted: mountedForm
90
90
  }), {
@@ -36,7 +36,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
36
36
  height: "calc(100vh - 108px)",
37
37
  padding: 0
38
38
  };
39
- const getComponentProps = 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(getComponentProps.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 getComponentProps = 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(getComponentProps.value)),
71
+ normalizeProps(guardReactiveProps(getprops.value)),
72
72
  {
73
73
  default: withCtx(() => [
74
74
  createElementVNode("div", _hoisted_1, [
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ const vue = require('vue');
4
+ const antDesignVue = require('ant-design-vue');
5
+
6
+ const tabPane = vue.defineComponent({
7
+ props: {
8
+ componentSchema: {
9
+ default: () => ({}),
10
+ require: true,
11
+ type: Object
12
+ }
13
+ },
14
+ setup(props, { slots }) {
15
+ const nodeAttrs = vue.inject("nodeAttrs", {});
16
+ return () => {
17
+ var _a;
18
+ const componentSchema = {
19
+ ...props.componentSchema,
20
+ ...(_a = props.componentSchema) == null ? void 0 : _a.props
21
+ };
22
+ const children = componentSchema.children;
23
+ delete componentSchema.children;
24
+ return vue.h(
25
+ antDesignVue.TabPane,
26
+ { componentSchema, ...nodeAttrs },
27
+ {
28
+ default: () => vue.renderSlot(
29
+ slots,
30
+ "edit-node",
31
+ {},
32
+ () => children.map(
33
+ (componentSchema2) => vue.renderSlot(slots, "node", { componentSchema: componentSchema2 })
34
+ )
35
+ )
36
+ }
37
+ );
38
+ };
39
+ }
40
+ });
41
+
42
+ exports.default = tabPane;
@@ -0,0 +1,40 @@
1
+ import { defineComponent, inject, h, renderSlot } from 'vue';
2
+ import { TabPane } from 'ant-design-vue';
3
+
4
+ const tabPane = defineComponent({
5
+ props: {
6
+ componentSchema: {
7
+ default: () => ({}),
8
+ require: true,
9
+ type: Object
10
+ }
11
+ },
12
+ setup(props, { slots }) {
13
+ const nodeAttrs = inject("nodeAttrs", {});
14
+ return () => {
15
+ var _a;
16
+ const componentSchema = {
17
+ ...props.componentSchema,
18
+ ...(_a = props.componentSchema) == null ? void 0 : _a.props
19
+ };
20
+ const children = componentSchema.children;
21
+ delete componentSchema.children;
22
+ return h(
23
+ TabPane,
24
+ { componentSchema, ...nodeAttrs },
25
+ {
26
+ default: () => renderSlot(
27
+ slots,
28
+ "edit-node",
29
+ {},
30
+ () => children.map(
31
+ (componentSchema2) => renderSlot(slots, "node", { componentSchema: componentSchema2 })
32
+ )
33
+ )
34
+ }
35
+ );
36
+ };
37
+ }
38
+ });
39
+
40
+ export { tabPane as default };
@@ -0,0 +1,65 @@
1
+ 'use strict';
2
+
3
+ const vue = require('vue');
4
+ const antDesignVue = require('ant-design-vue');
5
+
6
+ const tabs = vue.defineComponent({
7
+ props: {
8
+ componentSchema: {
9
+ default: () => ({}),
10
+ require: true,
11
+ type: Object
12
+ }
13
+ },
14
+ setup(props, { slots }) {
15
+ var _a, _b;
16
+ const modelValue = vue.ref();
17
+ vue.watch(
18
+ () => props.componentSchema.props.defaultValue,
19
+ (newValue) => {
20
+ var _a2;
21
+ const tabPaneLabels = (_a2 = props.componentSchema.children) == null ? void 0 : _a2.map(
22
+ (node) => node.label
23
+ );
24
+ modelValue.value = (tabPaneLabels == null ? void 0 : tabPaneLabels.includes(newValue)) ? newValue : tabPaneLabels == null ? void 0 : tabPaneLabels[0];
25
+ },
26
+ {
27
+ immediate: true
28
+ }
29
+ );
30
+ const componentSchema = vue.computed(() => {
31
+ var _a2;
32
+ return {
33
+ ...(_a2 = props.componentSchema) == null ? void 0 : _a2.props,
34
+ activeKey: modelValue.value,
35
+ "onUpdate:activeKey": (e) => {
36
+ modelValue.value = e;
37
+ }
38
+ };
39
+ });
40
+ const children = (_b = (_a = props.componentSchema) == null ? void 0 : _a.children) != null ? _b : [];
41
+ return () => vue.h(antDesignVue.Tabs, componentSchema.value, {
42
+ default: () => {
43
+ var _a2, _b2;
44
+ const defaultSlotList = (_a2 = slots["edit-node"]) == null ? void 0 : _a2.call(slots)[0].children;
45
+ if (defaultSlotList == null ? void 0 : defaultSlotList.length) {
46
+ const list = (_b2 = defaultSlotList[0].children) == null ? void 0 : _b2.map((item) => {
47
+ item.props.key = item.props.schema.label;
48
+ item.props.tab = item.props.schema.label;
49
+ return item;
50
+ });
51
+ return list;
52
+ }
53
+ return children.map(
54
+ (componentSchema2) => vue.renderSlot(slots, "node", {
55
+ componentSchema: componentSchema2,
56
+ key: componentSchema2.label,
57
+ tab: componentSchema2.label
58
+ })
59
+ );
60
+ }
61
+ });
62
+ }
63
+ });
64
+
65
+ exports.default = tabs;
@@ -0,0 +1,63 @@
1
+ import { defineComponent, ref, watch, computed, h, renderSlot } from 'vue';
2
+ import { Tabs } from 'ant-design-vue';
3
+
4
+ const tabs = defineComponent({
5
+ props: {
6
+ componentSchema: {
7
+ default: () => ({}),
8
+ require: true,
9
+ type: Object
10
+ }
11
+ },
12
+ setup(props, { slots }) {
13
+ var _a, _b;
14
+ const modelValue = ref();
15
+ watch(
16
+ () => props.componentSchema.props.defaultValue,
17
+ (newValue) => {
18
+ var _a2;
19
+ const tabPaneLabels = (_a2 = props.componentSchema.children) == null ? void 0 : _a2.map(
20
+ (node) => node.label
21
+ );
22
+ modelValue.value = (tabPaneLabels == null ? void 0 : tabPaneLabels.includes(newValue)) ? newValue : tabPaneLabels == null ? void 0 : tabPaneLabels[0];
23
+ },
24
+ {
25
+ immediate: true
26
+ }
27
+ );
28
+ const componentSchema = computed(() => {
29
+ var _a2;
30
+ return {
31
+ ...(_a2 = props.componentSchema) == null ? void 0 : _a2.props,
32
+ activeKey: modelValue.value,
33
+ "onUpdate:activeKey": (e) => {
34
+ modelValue.value = e;
35
+ }
36
+ };
37
+ });
38
+ const children = (_b = (_a = props.componentSchema) == null ? void 0 : _a.children) != null ? _b : [];
39
+ return () => h(Tabs, componentSchema.value, {
40
+ default: () => {
41
+ var _a2, _b2;
42
+ const defaultSlotList = (_a2 = slots["edit-node"]) == null ? void 0 : _a2.call(slots)[0].children;
43
+ if (defaultSlotList == null ? void 0 : defaultSlotList.length) {
44
+ const list = (_b2 = defaultSlotList[0].children) == null ? void 0 : _b2.map((item) => {
45
+ item.props.key = item.props.schema.label;
46
+ item.props.tab = item.props.schema.label;
47
+ return item;
48
+ });
49
+ return list;
50
+ }
51
+ return children.map(
52
+ (componentSchema2) => renderSlot(slots, "node", {
53
+ componentSchema: componentSchema2,
54
+ key: componentSchema2.label,
55
+ tab: componentSchema2.label
56
+ })
57
+ );
58
+ }
59
+ });
60
+ }
61
+ });
62
+
63
+ export { tabs as default };
@@ -114,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
114
114
  ((_b = (_a = fileList.value) == null ? void 0 : _a.length) != null ? _b : 0) < props.maxCount ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [..._cache[0] || (_cache[0] = [
115
115
  vue.createElementVNode(
116
116
  "span",
117
- { class: "icon--epic icon--epic--cloud-upload-outlined mr-2px text-$epic-text-main text-lg" },
117
+ { class: "icon--epic icon--epic--cloud-upload-outlined mr-2px text-$ep-text-main text-lg" },
118
118
  null,
119
119
  -1
120
120
  /* CACHED */
@@ -112,7 +112,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
112
  ((_b = (_a = fileList.value) == null ? void 0 : _a.length) != null ? _b : 0) < props.maxCount ? (openBlock(), createElementBlock("div", _hoisted_2, [..._cache[0] || (_cache[0] = [
113
113
  createElementVNode(
114
114
  "span",
115
- { class: "icon--epic icon--epic--cloud-upload-outlined mr-2px text-$epic-text-main text-lg" },
115
+ { class: "icon--epic icon--epic--cloud-upload-outlined mr-2px text-$ep-text-main text-lg" },
116
116
  null,
117
117
  -1
118
118
  /* CACHED */