cnhis-design-vue 3.1.15-beta.7 → 3.1.15-beta.8

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 (37) hide show
  1. package/es/packages/form-config/index.d.ts +12109 -0
  2. package/es/packages/form-config/index.js +10 -0
  3. package/es/packages/form-config/src/FormConfig.js +113 -0
  4. package/es/packages/form-config/src/FormConfig.vue.d.ts +12110 -0
  5. package/es/packages/form-config/src/components/FormConfigCreator.js +97 -0
  6. package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +5094 -0
  7. package/es/packages/form-config/src/components/FormConfigEdit.js +81 -0
  8. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +3591 -0
  9. package/es/packages/form-config/src/constants/index.d.ts +28 -0
  10. package/es/packages/form-config/src/constants/index.js +28 -0
  11. package/es/packages/form-config/src/hooks/index.d.ts +2 -0
  12. package/es/packages/form-config/src/hooks/index.js +2 -0
  13. package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +6 -0
  14. package/es/packages/form-config/src/hooks/useConfigurationField.js +101 -0
  15. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +5 -0
  16. package/es/packages/form-config/src/hooks/usePresetRenderer.js +117 -0
  17. package/es/packages/form-config/src/hooks/useSortable.d.ts +11 -0
  18. package/es/packages/form-config/src/hooks/useSortable.js +31 -0
  19. package/es/packages/form-config/src/types/index.d.ts +18 -0
  20. package/es/packages/form-config/src/types/index.js +1 -0
  21. package/es/packages/form-config/style/index.css +108 -0
  22. package/es/packages/form-render/src/components/renderer/date.d.ts +2 -2
  23. package/es/packages/form-render/src/components/renderer/formItem.js +2 -1
  24. package/es/packages/form-render/src/components/renderer/select.js +1 -1
  25. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -1
  26. package/es/packages/form-render/src/utils/index.d.ts +1 -1
  27. package/es/packages/form-render/src/utils/index.js +5 -0
  28. package/es/packages/index.css +108 -0
  29. package/es/packages/index.d.ts +3 -1
  30. package/es/packages/index.js +4 -1
  31. package/es/packages/shortcut-setter/index.d.ts +2 -2
  32. package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -2
  33. package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +1 -1
  34. package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +2 -2
  35. package/es/src/utils/state.d.ts +29 -0
  36. package/es/src/utils/state.js +44 -0
  37. package/package.json +2 -1
@@ -0,0 +1,28 @@
1
+ import { WithUndefined } from '../../../../../es/src/types';
2
+ import { InjectionKey, Ref } from 'vue';
3
+ import { FieldItem } from '../../../../../es/packages/form-render';
4
+ export declare const WidgetTextMap: {
5
+ INPUT: string;
6
+ SELECT: string;
7
+ TEXTAREA: string;
8
+ CASCADER: string;
9
+ SWITCH: string;
10
+ RADIO: string;
11
+ TEXT: string;
12
+ BUTTON: string;
13
+ CHECKBOX: string;
14
+ LINEBAR: string;
15
+ LINE_BREAKS: string;
16
+ };
17
+ export declare enum EditAbleField {
18
+ ALIAS = "alias",
19
+ TIP = "tip",
20
+ DEFAULT_VAL = "default_val",
21
+ ELEM_WIDTH = "elem_width",
22
+ PLACEHOLDER = "placeholder",
23
+ IS_SHOW = "is_show",
24
+ IS_NOT_FOLD = "is_not_fold",
25
+ IS_NULL = "is_null",
26
+ IS_EDIT = "is_edit"
27
+ }
28
+ export declare const InjectionActiveFieldItem: InjectionKey<Ref<WithUndefined<FieldItem>>>;
@@ -0,0 +1,28 @@
1
+ const WidgetTextMap = {
2
+ INPUT: "\u8F93\u5165\u6846",
3
+ SELECT: "\u4E0B\u62C9\u6846",
4
+ TEXTAREA: "\u6587\u672C\u57DF",
5
+ CASCADER: "\u7EA7\u8054\u4E0B\u62C9\u6846",
6
+ SWITCH: "\u5F00\u5173",
7
+ RADIO: "\u5355\u9009",
8
+ TEXT: "\u6587\u672C",
9
+ BUTTON: "\u6309\u94AE",
10
+ CHECKBOX: "\u591A\u9009",
11
+ LINEBAR: "\u5206\u884C\u7B26",
12
+ LINE_BREAKS: "\u5206\u7EBF\u680F"
13
+ };
14
+ var EditAbleField = /* @__PURE__ */ ((EditAbleField2) => {
15
+ EditAbleField2["ALIAS"] = "alias";
16
+ EditAbleField2["TIP"] = "tip";
17
+ EditAbleField2["DEFAULT_VAL"] = "default_val";
18
+ EditAbleField2["ELEM_WIDTH"] = "elem_width";
19
+ EditAbleField2["PLACEHOLDER"] = "placeholder";
20
+ EditAbleField2["IS_SHOW"] = "is_show";
21
+ EditAbleField2["IS_NOT_FOLD"] = "is_not_fold";
22
+ EditAbleField2["IS_NULL"] = "is_null";
23
+ EditAbleField2["IS_EDIT"] = "is_edit";
24
+ return EditAbleField2;
25
+ })(EditAbleField || {});
26
+ const InjectionActiveFieldItem = Symbol("InjectionActiveFieldItem");
27
+
28
+ export { EditAbleField, InjectionActiveFieldItem, WidgetTextMap };
@@ -0,0 +1,2 @@
1
+ export * from './usePresetRenderer';
2
+ export * from './useSortable';
@@ -0,0 +1,2 @@
1
+ export { usePresetRenderer } from './usePresetRenderer.js';
2
+ export { useSortable } from './useSortable.js';
@@ -0,0 +1,6 @@
1
+ import { EditAbleField } from '../../../../../es/packages/form-config/src/constants';
2
+ import { FieldItem } from '../../../../../es/packages/form-render';
3
+ export declare function useConfigurationField(): {
4
+ generateFieldListByKeys: (keyList: EditAbleField[]) => FieldItem[];
5
+ generateFieldListByFieldItem: (fieldItem: FieldItem) => FieldItem[];
6
+ };
@@ -0,0 +1,101 @@
1
+ import { EditAbleField } from '../../../../packages/form-config/src/constants';
2
+
3
+ function useConfigurationField() {
4
+ const fieldMap = /* @__PURE__ */ new Map([
5
+ [EditAbleField.ALIAS, { alias: "\u540D\u79F0", elem_width: 12, is_null: "0", val_key: "alias", html_type: "INPUT" }],
6
+ [EditAbleField.TIP, { alias: "\u95EE\u53F7\u63D0\u793A", elem_width: 12, val_key: "tip", html_type: "INPUT" }],
7
+ [
8
+ EditAbleField.DEFAULT_VAL,
9
+ { alias: "\u9ED8\u8BA4\u503C", val_key: "default_val", elem_width: 12, html_type: "INPUT", validate: { max_length: 20 } }
10
+ ],
11
+ [
12
+ EditAbleField.ELEM_WIDTH,
13
+ {
14
+ alias: "\u5BBD\u5EA6",
15
+ fieldType: "number",
16
+ val_key: "elem_width",
17
+ html_type: "SELECT",
18
+ elem_width: 12,
19
+ option: [
20
+ { text: "\u6574\u884C", value: 12 },
21
+ { text: "5/6", value: 10 },
22
+ { text: "4/6", value: 8 },
23
+ { text: "3/6", value: 6 },
24
+ { text: "2/6", value: 4 },
25
+ { text: "1/6", value: 2 }
26
+ ]
27
+ }
28
+ ],
29
+ [
30
+ EditAbleField.PLACEHOLDER,
31
+ { alias: "\u8BF4\u660E\u6587\u672C", elem_width: 12, val_key: "placeholder", html_type: "INPUT", validate: { max_length: 30 } }
32
+ ],
33
+ [
34
+ EditAbleField.IS_SHOW,
35
+ {
36
+ val_key: "is_show",
37
+ alias: "\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00",
38
+ html_type: "SWITCH",
39
+ elem_width: 12,
40
+ open: { describe: "\u9ED8\u8BA4\u5C55\u5F00", value: "1" },
41
+ close: { describe: "\u9ED8\u8BA4\u6536\u8D77", value: "0" }
42
+ }
43
+ ],
44
+ [
45
+ EditAbleField.IS_NOT_FOLD,
46
+ {
47
+ val_key: "is_not_fold",
48
+ alias: "\u662F\u5426\u53EF\u6298\u53E0",
49
+ html_type: "SWITCH",
50
+ elem_width: 12,
51
+ open: { describe: "\u53EF\u6298\u53E0", value: "0" },
52
+ close: { describe: "\u4E0D\u53EF\u6298\u53E0", value: "1" }
53
+ }
54
+ ],
55
+ [
56
+ EditAbleField.IS_EDIT,
57
+ {
58
+ val_key: "is_edit",
59
+ alias: "\u662F\u5426\u53EF\u7F16\u8F91",
60
+ html_type: "SWITCH",
61
+ elem_width: 12,
62
+ open: { describe: "\u53EF\u7F16\u8F91", value: "1" },
63
+ close: { describe: "\u4E0D\u53EF\u7F16\u8F91", value: "0" }
64
+ }
65
+ ],
66
+ [
67
+ EditAbleField.IS_NULL,
68
+ {
69
+ val_key: "is_null",
70
+ alias: "\u662F\u5426\u5FC5\u586B",
71
+ html_type: "SWITCH",
72
+ elem_width: 12,
73
+ open: { describe: "\u5FC5\u586B", value: "0" },
74
+ close: { describe: "\u4E0D\u5FC5\u586B", value: "1" }
75
+ }
76
+ ]
77
+ ]);
78
+ function generateFieldListByKeys(keyList) {
79
+ return keyList.map((key) => fieldMap.get(key));
80
+ }
81
+ function generateFieldListByFieldItem(fieldItem) {
82
+ const htmlMap = new Map([
83
+ ["LINEBAR", [EditAbleField.ALIAS, EditAbleField.ELEM_WIDTH, EditAbleField.IS_SHOW, EditAbleField.IS_NOT_FOLD]],
84
+ ...["LINE_BREAKS", "COMPLEX", "COMBINATION"].map((key) => [key, [EditAbleField.ALIAS, EditAbleField.ELEM_WIDTH]])
85
+ ]);
86
+ const defaultItems = [
87
+ EditAbleField.ALIAS,
88
+ EditAbleField.DEFAULT_VAL,
89
+ EditAbleField.ELEM_WIDTH,
90
+ EditAbleField.PLACEHOLDER,
91
+ EditAbleField.TIP,
92
+ EditAbleField.IS_EDIT,
93
+ EditAbleField.IS_NULL
94
+ ];
95
+ const keys = htmlMap.get(fieldItem.html_type) || defaultItems;
96
+ return generateFieldListByKeys(keys);
97
+ }
98
+ return { generateFieldListByKeys, generateFieldListByFieldItem };
99
+ }
100
+
101
+ export { useConfigurationField };
@@ -0,0 +1,5 @@
1
+ import { FieldItem } from '../../../../../es/packages/form-render';
2
+ import { FormConfigTextFilter } from '../types';
3
+ export declare function usePresetRenderer(textFilter: FormConfigTextFilter): {
4
+ getRenderer: (fieldItem: FieldItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
5
+ };
@@ -0,0 +1,117 @@
1
+ import { defineComponent, computed, createVNode, mergeProps, inject } from 'vue';
2
+ import { isString, isArray, isFunction } from 'lodash-es';
3
+ import Draggable from 'vuedraggable';
4
+ import { InjectionActiveFieldItem, WidgetTextMap } from '../../../../packages/form-config/src/constants';
5
+ import { useSortable } from '../../../../packages/form-config/src/hooks';
6
+ import { NEllipsis } from 'naive-ui';
7
+
8
+ function usePresetRenderer(textFilter) {
9
+ const renderDefaultNode = {
10
+ matcher: () => true,
11
+ renderer({
12
+ fieldItem
13
+ }) {
14
+ const currentActiveEditField = inject(InjectionActiveFieldItem);
15
+ return createVNode("section", {
16
+ "onClick": () => currentActiveEditField.value = fieldItem,
17
+ "class": {
18
+ "is-active": currentActiveEditField.value === fieldItem
19
+ }
20
+ }, [createVNode(NEllipsis, {
21
+ "class": ["form-config__renderer--default", {
22
+ "is-required": fieldItem.is_null === "0",
23
+ "is-disabled": fieldItem.is_edit === "0"
24
+ }]
25
+ }, {
26
+ default: () => getDisplayText()
27
+ })]);
28
+ function getDisplayText() {
29
+ return textFilter(fieldItem, `${fieldItem.alias}(${WidgetTextMap[fieldItem.html_type] || "\u63A7\u4EF6"})`);
30
+ }
31
+ }
32
+ };
33
+ const renderComplexNode = {
34
+ matcher: ["COMPLEX", "COMBINATION"],
35
+ renderer: defineComponent({
36
+ props: {
37
+ fieldItem: {
38
+ type: Object,
39
+ required: true
40
+ }
41
+ },
42
+ setup(props) {
43
+ function fieldFor(key) {
44
+ return props.fieldItem[key];
45
+ }
46
+ const classList = computed(() => {
47
+ return `form-config__renderer--complex form-config__renderer--complex--${fieldFor("display") || "grid"}`;
48
+ });
49
+ const style = computed(() => {
50
+ return {
51
+ "--item-column": fieldFor("elem_width"),
52
+ ...fieldFor("wrapperStyle")
53
+ };
54
+ });
55
+ function renderField(fieldItem) {
56
+ const Renderer = getRenderer(fieldItem);
57
+ return createVNode("div", {
58
+ "class": "form-config__displayContentItem",
59
+ "style": {
60
+ "--item-column": fieldItem.elem_width
61
+ }
62
+ }, [createVNode(Renderer, {
63
+ "fieldItem": fieldItem
64
+ }, null)]);
65
+ }
66
+ const childrenList = computed({
67
+ get() {
68
+ return fieldFor("html_type") === "COMBINATION" ? fieldFor("children") : fieldFor("properties");
69
+ },
70
+ set(v) {
71
+ if (fieldFor("html_type") === "COMBINATION") {
72
+ props.fieldItem.children = v;
73
+ } else {
74
+ props.fieldItem.properties = v;
75
+ }
76
+ }
77
+ });
78
+ const {
79
+ commonConfig
80
+ } = useSortable();
81
+ const DraggableComponent = Draggable;
82
+ return () => createVNode(DraggableComponent, mergeProps(commonConfig, {
83
+ "class": classList.value,
84
+ "style": style.value,
85
+ "group": fieldFor("val_key"),
86
+ "modelValue": childrenList.value,
87
+ "onUpdate:modelValue": ($event) => childrenList.value = $event
88
+ }), {
89
+ item: ({
90
+ element
91
+ }) => renderField(element)
92
+ });
93
+ }
94
+ })
95
+ };
96
+ const rendererWithPreset = computed(() => {
97
+ return [renderComplexNode, renderDefaultNode];
98
+ });
99
+ function getRenderer(fieldItem) {
100
+ return rendererWithPreset.value.find(({
101
+ matcher
102
+ }) => {
103
+ if (isString(matcher))
104
+ return matcher === fieldItem.html_type;
105
+ if (isArray(matcher))
106
+ return matcher.includes(fieldItem.html_type);
107
+ if (isFunction(matcher))
108
+ return matcher(fieldItem.html_type);
109
+ return matcher.test(fieldItem.html_type);
110
+ }).renderer;
111
+ }
112
+ return {
113
+ getRenderer
114
+ };
115
+ }
116
+
117
+ export { usePresetRenderer };
@@ -0,0 +1,11 @@
1
+ import Sortable from 'sortablejs';
2
+ export declare function useSortable(): {
3
+ commonConfig: {
4
+ onMove: ({ to, from }: Sortable.SortableEvent) => void;
5
+ onChoose: ({ target, item }: Sortable.SortableEvent) => void;
6
+ onUnchoose: ({ from, to, target, item }: Sortable.SortableEvent) => void;
7
+ tag: string;
8
+ animation: string;
9
+ 'item-key': string;
10
+ };
11
+ };
@@ -0,0 +1,31 @@
1
+ function useSortable() {
2
+ let timer = null;
3
+ function onChoose({ target, item }) {
4
+ timer = setTimeout(() => {
5
+ target.classList.add("is-choosing-area");
6
+ item.classList.add("is-choosing");
7
+ }, 200);
8
+ }
9
+ function onUnchoose({ from, to, target, item }) {
10
+ clearTimeout(timer);
11
+ [from, to, target].forEach((ele) => {
12
+ ele.classList.remove("is-choosing-area");
13
+ });
14
+ item.classList.remove("is-choosing");
15
+ }
16
+ let prevTo;
17
+ function onMove({ to, from }) {
18
+ if (to === from) {
19
+ prevTo == null ? void 0 : prevTo.classList.remove("is-choosing-area");
20
+ prevTo = null;
21
+ } else {
22
+ from.classList.remove("is-choosing-area");
23
+ prevTo = to;
24
+ }
25
+ to.classList.add("is-choosing-area");
26
+ }
27
+ const commonConfig = { onMove, onChoose, onUnchoose, tag: "section", animation: "150", "item-key": "val_key" };
28
+ return { commonConfig };
29
+ }
30
+
31
+ export { useSortable };
@@ -0,0 +1,18 @@
1
+ import { Component, FunctionalComponent } from 'vue';
2
+ import { ArrayAble } from '../../../../../es/src/types';
3
+ import { FieldItem } from '../../../../../es/packages/form-render';
4
+ interface Matcher {
5
+ (type: string): boolean;
6
+ }
7
+ export declare type FormConfigRenderer = {
8
+ matcher: ArrayAble<string> | RegExp | Matcher;
9
+ renderer: Component | FunctionalComponent;
10
+ };
11
+ export interface FormConfigTextFilter {
12
+ (fieldItem: FieldItem, parsedText: string): string;
13
+ }
14
+ export interface FormConfigExpose {
15
+ loadData(payload: Record<'fieldList' | 'materialList', FieldItem[]>): void;
16
+ getData(): Record<'fieldList' | 'materialList', FieldItem[]>;
17
+ }
18
+ export {};
@@ -0,0 +1,108 @@
1
+ .form-config {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ }
5
+ .form-config__material {
6
+ padding: 16px;
7
+ box-sizing: border-box;
8
+ width: 200px;
9
+ min-height: 400px;
10
+ background: white;
11
+ }
12
+ .form-config__materialHeader {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: space-between;
16
+ height: 40px;
17
+ }
18
+ .form-config__materialContent {
19
+ padding: 8px;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 8px;
23
+ }
24
+ .form-config__materialContentItem {
25
+ display: flex;
26
+ align-items: center;
27
+ padding: 8px;
28
+ border: 1px dashed #d9d9d9;
29
+ box-sizing: border-box;
30
+ background-color: #fafafa;
31
+ grid-column: span var(--item-column) / span var(--item-column);
32
+ }
33
+ .form-config__displayWrapper {
34
+ padding: 16px;
35
+ box-sizing: border-box;
36
+ flex: 1;
37
+ padding: 16px 0;
38
+ }
39
+ .form-config__displayHeader {
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: space-between;
43
+ height: 40px;
44
+ }
45
+ .form-config__displayContent {
46
+ padding: 16px;
47
+ box-sizing: border-box;
48
+ height: fit-content;
49
+ background: #eeeeee;
50
+ display: grid !important;
51
+ grid-template-columns: repeat(12, minmax(0px, 1fr));
52
+ gap: 8px 16px;
53
+ }
54
+ .form-config__displayContentItem {
55
+ grid-column: span var(--item-column) / span var(--item-column);
56
+ position: relative;
57
+ }
58
+ .form-config__config {
59
+ padding: 16px;
60
+ box-sizing: border-box;
61
+ width: 220px;
62
+ background: white;
63
+ }
64
+ .form-config__renderer--default {
65
+ display: flex;
66
+ align-items: center;
67
+ padding: 8px;
68
+ border: 1px dashed #d9d9d9;
69
+ box-sizing: border-box;
70
+ background-color: #fafafa;
71
+ user-select: none;
72
+ position: relative;
73
+ width: 100%;
74
+ }
75
+ .form-config__renderer--complex {
76
+ border: 1px dashed lightblue;
77
+ padding: 8px;
78
+ }
79
+ .form-config__renderer--complex--grid {
80
+ display: grid !important;
81
+ grid-template-columns: repeat(12, minmax(0px, 1fr));
82
+ gap: 8px 16px;
83
+ grid-column: span var(--item-column) / span var(--item-column);
84
+ }
85
+ .form-config__renderer--complex--flex {
86
+ display: flex;
87
+ }
88
+ .form-config .is-disabled {
89
+ background: #e5e5e5;
90
+ }
91
+ .form-config .is-required {
92
+ padding-left: 16px !important;
93
+ }
94
+ .form-config .is-required::before {
95
+ position: absolute;
96
+ content: '*';
97
+ left: 8px;
98
+ color: red;
99
+ }
100
+ .form-config .is-active {
101
+ color: #5585f5;
102
+ }
103
+ .form-config .is-choosing {
104
+ box-shadow: #5585f5 0 0 0 2px !important;
105
+ }
106
+ .form-config .is-choosing-area {
107
+ background: #f0f7ff;
108
+ }
@@ -5,7 +5,7 @@ export declare const DATE: import("vue").DefineComponent<{
5
5
  validate: {
6
6
  type: PropType<Partial<{
7
7
  [key: string]: any;
8
- obj_type: "password" | "sex" | "age" | "email" | "birthday" | "id_card" | "age_unit" | "mobile" | "telephone" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name";
8
+ obj_type: "password" | "sex" | "age" | "email" | "id_card" | "age_unit" | "mobile" | "telephone" | "birthday" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name";
9
9
  vali_obj: string;
10
10
  max_value: string | number;
11
11
  min_value: string | number;
@@ -22,7 +22,7 @@ export declare const DATE: import("vue").DefineComponent<{
22
22
  validate: {
23
23
  type: PropType<Partial<{
24
24
  [key: string]: any;
25
- obj_type: "password" | "sex" | "age" | "email" | "birthday" | "id_card" | "age_unit" | "mobile" | "telephone" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name";
25
+ obj_type: "password" | "sex" | "age" | "email" | "id_card" | "age_unit" | "mobile" | "telephone" | "birthday" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name";
26
26
  vali_obj: string;
27
27
  max_value: string | number;
28
28
  min_value: string | number;
@@ -18,7 +18,8 @@ const script = defineComponent({
18
18
  const annotation = inject(InjectionAnnotation);
19
19
  const annotationContent = computed({
20
20
  get() {
21
- return annotation.value[props.propertyKey];
21
+ var _a, _b;
22
+ return (_b = (_a = annotation.value) == null ? void 0 : _a[props.propertyKey]) != null ? _b : "";
22
23
  },
23
24
  set(value) {
24
25
  annotation.value = {
@@ -51,7 +51,6 @@ const script = defineComponent({
51
51
  emit("update:value", v);
52
52
  }
53
53
  const {
54
- title,
55
54
  field,
56
55
  fieldKey
57
56
  } = useFormField();
@@ -106,6 +105,7 @@ const script = defineComponent({
106
105
  formItemDepsCollector.setDeps(fieldKey.value, config.dependKey || [], async () => {
107
106
  remoteOptions.value = null;
108
107
  emit("update:value", null);
108
+ !props.lazyRequest && await fetchData();
109
109
  });
110
110
  (props.value || !props.lazyRequest) && fetchData();
111
111
  }, {
@@ -51,7 +51,8 @@ function useFieldListAdaptor(collector, uuid) {
51
51
  const createSelectSchema = (item) => {
52
52
  const schema = createStandardSchema(item);
53
53
  Object.assign(schema["x-component-props"], {
54
- ...pick(item, ["lazyRequest", "urlConfig", "option"]),
54
+ ...pick(item, ["lazyRequest", "urlConfig"]),
55
+ options: item.option,
55
56
  multiple: item.multi_select === "0",
56
57
  maxTagCount: +item.multi_select_value
57
58
  });
@@ -8,7 +8,7 @@ export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T
8
8
  export declare function assignUpdateValue(props: AnyObject, field: GeneralField): {
9
9
  [x: string]: any;
10
10
  };
11
- export declare function transformDateFormat(format?: string): "date" | "datetime";
11
+ export declare function transformDateFormat(format?: string): "date" | "datetime" | "month";
12
12
  export declare function isIdCard(idCardNo: string): boolean;
13
13
  export declare function isMobile(mobile: string): boolean;
14
14
  export declare function parseBirthday(birthday: string): AgeContext;
@@ -26,7 +26,12 @@ function assignUpdateValue(props, field) {
26
26
  }
27
27
  return _props;
28
28
  }
29
+ function isMonthType(format) {
30
+ return format && format.replace(/yyyy-MM/gi, "YYYY-MM") === "YYYY-MM";
31
+ }
29
32
  function transformDateFormat(format = "") {
33
+ if (isMonthType(format))
34
+ return "month";
30
35
  return format.includes("HH") ? "datetime" : "date";
31
36
  }
32
37
  function isIdCard(idCardNo) {
@@ -3178,3 +3178,111 @@ body > .vxe-table--tooltip-wrapper {
3178
3178
  .nodeTipContent li p {
3179
3179
  margin: 0;
3180
3180
  }
3181
+ .form-config {
3182
+ display: flex;
3183
+ justify-content: space-between;
3184
+ }
3185
+ .form-config__material {
3186
+ padding: 16px;
3187
+ box-sizing: border-box;
3188
+ width: 200px;
3189
+ min-height: 400px;
3190
+ background: white;
3191
+ }
3192
+ .form-config__materialHeader {
3193
+ display: flex;
3194
+ align-items: center;
3195
+ justify-content: space-between;
3196
+ height: 40px;
3197
+ }
3198
+ .form-config__materialContent {
3199
+ padding: 8px;
3200
+ display: flex;
3201
+ flex-direction: column;
3202
+ gap: 8px;
3203
+ }
3204
+ .form-config__materialContentItem {
3205
+ display: flex;
3206
+ align-items: center;
3207
+ padding: 8px;
3208
+ border: 1px dashed #d9d9d9;
3209
+ box-sizing: border-box;
3210
+ background-color: #fafafa;
3211
+ grid-column: span var(--item-column) / span var(--item-column);
3212
+ }
3213
+ .form-config__displayWrapper {
3214
+ padding: 16px;
3215
+ box-sizing: border-box;
3216
+ flex: 1;
3217
+ padding: 16px 0;
3218
+ }
3219
+ .form-config__displayHeader {
3220
+ display: flex;
3221
+ align-items: center;
3222
+ justify-content: space-between;
3223
+ height: 40px;
3224
+ }
3225
+ .form-config__displayContent {
3226
+ padding: 16px;
3227
+ box-sizing: border-box;
3228
+ height: fit-content;
3229
+ background: #eeeeee;
3230
+ display: grid !important;
3231
+ grid-template-columns: repeat(12, minmax(0px, 1fr));
3232
+ gap: 8px 16px;
3233
+ }
3234
+ .form-config__displayContentItem {
3235
+ grid-column: span var(--item-column) / span var(--item-column);
3236
+ position: relative;
3237
+ }
3238
+ .form-config__config {
3239
+ padding: 16px;
3240
+ box-sizing: border-box;
3241
+ width: 220px;
3242
+ background: white;
3243
+ }
3244
+ .form-config__renderer--default {
3245
+ display: flex;
3246
+ align-items: center;
3247
+ padding: 8px;
3248
+ border: 1px dashed #d9d9d9;
3249
+ box-sizing: border-box;
3250
+ background-color: #fafafa;
3251
+ user-select: none;
3252
+ position: relative;
3253
+ width: 100%;
3254
+ }
3255
+ .form-config__renderer--complex {
3256
+ border: 1px dashed lightblue;
3257
+ padding: 8px;
3258
+ }
3259
+ .form-config__renderer--complex--grid {
3260
+ display: grid !important;
3261
+ grid-template-columns: repeat(12, minmax(0px, 1fr));
3262
+ gap: 8px 16px;
3263
+ grid-column: span var(--item-column) / span var(--item-column);
3264
+ }
3265
+ .form-config__renderer--complex--flex {
3266
+ display: flex;
3267
+ }
3268
+ .form-config .is-disabled {
3269
+ background: #e5e5e5;
3270
+ }
3271
+ .form-config .is-required {
3272
+ padding-left: 16px !important;
3273
+ }
3274
+ .form-config .is-required::before {
3275
+ position: absolute;
3276
+ content: '*';
3277
+ left: 8px;
3278
+ color: red;
3279
+ }
3280
+ .form-config .is-active {
3281
+ color: #5585f5;
3282
+ }
3283
+ .form-config .is-choosing {
3284
+ box-shadow: #5585f5 0 0 0 2px !important;
3285
+ }
3286
+ .form-config .is-choosing-area {
3287
+ background: #f0f7ff;
3288
+ }