cnhis-design-vue 3.1.18-beta.0 → 3.1.18-beta.5
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/es/components/big-table/src/BigTable.vue.d.ts +1 -4
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +8 -6
- package/es/components/field-set/src/FieldSet.js +26 -19
- package/es/components/form-config/src/FormConfig.js +6 -6
- package/es/components/form-config/src/components/FormConfigEdit.js +4 -4
- package/es/components/form-config/src/components/renderer/ComplexNode.js +4 -7
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +103 -103
- package/es/components/form-config/src/components/renderer/DefaultNode.js +3 -6
- package/es/components/form-config/src/hooks/usePresetRenderer.js +0 -5
- package/es/components/form-render/src/FormRender.js +2 -12
- package/es/components/form-render/src/components/renderer/cascader.js +2 -2
- package/es/components/form-render/src/components/renderer/checkbox.js +2 -2
- package/es/components/form-render/src/components/renderer/combination.js +9 -2
- package/es/components/form-render/src/components/renderer/date.js +2 -2
- package/es/components/form-render/src/components/renderer/input.d.ts +10 -2
- package/es/components/form-render/src/components/renderer/input.js +19 -3
- package/es/components/form-render/src/components/renderer/inputNumber.js +2 -0
- package/es/components/form-render/src/components/renderer/radio.js +2 -2
- package/es/components/form-render/src/components/renderer/select.js +2 -2
- package/es/components/form-render/src/components/renderer/slider.js +3 -3
- package/es/components/form-render/src/components/renderer/switch.js +2 -2
- package/es/components/form-render/src/components/renderer/textarea.d.ts +8 -845
- package/es/components/form-render/src/components/renderer/textarea.js +29 -6
- package/es/components/form-render/src/hooks/useCommonInjection.d.ts +1 -0
- package/es/components/form-render/src/hooks/useCommonInjection.js +11 -2
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/src/utils/schema.d.ts +3 -0
- package/es/components/form-render/src/utils/schema.js +8 -1
- package/es/packages/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/packages/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/packages/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/packages/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/packages/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/packages/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +4 -18
|
@@ -1247,9 +1247,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1247
1247
|
textColorTextHoverPrimary: string;
|
|
1248
1248
|
textColorTextPressedPrimary: string;
|
|
1249
1249
|
textColorTextFocusPrimary: string;
|
|
1250
|
-
textColorTextDisabledPrimary: string;
|
|
1251
|
-
* tsx渲染表格
|
|
1252
|
-
*/
|
|
1250
|
+
textColorTextDisabledPrimary: string;
|
|
1253
1251
|
textColorGhostPrimary: string;
|
|
1254
1252
|
textColorGhostHoverPrimary: string;
|
|
1255
1253
|
textColorGhostPressedPrimary: string;
|
|
@@ -1328,7 +1326,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1328
1326
|
textColorTextPressedWarning: string;
|
|
1329
1327
|
textColorTextFocusWarning: string;
|
|
1330
1328
|
textColorTextDisabledWarning: string;
|
|
1331
|
-
/** string */
|
|
1332
1329
|
textColorGhostWarning: string;
|
|
1333
1330
|
textColorGhostHoverWarning: string;
|
|
1334
1331
|
textColorGhostPressedWarning: string;
|
|
@@ -1318,8 +1318,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1318
1318
|
};
|
|
1319
1319
|
const handlerClickRow = (data) => {
|
|
1320
1320
|
var _a;
|
|
1321
|
-
|
|
1321
|
+
let {
|
|
1322
|
+
row,
|
|
1323
|
+
$event = {},
|
|
1324
|
+
$rowIndex
|
|
1325
|
+
} = data;
|
|
1326
|
+
if (((_a = attr.checkboxConfig) == null ? void 0 : _a.trigger) === "default") {
|
|
1327
|
+
emit("handlerClickRow", row, $rowIndex);
|
|
1322
1328
|
return false;
|
|
1329
|
+
}
|
|
1323
1330
|
if (isScanMultiTable.value || props.isInlineOperating)
|
|
1324
1331
|
return false;
|
|
1325
1332
|
if (XEUtils.has(data == null ? void 0 : data.row, GROUP_TITLE_KEY))
|
|
@@ -1328,11 +1335,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1328
1335
|
return false;
|
|
1329
1336
|
let table = xGrid.value;
|
|
1330
1337
|
isAboutNestTable.value && emit("resetNestLastClickTable", table);
|
|
1331
|
-
let {
|
|
1332
|
-
row,
|
|
1333
|
-
$event = {},
|
|
1334
|
-
$rowIndex
|
|
1335
|
-
} = data;
|
|
1336
1338
|
let {
|
|
1337
1339
|
className,
|
|
1338
1340
|
tagName
|
|
@@ -36,15 +36,15 @@ const _hoisted_18 = /* @__PURE__ */ createElementVNode("span", {
|
|
|
36
36
|
const _hoisted_19 = /* @__PURE__ */ createElementVNode("span", null, "\u62D6\u62FD\u8C03\u6574\u987A\u5E8F", -1);
|
|
37
37
|
const _hoisted_20 = /* @__PURE__ */ createElementVNode("span", { style: { "width": "14px", "margin-right": "6px" } }, null, -1);
|
|
38
38
|
const _hoisted_21 = { class: "width-show" };
|
|
39
|
-
const _hoisted_22 = {
|
|
40
|
-
const _hoisted_23 = {
|
|
39
|
+
const _hoisted_22 = {
|
|
41
40
|
key: 0,
|
|
42
41
|
class: "width-show"
|
|
43
42
|
};
|
|
44
|
-
const
|
|
43
|
+
const _hoisted_23 = {
|
|
45
44
|
key: 1,
|
|
46
45
|
class: "width-show"
|
|
47
46
|
};
|
|
47
|
+
const _hoisted_24 = { class: "width-show" };
|
|
48
48
|
const _hoisted_25 = { class: "width-showed" };
|
|
49
49
|
const _hoisted_26 = { class: "width-word" };
|
|
50
50
|
const _hoisted_27 = { class: "width-showed" };
|
|
@@ -86,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
86
86
|
columnName: "name",
|
|
87
87
|
isShow: "show",
|
|
88
88
|
isSort: "sort",
|
|
89
|
-
isFixed: "
|
|
89
|
+
isFixed: "fixedWay",
|
|
90
90
|
colWidth: "columnWidth"
|
|
91
91
|
};
|
|
92
92
|
const selectOptions = [
|
|
@@ -110,11 +110,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
110
110
|
result.forEach((item) => {
|
|
111
111
|
if (props.type == "old") {
|
|
112
112
|
if (Reflect.has(item, key)) {
|
|
113
|
-
|
|
113
|
+
if (key == "isFixed") {
|
|
114
|
+
item["fixedWay"] = item[key] == 1 ? "LEFT" : item[key] == 2 ? "RIGHT" : "NONE";
|
|
115
|
+
} else {
|
|
116
|
+
item[fieldsMapping[key]] = item[key];
|
|
117
|
+
}
|
|
114
118
|
Reflect.deleteProperty(item, key);
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
|
-
item.columnWidth =
|
|
121
|
+
item.columnWidth = +item.columnWidth;
|
|
122
|
+
if (!Reflect.has(item, "alias")) {
|
|
123
|
+
item.alias = "";
|
|
124
|
+
}
|
|
118
125
|
});
|
|
119
126
|
});
|
|
120
127
|
return result;
|
|
@@ -151,7 +158,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
151
158
|
visible: item.show,
|
|
152
159
|
sequence: i,
|
|
153
160
|
sortable: item.sort,
|
|
154
|
-
title: item.alias
|
|
161
|
+
title: item.alias,
|
|
155
162
|
fixed: item.fixedWay,
|
|
156
163
|
minWidth: item.columnWidth,
|
|
157
164
|
...props.isEdit ? {
|
|
@@ -317,18 +324,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
317
324
|
[vShow, element.id != "0001"]
|
|
318
325
|
])
|
|
319
326
|
]),
|
|
320
|
-
createCommentVNode(" \u6392\u5E8F "),
|
|
321
|
-
createElementVNode("span", _hoisted_22, [
|
|
322
|
-
withDirectives(createVNode(unref(NCheckbox), {
|
|
323
|
-
checked: element.sort,
|
|
324
|
-
"onUpdate:checked": ($event) => element.sort = $event,
|
|
325
|
-
disabled: element.notParticipatingSort == 1
|
|
326
|
-
}, null, 8, ["checked", "onUpdate:checked", "disabled"]), [
|
|
327
|
-
[vShow, element.id != "0001"]
|
|
328
|
-
])
|
|
329
|
-
]),
|
|
330
327
|
createCommentVNode(" \u662F\u5426\u53EF\u7F16\u8F91 "),
|
|
331
|
-
__props.isEdit ? (openBlock(), createElementBlock("span",
|
|
328
|
+
__props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_22, [
|
|
332
329
|
withDirectives(createVNode(unref(NCheckbox), {
|
|
333
330
|
checked: element.editable,
|
|
334
331
|
"onUpdate:checked": ($event) => element.editable = $event
|
|
@@ -337,7 +334,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
337
334
|
])
|
|
338
335
|
])) : createCommentVNode("v-if", true),
|
|
339
336
|
createCommentVNode(" \u662F\u5426\u5FC5\u586B "),
|
|
340
|
-
__props.isEdit ? (openBlock(), createElementBlock("span",
|
|
337
|
+
__props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_23, [
|
|
341
338
|
withDirectives(createVNode(unref(NCheckbox), {
|
|
342
339
|
checked: element.required,
|
|
343
340
|
"onUpdate:checked": ($event) => element.required = $event
|
|
@@ -345,6 +342,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
345
342
|
[vShow, element.id != "0001"]
|
|
346
343
|
])
|
|
347
344
|
])) : createCommentVNode("v-if", true),
|
|
345
|
+
createCommentVNode(" \u6392\u5E8F "),
|
|
346
|
+
createElementVNode("span", _hoisted_24, [
|
|
347
|
+
withDirectives(createVNode(unref(NCheckbox), {
|
|
348
|
+
checked: element.sort,
|
|
349
|
+
"onUpdate:checked": ($event) => element.sort = $event,
|
|
350
|
+
disabled: element.notParticipatingSort == 1
|
|
351
|
+
}, null, 8, ["checked", "onUpdate:checked", "disabled"]), [
|
|
352
|
+
[vShow, element.id != "0001"]
|
|
353
|
+
])
|
|
354
|
+
]),
|
|
348
355
|
createCommentVNode(" \u56FA\u5B9A "),
|
|
349
356
|
createElementVNode("span", _hoisted_25, [
|
|
350
357
|
createVNode(unref(NSelect), {
|
|
@@ -3,12 +3,12 @@ import { cloneDeep, isFunction } from 'lodash-es';
|
|
|
3
3
|
import { NButton } from 'naive-ui';
|
|
4
4
|
import Draggable from 'vuedraggable';
|
|
5
5
|
import FormConfigCreator from './components/FormConfigCreator.js';
|
|
6
|
-
import FormConfigEdit from './components/FormConfigEdit.js';
|
|
7
6
|
import FormConfigDragDisplay from './components/FormConfigDragDisplay.js';
|
|
8
|
-
import '
|
|
7
|
+
import FormConfigEdit from './components/FormConfigEdit.js';
|
|
8
|
+
import { layoutWidthEnum2Column } from './utils/index.js';
|
|
9
9
|
import { InjectionFieldList, InjectionMaterialList, InjectionActiveFieldItem } from './constants/index.js';
|
|
10
|
+
import '@vicons/ionicons5';
|
|
10
11
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
11
|
-
import { layoutWidthEnum2Column } from './utils/index.js';
|
|
12
12
|
import { useSortableConfig } from './hooks/useSortalbeConfig.js';
|
|
13
13
|
|
|
14
14
|
const _hoisted_1 = { class: "form-config__material" };
|
|
@@ -94,9 +94,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
94
|
createElementVNode("section", _hoisted_3, [
|
|
95
95
|
createElementVNode("header", _hoisted_4, [
|
|
96
96
|
_hoisted_5,
|
|
97
|
-
createVNode(
|
|
97
|
+
createVNode(FormConfigCreator, { onSubmit: addItem })
|
|
98
98
|
]),
|
|
99
|
-
createVNode(
|
|
99
|
+
createVNode(FormConfigDragDisplay, {
|
|
100
100
|
class: "form-config__displayContent",
|
|
101
101
|
"text-formatter": parsedTextFormatter,
|
|
102
102
|
modelValue: fieldListRef.value,
|
|
@@ -106,7 +106,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
106
|
createElementVNode("section", _hoisted_6, [
|
|
107
107
|
_hoisted_7,
|
|
108
108
|
createElementVNode("section", _hoisted_8, [
|
|
109
|
-
createVNode(
|
|
109
|
+
createVNode(FormConfigEdit, {
|
|
110
110
|
ref_key: "formConfigEditRef",
|
|
111
111
|
ref: formConfigEditRef
|
|
112
112
|
}, null, 512)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, watch, toRaw, openBlock, createElementBlock, Fragment, createBlock, unref, createVNode, nextTick } from 'vue';
|
|
2
2
|
import { cloneDeep } from 'lodash-es';
|
|
3
3
|
import { InjectionActiveFieldItem } from '../constants/index.js';
|
|
4
|
-
import { NModal } from 'naive-ui';
|
|
5
|
-
import { useConfigurationField } from '../hooks/useConfigurationField.js';
|
|
6
|
-
import '../../../index.js';
|
|
7
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
8
4
|
import 'vuedraggable';
|
|
9
5
|
import '../utils/index.js';
|
|
6
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
10
7
|
import '@vicons/ionicons5';
|
|
8
|
+
import { NModal } from 'naive-ui';
|
|
9
|
+
import { useConfigurationField } from '../hooks/useConfigurationField.js';
|
|
10
|
+
import '../../../index.js';
|
|
11
11
|
import FormRender from '../../../form-render/index.js';
|
|
12
12
|
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, openBlock, createElementBlock, createElementVNode, mergeProps, unref, withModifiers, createTextVNode, toDisplayString, createVNode } from 'vue';
|
|
2
|
-
import 'lodash-es';
|
|
3
|
-
import 'naive-ui';
|
|
4
|
-
import { InjectionActiveFieldItem } from '../../constants/index.js';
|
|
5
|
-
import '../../../../index.js';
|
|
6
|
-
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
2
|
import FormConfigDragDisplay from '../FormConfigDragDisplay.js';
|
|
8
3
|
import CloseButton from './CloseButton.js';
|
|
4
|
+
import { InjectionActiveFieldItem } from '../../constants/index.js';
|
|
9
5
|
import { bindHover } from '../../utils/index.js';
|
|
6
|
+
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
10
7
|
|
|
11
8
|
const _hoisted_1 = { class: "form-config__renderer--complex form-config__renderer" };
|
|
12
9
|
const _hoisted_2 = ["onClick"];
|
|
@@ -32,9 +29,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
29
|
onClick: withModifiers(active, ["stop"])
|
|
33
30
|
}), [
|
|
34
31
|
createTextVNode(toDisplayString(props.fieldItem.name) + " ", 1),
|
|
35
|
-
createVNode(
|
|
32
|
+
createVNode(CloseButton, { "field-item": __props.fieldItem }, null, 8, ["field-item"])
|
|
36
33
|
], 16, _hoisted_2),
|
|
37
|
-
createVNode(
|
|
34
|
+
createVNode(FormConfigDragDisplay, mergeProps(_ctx.$props, {
|
|
38
35
|
modelValue: __props.fieldItem.children,
|
|
39
36
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.fieldItem.children = $event),
|
|
40
37
|
class: "form-config__renderer--complex--grid"
|
|
@@ -28,6 +28,109 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
headerClassList: import("vue").ComputedRef<(string | {
|
|
29
29
|
'is-active': boolean;
|
|
30
30
|
})[]>;
|
|
31
|
+
FormConfigDragDisplay: import("vue").DefineComponent<{
|
|
32
|
+
fieldItem: {
|
|
33
|
+
type: PropType<FormConfigItem>;
|
|
34
|
+
};
|
|
35
|
+
textFormatter: {
|
|
36
|
+
type: PropType<FormConfigTextFormatter>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
getItemColumnStyle: (fieldItem?: FormConfigItem | undefined) => {
|
|
41
|
+
'--item-column': number;
|
|
42
|
+
};
|
|
43
|
+
getRenderer: (fieldItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
44
|
+
getCommonConfig: () => {
|
|
45
|
+
onMove: ({ to, from }: import("sortablejs").SortableEvent) => void;
|
|
46
|
+
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
47
|
+
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
48
|
+
tag: string;
|
|
49
|
+
animation: string;
|
|
50
|
+
'item-key': string;
|
|
51
|
+
};
|
|
52
|
+
Draggable: import("vue").DefineComponent<{
|
|
53
|
+
list: {
|
|
54
|
+
type: ArrayConstructor;
|
|
55
|
+
required: boolean;
|
|
56
|
+
default: any;
|
|
57
|
+
};
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: ArrayConstructor;
|
|
60
|
+
required: boolean;
|
|
61
|
+
default: any;
|
|
62
|
+
};
|
|
63
|
+
itemKey: {
|
|
64
|
+
type: (StringConstructor | FunctionConstructor)[];
|
|
65
|
+
required: boolean;
|
|
66
|
+
};
|
|
67
|
+
clone: {
|
|
68
|
+
type: FunctionConstructor;
|
|
69
|
+
default: (original: any) => any;
|
|
70
|
+
};
|
|
71
|
+
tag: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
move: {
|
|
76
|
+
type: FunctionConstructor;
|
|
77
|
+
default: any;
|
|
78
|
+
};
|
|
79
|
+
componentData: {
|
|
80
|
+
type: ObjectConstructor;
|
|
81
|
+
required: boolean;
|
|
82
|
+
default: any;
|
|
83
|
+
};
|
|
84
|
+
}, unknown, {
|
|
85
|
+
error: boolean;
|
|
86
|
+
}, {
|
|
87
|
+
realList(): any;
|
|
88
|
+
getKey(): any;
|
|
89
|
+
}, {
|
|
90
|
+
getUnderlyingVm(domElement: any): any;
|
|
91
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
92
|
+
emitChanges(evt: any): void;
|
|
93
|
+
alterList(onList: any): void;
|
|
94
|
+
spliceList(): void;
|
|
95
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
96
|
+
getRelatedContextFromMoveEvent({ to, related }: {
|
|
97
|
+
to: any;
|
|
98
|
+
related: any;
|
|
99
|
+
}): any;
|
|
100
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
101
|
+
onDragStart(evt: any): void;
|
|
102
|
+
onDragAdd(evt: any): void;
|
|
103
|
+
onDragRemove(evt: any): void;
|
|
104
|
+
onDragUpdate(evt: any): void;
|
|
105
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
106
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
107
|
+
onDragEnd(): void;
|
|
108
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
109
|
+
move: Function;
|
|
110
|
+
tag: string;
|
|
111
|
+
clone: Function;
|
|
112
|
+
list: unknown[];
|
|
113
|
+
modelValue: unknown[];
|
|
114
|
+
componentData: Record<string, any>;
|
|
115
|
+
} & {
|
|
116
|
+
itemKey?: string | Function | undefined;
|
|
117
|
+
}>, {
|
|
118
|
+
move: Function;
|
|
119
|
+
tag: string;
|
|
120
|
+
clone: Function;
|
|
121
|
+
list: unknown[];
|
|
122
|
+
modelValue: unknown[];
|
|
123
|
+
componentData: Record<string, any>;
|
|
124
|
+
}>;
|
|
125
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
126
|
+
fieldItem: {
|
|
127
|
+
type: PropType<FormConfigItem>;
|
|
128
|
+
};
|
|
129
|
+
textFormatter: {
|
|
130
|
+
type: PropType<FormConfigTextFormatter>;
|
|
131
|
+
required: true;
|
|
132
|
+
};
|
|
133
|
+
}>>, {}>;
|
|
31
134
|
CloseButton: import("vue").DefineComponent<{
|
|
32
135
|
fieldItem: {
|
|
33
136
|
type: PropType<FormConfigItem>;
|
|
@@ -1524,109 +1627,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1524
1627
|
required: true;
|
|
1525
1628
|
};
|
|
1526
1629
|
}>>, {}>;
|
|
1527
|
-
FormConfigDragDisplay: import("vue").DefineComponent<{
|
|
1528
|
-
fieldItem: {
|
|
1529
|
-
type: PropType<FormConfigItem>;
|
|
1530
|
-
};
|
|
1531
|
-
textFormatter: {
|
|
1532
|
-
type: PropType<FormConfigTextFormatter>;
|
|
1533
|
-
required: true;
|
|
1534
|
-
};
|
|
1535
|
-
}, {
|
|
1536
|
-
getItemColumnStyle: (fieldItem?: FormConfigItem | undefined) => {
|
|
1537
|
-
'--item-column': number;
|
|
1538
|
-
};
|
|
1539
|
-
getRenderer: (fieldItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
|
|
1540
|
-
getCommonConfig: () => {
|
|
1541
|
-
onMove: ({ to, from }: import("sortablejs").SortableEvent) => void;
|
|
1542
|
-
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
1543
|
-
onUnchoose: ({ from, to, target, item }: import("sortablejs").SortableEvent) => void;
|
|
1544
|
-
tag: string;
|
|
1545
|
-
animation: string;
|
|
1546
|
-
'item-key': string;
|
|
1547
|
-
};
|
|
1548
|
-
Draggable: import("vue").DefineComponent<{
|
|
1549
|
-
list: {
|
|
1550
|
-
type: ArrayConstructor;
|
|
1551
|
-
required: boolean;
|
|
1552
|
-
default: any;
|
|
1553
|
-
};
|
|
1554
|
-
modelValue: {
|
|
1555
|
-
type: ArrayConstructor;
|
|
1556
|
-
required: boolean;
|
|
1557
|
-
default: any;
|
|
1558
|
-
};
|
|
1559
|
-
itemKey: {
|
|
1560
|
-
type: (StringConstructor | FunctionConstructor)[];
|
|
1561
|
-
required: boolean;
|
|
1562
|
-
};
|
|
1563
|
-
clone: {
|
|
1564
|
-
type: FunctionConstructor;
|
|
1565
|
-
default: (original: any) => any;
|
|
1566
|
-
};
|
|
1567
|
-
tag: {
|
|
1568
|
-
type: StringConstructor;
|
|
1569
|
-
default: string;
|
|
1570
|
-
};
|
|
1571
|
-
move: {
|
|
1572
|
-
type: FunctionConstructor;
|
|
1573
|
-
default: any;
|
|
1574
|
-
};
|
|
1575
|
-
componentData: {
|
|
1576
|
-
type: ObjectConstructor;
|
|
1577
|
-
required: boolean;
|
|
1578
|
-
default: any;
|
|
1579
|
-
};
|
|
1580
|
-
}, unknown, {
|
|
1581
|
-
error: boolean;
|
|
1582
|
-
}, {
|
|
1583
|
-
realList(): any;
|
|
1584
|
-
getKey(): any;
|
|
1585
|
-
}, {
|
|
1586
|
-
getUnderlyingVm(domElement: any): any;
|
|
1587
|
-
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
1588
|
-
emitChanges(evt: any): void;
|
|
1589
|
-
alterList(onList: any): void;
|
|
1590
|
-
spliceList(): void;
|
|
1591
|
-
updatePosition(oldIndex: any, newIndex: any): void;
|
|
1592
|
-
getRelatedContextFromMoveEvent({ to, related }: {
|
|
1593
|
-
to: any;
|
|
1594
|
-
related: any;
|
|
1595
|
-
}): any;
|
|
1596
|
-
getVmIndexFromDomIndex(domIndex: any): any;
|
|
1597
|
-
onDragStart(evt: any): void;
|
|
1598
|
-
onDragAdd(evt: any): void;
|
|
1599
|
-
onDragRemove(evt: any): void;
|
|
1600
|
-
onDragUpdate(evt: any): void;
|
|
1601
|
-
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
1602
|
-
onDragMove(evt: any, originalEvent: any): any;
|
|
1603
|
-
onDragEnd(): void;
|
|
1604
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
1605
|
-
move: Function;
|
|
1606
|
-
tag: string;
|
|
1607
|
-
clone: Function;
|
|
1608
|
-
list: unknown[];
|
|
1609
|
-
modelValue: unknown[];
|
|
1610
|
-
componentData: Record<string, any>;
|
|
1611
|
-
} & {
|
|
1612
|
-
itemKey?: string | Function | undefined;
|
|
1613
|
-
}>, {
|
|
1614
|
-
move: Function;
|
|
1615
|
-
tag: string;
|
|
1616
|
-
clone: Function;
|
|
1617
|
-
list: unknown[];
|
|
1618
|
-
modelValue: unknown[];
|
|
1619
|
-
componentData: Record<string, any>;
|
|
1620
|
-
}>;
|
|
1621
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1622
|
-
fieldItem: {
|
|
1623
|
-
type: PropType<FormConfigItem>;
|
|
1624
|
-
};
|
|
1625
|
-
textFormatter: {
|
|
1626
|
-
type: PropType<FormConfigTextFormatter>;
|
|
1627
|
-
required: true;
|
|
1628
|
-
};
|
|
1629
|
-
}>>, {}>;
|
|
1630
1630
|
bindHover: typeof bindHover;
|
|
1631
1631
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1632
1632
|
fieldItem: {
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, openBlock, createBlock, unref, mergeProps, withModifiers, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { NButton, NEllipsis } from 'naive-ui';
|
|
3
|
-
import '
|
|
3
|
+
import CloseButton from './CloseButton.js';
|
|
4
4
|
import { InjectionActiveFieldItem, WidgetTextMap } from '../../constants/index.js';
|
|
5
|
-
import '../../../../index.js';
|
|
6
|
-
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
|
-
import 'vuedraggable';
|
|
8
5
|
import { bindHover } from '../../utils/index.js';
|
|
9
|
-
import
|
|
6
|
+
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
10
7
|
|
|
11
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
9
|
__name: "DefaultNode",
|
|
@@ -50,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
47
|
]),
|
|
51
48
|
_: 1
|
|
52
49
|
}, 8, ["class"]),
|
|
53
|
-
createVNode(
|
|
50
|
+
createVNode(CloseButton, { "field-item": __props.fieldItem }, null, 8, ["field-item"])
|
|
54
51
|
]),
|
|
55
52
|
_: 1
|
|
56
53
|
}, 16, ["secondary", "dashed", "onClick", "class"]);
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { isString, isArray, isFunction } from 'lodash-es';
|
|
2
2
|
import { computed } from 'vue';
|
|
3
|
-
import 'naive-ui';
|
|
4
|
-
import '../../../index.js';
|
|
5
|
-
import 'vuedraggable';
|
|
6
|
-
import '../utils/index.js';
|
|
7
|
-
import '@vicons/ionicons5';
|
|
8
3
|
import ComplexNode from '../components/renderer/ComplexNode.js';
|
|
9
4
|
import DefaultNode from '../components/renderer/DefaultNode.js';
|
|
10
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createElementBlock, createVNode, isRef, Fragment, renderList, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, nextTick } from 'vue';
|
|
2
|
-
import { createForm, onFieldValueChange
|
|
2
|
+
import { createForm, onFieldValueChange } from '@formily/core';
|
|
3
3
|
import { FormProvider, FormConsumer } from '@formily/vue';
|
|
4
4
|
import { isObject } from '@vue/shared';
|
|
5
5
|
import { cloneDeep, isArray } from 'lodash-es';
|
|
@@ -146,17 +146,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
146
|
formModel.setFieldState(path, handler);
|
|
147
147
|
},
|
|
148
148
|
resetFields(path = "*") {
|
|
149
|
-
formModel.
|
|
150
|
-
var _a;
|
|
151
|
-
if (isField(field)) {
|
|
152
|
-
field.modified = false;
|
|
153
|
-
field.visited = false;
|
|
154
|
-
field.feedbacks = [];
|
|
155
|
-
field.selfModified = false;
|
|
156
|
-
field.caches = {};
|
|
157
|
-
field.value = (_a = field.initialValue) != null ? _a : null;
|
|
158
|
-
}
|
|
159
|
-
});
|
|
149
|
+
formModel.reset(path);
|
|
160
150
|
},
|
|
161
151
|
async queryWidget(key) {
|
|
162
152
|
return scrollbarRef.value ? await queryWidget(key, scrollbarRef.value, props.fieldList || []) : null;
|
|
@@ -8,7 +8,7 @@ import '../../../index.js';
|
|
|
8
8
|
import '@formily/path';
|
|
9
9
|
import '@vue/shared';
|
|
10
10
|
import 'date-fns';
|
|
11
|
-
import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
|
|
11
|
+
import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema.js';
|
|
12
12
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
13
13
|
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
14
14
|
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -203,6 +203,6 @@ const script = defineComponent({
|
|
|
203
203
|
});
|
|
204
204
|
const SEARCH_CASCADE = connect(script, mapProps({
|
|
205
205
|
dataSource: "options"
|
|
206
|
-
}, assignUpdateValue));
|
|
206
|
+
}, assignUpdateValue, assignValueBindKey));
|
|
207
207
|
|
|
208
208
|
export { SEARCH_CASCADE };
|
|
@@ -3,7 +3,7 @@ import '@formily/path';
|
|
|
3
3
|
import '@vue/shared';
|
|
4
4
|
import 'lodash-es';
|
|
5
5
|
import 'date-fns';
|
|
6
|
-
import { assignUpdateValue } from '../../utils/schema.js';
|
|
6
|
+
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
|
|
7
7
|
import { connect, mapProps } from '@formily/vue';
|
|
8
8
|
import { NCheckboxGroup, NSpace, NCheckbox } from 'naive-ui';
|
|
9
9
|
|
|
@@ -40,6 +40,6 @@ const script = defineComponent({
|
|
|
40
40
|
});
|
|
41
41
|
const CHECKBOX = connect(script, mapProps({
|
|
42
42
|
dataSource: "options"
|
|
43
|
-
}, assignUpdateValue));
|
|
43
|
+
}, assignUpdateValue, assignValueBindKey));
|
|
44
44
|
|
|
45
45
|
export { CHECKBOX };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, inject, createVNode } from 'vue';
|
|
2
|
-
import { isNumber } from 'lodash-es';
|
|
1
|
+
import { defineComponent, ref, computed, watch, inject, createVNode } from 'vue';
|
|
2
|
+
import { isNumber, isArray } from 'lodash-es';
|
|
3
3
|
import '../../../index.js';
|
|
4
4
|
import { useField, RecursionField, connect } from '@formily/vue';
|
|
5
5
|
import { NButton, NIcon } from 'naive-ui';
|
|
@@ -43,6 +43,13 @@ const script = defineComponent({
|
|
|
43
43
|
return 0;
|
|
44
44
|
return ~~props.maxGroupNum;
|
|
45
45
|
});
|
|
46
|
+
watch(() => props.value, (value) => {
|
|
47
|
+
if (!isArray(value))
|
|
48
|
+
return;
|
|
49
|
+
currentGroupNum.value = Math.min(Math.max(value.length, 1), maxGroupNum.value);
|
|
50
|
+
}, {
|
|
51
|
+
immediate: true
|
|
52
|
+
});
|
|
46
53
|
function addGroup() {
|
|
47
54
|
currentGroupNum.value++;
|
|
48
55
|
}
|
|
@@ -8,7 +8,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
|
8
8
|
import '@formily/path';
|
|
9
9
|
import '@vue/shared';
|
|
10
10
|
import 'lodash-es';
|
|
11
|
-
import { assignUpdateValue } from '../../utils/schema.js';
|
|
11
|
+
import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
|
|
12
12
|
|
|
13
13
|
const script = defineComponent({
|
|
14
14
|
props: {
|
|
@@ -112,6 +112,6 @@ const script = defineComponent({
|
|
|
112
112
|
}), null);
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
const DATE = connect(script, mapProps(assignUpdateValue));
|
|
115
|
+
const DATE = connect(script, mapProps(assignUpdateValue, assignValueBindKey));
|
|
116
116
|
|
|
117
117
|
export { DATE };
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
export declare const INPUT: import("vue").DefineComponent<{
|
|
2
|
+
value: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
2
5
|
prefix: {
|
|
3
6
|
type: StringConstructor;
|
|
4
7
|
};
|
|
5
8
|
suffix: {
|
|
6
9
|
type: StringConstructor;
|
|
7
10
|
};
|
|
8
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
11
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
value: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
9
15
|
prefix: {
|
|
10
16
|
type: StringConstructor;
|
|
11
17
|
};
|
|
12
18
|
suffix: {
|
|
13
19
|
type: StringConstructor;
|
|
14
20
|
};
|
|
15
|
-
}
|
|
21
|
+
}>> & {
|
|
22
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}, {}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
+
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
2
3
|
import { createInputSlot } from '../../utils/index.js';
|
|
3
4
|
import { connect, mapProps } from '@formily/vue';
|
|
4
5
|
import { NInput } from 'naive-ui';
|
|
@@ -7,6 +8,9 @@ import { assignUpdateValue } from '../../utils/schema.js';
|
|
|
7
8
|
const script = defineComponent({
|
|
8
9
|
name: "FormInput",
|
|
9
10
|
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: String
|
|
13
|
+
},
|
|
10
14
|
prefix: {
|
|
11
15
|
type: String
|
|
12
16
|
},
|
|
@@ -14,10 +18,22 @@ const script = defineComponent({
|
|
|
14
18
|
type: String
|
|
15
19
|
}
|
|
16
20
|
},
|
|
17
|
-
|
|
21
|
+
emits: ["update:value"],
|
|
22
|
+
setup(props, {
|
|
23
|
+
emit
|
|
24
|
+
}) {
|
|
25
|
+
const valueRef = computed({
|
|
26
|
+
get: () => props.value,
|
|
27
|
+
set: (v) => emit("update:value", v)
|
|
28
|
+
});
|
|
29
|
+
const key = useCommonInjection().injectValueBindKey(valueRef);
|
|
18
30
|
const _slots = createInputSlot(props);
|
|
19
31
|
return () => {
|
|
20
|
-
return createVNode(NInput,
|
|
32
|
+
return createVNode(NInput, {
|
|
33
|
+
"key": key.value,
|
|
34
|
+
"value": valueRef.value,
|
|
35
|
+
"onUpdate:value": ($event) => valueRef.value = $event
|
|
36
|
+
}, _slots.value);
|
|
21
37
|
};
|
|
22
38
|
}
|
|
23
39
|
});
|