cnhis-design-vue 3.1.29-beta.6 → 3.1.29
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/field-set/src/FieldSet.js +59 -37
- package/es/components/form-config/index.d.ts +20 -2
- package/es/components/form-config/src/FormConfig.js +24 -19
- package/es/components/form-config/src/FormConfig.vue.d.ts +20 -2
- package/es/components/form-config/src/components/FormConfigEdit.js +9 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +14 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +7 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +3 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +2 -0
- package/es/components/keyboard/index.d.ts +4 -0
- package/es/components/keyboard/src/Keyboard.js +3 -2
- package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -0
- package/es/components/keyboard/src/components/InputNumber.js +4 -3
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +4 -0
- package/es/components/keyboard/src/utils/index.d.ts +1 -0
- package/es/components/keyboard/src/utils/index.js +5 -0
- package/package.json +2 -2
|
@@ -20,35 +20,37 @@ const _hoisted_7 = {
|
|
|
20
20
|
class: "width-show"
|
|
21
21
|
};
|
|
22
22
|
const _hoisted_8 = { class: "width-show" };
|
|
23
|
-
const _hoisted_9 =
|
|
24
|
-
const _hoisted_10 = /* @__PURE__ */ createElementVNode("span", { class: "width-
|
|
25
|
-
const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", { class: "width-
|
|
26
|
-
const _hoisted_12 =
|
|
27
|
-
const _hoisted_13 =
|
|
28
|
-
const _hoisted_14 =
|
|
23
|
+
const _hoisted_9 = { class: "width-show" };
|
|
24
|
+
const _hoisted_10 = /* @__PURE__ */ createElementVNode("span", { class: "width-showed" }, "\u56FA\u5B9A", -1);
|
|
25
|
+
const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", { class: "width-word" }, "\u81EA\u5B9A\u4E49\u6807\u9898", -1);
|
|
26
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", { class: "width-showed" }, "\u5217\u5BBD", -1);
|
|
27
|
+
const _hoisted_13 = ["onClick"];
|
|
28
|
+
const _hoisted_14 = { class: "width-show drag-icon-wrap" };
|
|
29
|
+
const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", {
|
|
29
30
|
class: "iconfont icon-a-menzhenyishengzhanxitongtubiaotuozhuai",
|
|
30
31
|
style: { "color": "#000" }
|
|
31
32
|
}, null, -1);
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
33
|
+
const _hoisted_16 = /* @__PURE__ */ createElementVNode("span", null, "\u62D6\u62FD\u8C03\u6574\u987A\u5E8F", -1);
|
|
34
|
+
const _hoisted_17 = /* @__PURE__ */ createElementVNode("span", { style: { "width": "14px", "margin-right": "6px" } }, null, -1);
|
|
35
|
+
const _hoisted_18 = { class: "width-show" };
|
|
36
|
+
const _hoisted_19 = {
|
|
36
37
|
key: 0,
|
|
37
38
|
class: "width-show"
|
|
38
39
|
};
|
|
39
|
-
const
|
|
40
|
+
const _hoisted_20 = {
|
|
40
41
|
key: 1,
|
|
41
42
|
class: "width-show"
|
|
42
43
|
};
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const _hoisted_22 = { class: "width-word" };
|
|
44
|
+
const _hoisted_21 = { class: "width-show" };
|
|
45
|
+
const _hoisted_22 = { class: "width-show" };
|
|
46
46
|
const _hoisted_23 = { class: "width-showed" };
|
|
47
|
-
const _hoisted_24 = {
|
|
47
|
+
const _hoisted_24 = { class: "width-word" };
|
|
48
|
+
const _hoisted_25 = { class: "width-showed" };
|
|
49
|
+
const _hoisted_26 = {
|
|
48
50
|
key: 0,
|
|
49
51
|
class: "check-options"
|
|
50
52
|
};
|
|
51
|
-
const
|
|
53
|
+
const _hoisted_27 = { class: "btn-operate" };
|
|
52
54
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
53
55
|
__name: "FieldSet",
|
|
54
56
|
props: {
|
|
@@ -117,6 +119,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
117
119
|
if (!Reflect.has(item, "alias")) {
|
|
118
120
|
item.alias = "";
|
|
119
121
|
}
|
|
122
|
+
if (!Reflect.has(item, "bold")) {
|
|
123
|
+
item.bold = false;
|
|
124
|
+
}
|
|
120
125
|
});
|
|
121
126
|
});
|
|
122
127
|
return result;
|
|
@@ -126,8 +131,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
126
131
|
isCustomSearch: true,
|
|
127
132
|
clickItem: {},
|
|
128
133
|
fields: [],
|
|
129
|
-
widthShow: "
|
|
130
|
-
widthLarge: "
|
|
134
|
+
widthShow: "9%",
|
|
135
|
+
widthLarge: "19%"
|
|
131
136
|
});
|
|
132
137
|
const leftStyle = (ele) => {
|
|
133
138
|
return {
|
|
@@ -155,6 +160,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
155
160
|
title: item.alias,
|
|
156
161
|
fixed: item.fixedWay,
|
|
157
162
|
minWidth: item.columnWidth,
|
|
163
|
+
bold: item.bold,
|
|
158
164
|
...props.isEdit ? {
|
|
159
165
|
required: item.required,
|
|
160
166
|
editable: item.editable
|
|
@@ -204,8 +210,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
204
210
|
}
|
|
205
211
|
function setWidth() {
|
|
206
212
|
if (props.isEdit) {
|
|
207
|
-
state.widthShow = "
|
|
208
|
-
state.widthLarge = "
|
|
213
|
+
state.widthShow = "8%";
|
|
214
|
+
state.widthLarge = "13%";
|
|
209
215
|
}
|
|
210
216
|
}
|
|
211
217
|
watch(
|
|
@@ -281,12 +287,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
281
287
|
}, null, 8, ["checked"])) : createCommentVNode("v-if", true),
|
|
282
288
|
createTextVNode(" \u6392\u5E8F ")
|
|
283
289
|
]),
|
|
290
|
+
createElementVNode("span", _hoisted_9, [
|
|
291
|
+
createVNode(unref(NCheckbox), {
|
|
292
|
+
checked: calculateCheck("bold"),
|
|
293
|
+
"onUpdate:checked": _cache[4] || (_cache[4] = ($event) => handleAllCheck($event, "bold"))
|
|
294
|
+
}, null, 8, ["checked"]),
|
|
295
|
+
createTextVNode(" \u52A0\u7C97 ")
|
|
296
|
+
]),
|
|
284
297
|
createCommentVNode(" \u56FA\u5B9A "),
|
|
285
|
-
_hoisted_9,
|
|
286
|
-
createCommentVNode(" \u81EA\u5B9A\u4E49\u6807\u9898 "),
|
|
287
298
|
_hoisted_10,
|
|
299
|
+
createCommentVNode(" \u81EA\u5B9A\u4E49\u6807\u9898 "),
|
|
300
|
+
_hoisted_11,
|
|
288
301
|
createCommentVNode(" \u5217\u5BBD "),
|
|
289
|
-
|
|
302
|
+
_hoisted_12
|
|
290
303
|
], 2),
|
|
291
304
|
createElementVNode("div", {
|
|
292
305
|
ref: "setShow",
|
|
@@ -305,13 +318,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
305
318
|
style: normalizeStyle(leftStyle(element)),
|
|
306
319
|
onClick: ($event) => handleFieldClick(element)
|
|
307
320
|
}, [
|
|
308
|
-
createElementVNode("span",
|
|
321
|
+
createElementVNode("span", _hoisted_14, [
|
|
309
322
|
createVNode(unref(NTooltip), { trigger: "hover" }, {
|
|
310
323
|
trigger: withCtx(() => [
|
|
311
|
-
|
|
324
|
+
_hoisted_15
|
|
312
325
|
]),
|
|
313
326
|
default: withCtx(() => [
|
|
314
|
-
|
|
327
|
+
_hoisted_16
|
|
315
328
|
]),
|
|
316
329
|
_: 1
|
|
317
330
|
})
|
|
@@ -320,11 +333,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
320
333
|
createElementVNode("span", {
|
|
321
334
|
class: normalizeClass(["width-large title-item", { blue: element.extraField }])
|
|
322
335
|
}, [
|
|
323
|
-
|
|
336
|
+
_hoisted_17,
|
|
324
337
|
createElementVNode("span", null, toDisplayString(element.title), 1)
|
|
325
338
|
], 2),
|
|
326
339
|
createCommentVNode(" \u663E\u793A "),
|
|
327
|
-
createElementVNode("span",
|
|
340
|
+
createElementVNode("span", _hoisted_18, [
|
|
328
341
|
withDirectives(createVNode(unref(NCheckbox), {
|
|
329
342
|
checked: element.show,
|
|
330
343
|
"onUpdate:checked": ($event) => element.show = $event
|
|
@@ -333,7 +346,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
333
346
|
])
|
|
334
347
|
]),
|
|
335
348
|
createCommentVNode(" \u662F\u5426\u53EF\u7F16\u8F91 "),
|
|
336
|
-
__props.isEdit ? (openBlock(), createElementBlock("span",
|
|
349
|
+
__props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_19, [
|
|
337
350
|
withDirectives(createVNode(unref(NCheckbox), {
|
|
338
351
|
disabled: element.editableDisable,
|
|
339
352
|
checked: element.editable,
|
|
@@ -343,7 +356,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
343
356
|
])
|
|
344
357
|
])) : createCommentVNode("v-if", true),
|
|
345
358
|
createCommentVNode(" \u662F\u5426\u5FC5\u586B "),
|
|
346
|
-
__props.isEdit ? (openBlock(), createElementBlock("span",
|
|
359
|
+
__props.isEdit ? (openBlock(), createElementBlock("span", _hoisted_20, [
|
|
347
360
|
withDirectives(createVNode(unref(NCheckbox), {
|
|
348
361
|
disabled: element.requiredDisable,
|
|
349
362
|
checked: element.required,
|
|
@@ -353,7 +366,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
353
366
|
])
|
|
354
367
|
])) : createCommentVNode("v-if", true),
|
|
355
368
|
createCommentVNode(" \u6392\u5E8F "),
|
|
356
|
-
createElementVNode("span",
|
|
369
|
+
createElementVNode("span", _hoisted_21, [
|
|
357
370
|
withDirectives(createVNode(unref(NCheckbox), {
|
|
358
371
|
checked: element.sort,
|
|
359
372
|
"onUpdate:checked": ($event) => element.sort = $event,
|
|
@@ -362,8 +375,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
362
375
|
[vShow, element.id != "0001"]
|
|
363
376
|
])
|
|
364
377
|
]),
|
|
378
|
+
createCommentVNode(" \u52A0\u7C97 "),
|
|
379
|
+
createElementVNode("span", _hoisted_22, [
|
|
380
|
+
withDirectives(createVNode(unref(NCheckbox), {
|
|
381
|
+
checked: element.bold,
|
|
382
|
+
"onUpdate:checked": ($event) => element.bold = $event
|
|
383
|
+
}, null, 8, ["checked", "onUpdate:checked"]), [
|
|
384
|
+
[vShow, element.id != "0001"]
|
|
385
|
+
])
|
|
386
|
+
]),
|
|
365
387
|
createCommentVNode(" \u56FA\u5B9A "),
|
|
366
|
-
createElementVNode("span",
|
|
388
|
+
createElementVNode("span", _hoisted_23, [
|
|
367
389
|
createVNode(unref(NSelect), {
|
|
368
390
|
value: element.fixedWay,
|
|
369
391
|
"onUpdate:value": ($event) => element.fixedWay = $event,
|
|
@@ -372,7 +394,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
372
394
|
}, null, 8, ["value", "onUpdate:value"])
|
|
373
395
|
]),
|
|
374
396
|
createCommentVNode(" \u81EA\u5B9A\u4E49\u6807\u9898 "),
|
|
375
|
-
createElementVNode("span",
|
|
397
|
+
createElementVNode("span", _hoisted_24, [
|
|
376
398
|
withDirectives(createVNode(unref(NInput), {
|
|
377
399
|
value: element.alias,
|
|
378
400
|
"onUpdate:value": ($event) => element.alias = $event,
|
|
@@ -382,21 +404,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
382
404
|
])
|
|
383
405
|
]),
|
|
384
406
|
createCommentVNode(" \u5217\u5BBD "),
|
|
385
|
-
createElementVNode("span",
|
|
407
|
+
createElementVNode("span", _hoisted_25, [
|
|
386
408
|
createVNode(unref(NInputNumber), {
|
|
387
409
|
value: element.columnWidth,
|
|
388
410
|
"onUpdate:value": ($event) => element.columnWidth = $event,
|
|
389
411
|
style: { width: "120px" }
|
|
390
412
|
}, null, 8, ["value", "onUpdate:value"])
|
|
391
413
|
])
|
|
392
|
-
], 12,
|
|
414
|
+
], 12, _hoisted_13)) : createCommentVNode("v-if", true)
|
|
393
415
|
]),
|
|
394
416
|
_: 1
|
|
395
417
|
}, 8, ["list"])
|
|
396
418
|
], 2)
|
|
397
419
|
]),
|
|
398
|
-
props.footerFlag ? (openBlock(), createElementBlock("div",
|
|
399
|
-
createElementVNode("div",
|
|
420
|
+
props.footerFlag ? (openBlock(), createElementBlock("div", _hoisted_26, [
|
|
421
|
+
createElementVNode("div", _hoisted_27, [
|
|
400
422
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
401
423
|
createVNode(unref(NPopconfirm), { onPositiveClick: reset }, {
|
|
402
424
|
trigger: withCtx(() => [
|
|
@@ -17,6 +17,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
17
17
|
type: import("vue").PropType<import("./src/types").FormConfigTextFormatter>;
|
|
18
18
|
};
|
|
19
19
|
}>> & {}>>;
|
|
20
|
+
uuid: string;
|
|
20
21
|
getCommonConfig: () => {
|
|
21
22
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
22
23
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -907,7 +908,19 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
907
908
|
required: true;
|
|
908
909
|
};
|
|
909
910
|
}>>, {}>;
|
|
910
|
-
FormConfigEdit: import("vue").DefineComponent<{
|
|
911
|
+
FormConfigEdit: import("vue").DefineComponent<{
|
|
912
|
+
uuid: {
|
|
913
|
+
type: StringConstructor;
|
|
914
|
+
required: true;
|
|
915
|
+
};
|
|
916
|
+
}, {
|
|
917
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
918
|
+
uuid: {
|
|
919
|
+
type: StringConstructor;
|
|
920
|
+
required: true;
|
|
921
|
+
};
|
|
922
|
+
}>> & {}>>;
|
|
923
|
+
wrapperSelector: import("vue").ComputedRef<string>;
|
|
911
924
|
key: import("vue").Ref<number>;
|
|
912
925
|
formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
|
|
913
926
|
currentActiveField: import("vue").Ref<import("../../../es/shared/types").UndefinedAble<import("./src/types").FormConfigItem>>;
|
|
@@ -3259,7 +3272,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3259
3272
|
enterToNextWidget: boolean;
|
|
3260
3273
|
}>;
|
|
3261
3274
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
3262
|
-
},
|
|
3275
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3276
|
+
uuid: {
|
|
3277
|
+
type: StringConstructor;
|
|
3278
|
+
required: true;
|
|
3279
|
+
};
|
|
3280
|
+
}>>, {}>;
|
|
3263
3281
|
FormConfigMaterialItem: import("vue").DefineComponent<{
|
|
3264
3282
|
fieldItem: {
|
|
3265
3283
|
type: import("vue").PropType<import("./src/types").FormConfigItem>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, provide, toRaw, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode,
|
|
1
|
+
import { defineComponent, ref, provide, toRaw, openBlock, createElementBlock, normalizeStyle, unref, createElementVNode, createVNode, mergeProps, withCtx, createTextVNode } from 'vue';
|
|
2
|
+
import { uuidGenerator } from '../../../shared/utils/index.js';
|
|
2
3
|
import { cloneDeep, isFunction } from 'lodash-es';
|
|
3
4
|
import draggableComponent from '../../../shared/components/VueDraggable/src/vuedraggable.js';
|
|
4
5
|
import FormConfigCreator from './components/FormConfigCreator.js';
|
|
@@ -13,13 +14,14 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
|
13
14
|
import './utils/index.js';
|
|
14
15
|
import { useSortableConfig } from './hooks/useSortalbeConfig.js';
|
|
15
16
|
|
|
16
|
-
const _hoisted_1 =
|
|
17
|
-
const _hoisted_2 =
|
|
18
|
-
const _hoisted_3 = { class: "form-
|
|
19
|
-
const _hoisted_4 = { class: "form-
|
|
20
|
-
const _hoisted_5 = { class: "form-
|
|
21
|
-
const _hoisted_6 =
|
|
22
|
-
const _hoisted_7 = { class: "form-
|
|
17
|
+
const _hoisted_1 = ["id"];
|
|
18
|
+
const _hoisted_2 = { class: "form-config__material" };
|
|
19
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("header", { class: "form-config__materialHeader" }, "\u7269\u6599\u533A", -1);
|
|
20
|
+
const _hoisted_4 = { class: "form-config__displayWrapper" };
|
|
21
|
+
const _hoisted_5 = { class: "form-config__displayHeader" };
|
|
22
|
+
const _hoisted_6 = { class: "form-config__config" };
|
|
23
|
+
const _hoisted_7 = /* @__PURE__ */ createElementVNode("header", { class: "form-config__configHeader" }, "\u914D\u7F6E\u533A", -1);
|
|
24
|
+
const _hoisted_8 = { class: "form-config__configContent" };
|
|
23
25
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
26
|
__name: "FormConfig",
|
|
25
27
|
props: {
|
|
@@ -28,6 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
30
|
},
|
|
29
31
|
setup(__props, { expose }) {
|
|
30
32
|
const props = __props;
|
|
33
|
+
const uuid = uuidGenerator();
|
|
31
34
|
const { getCommonConfig } = useSortableConfig();
|
|
32
35
|
const fieldListRef = ref([]);
|
|
33
36
|
provide(InjectionFieldList, fieldListRef);
|
|
@@ -73,10 +76,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
76
|
return (_ctx, _cache) => {
|
|
74
77
|
return openBlock(), createElementBlock("section", {
|
|
75
78
|
class: "form-config",
|
|
76
|
-
style: normalizeStyle({ "--max-height": __props.maxHeight })
|
|
79
|
+
style: normalizeStyle({ "--max-height": __props.maxHeight }),
|
|
80
|
+
id: unref(uuid)
|
|
77
81
|
}, [
|
|
78
|
-
createElementVNode("section",
|
|
79
|
-
|
|
82
|
+
createElementVNode("section", _hoisted_2, [
|
|
83
|
+
_hoisted_3,
|
|
80
84
|
createVNode(unref(draggableComponent), mergeProps(unref(getCommonConfig)(), {
|
|
81
85
|
class: "form-config__materialContent",
|
|
82
86
|
modelValue: materialListRef.value,
|
|
@@ -88,8 +92,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
92
|
_: 1
|
|
89
93
|
}, 16, ["modelValue"])
|
|
90
94
|
]),
|
|
91
|
-
createElementVNode("section",
|
|
92
|
-
createElementVNode("header",
|
|
95
|
+
createElementVNode("section", _hoisted_4, [
|
|
96
|
+
createElementVNode("header", _hoisted_5, [
|
|
93
97
|
createTextVNode(" \u5E03\u5C40\u533A "),
|
|
94
98
|
createVNode(FormConfigCreator, { onSubmit: addItem })
|
|
95
99
|
]),
|
|
@@ -101,16 +105,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
105
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => fieldListRef.value = $event)
|
|
102
106
|
}, null, 8, ["group", "modelValue"])
|
|
103
107
|
]),
|
|
104
|
-
createElementVNode("section",
|
|
105
|
-
|
|
106
|
-
createElementVNode("section",
|
|
108
|
+
createElementVNode("section", _hoisted_6, [
|
|
109
|
+
_hoisted_7,
|
|
110
|
+
createElementVNode("section", _hoisted_8, [
|
|
107
111
|
createVNode(FormConfigEdit, {
|
|
108
112
|
ref_key: "formConfigEditRef",
|
|
109
|
-
ref: formConfigEditRef
|
|
110
|
-
|
|
113
|
+
ref: formConfigEditRef,
|
|
114
|
+
uuid: unref(uuid)
|
|
115
|
+
}, null, 8, ["uuid"])
|
|
111
116
|
])
|
|
112
117
|
])
|
|
113
|
-
],
|
|
118
|
+
], 12, _hoisted_1);
|
|
114
119
|
};
|
|
115
120
|
}
|
|
116
121
|
});
|
|
@@ -18,6 +18,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
type: PropType<FormConfigTextFormatter>;
|
|
19
19
|
};
|
|
20
20
|
}>> & {}>>;
|
|
21
|
+
uuid: string;
|
|
21
22
|
getCommonConfig: () => {
|
|
22
23
|
move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
|
|
23
24
|
onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
|
|
@@ -908,7 +909,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
908
909
|
required: true;
|
|
909
910
|
};
|
|
910
911
|
}>>, {}>;
|
|
911
|
-
FormConfigEdit: import("vue").DefineComponent<{
|
|
912
|
+
FormConfigEdit: import("vue").DefineComponent<{
|
|
913
|
+
uuid: {
|
|
914
|
+
type: StringConstructor;
|
|
915
|
+
required: true;
|
|
916
|
+
};
|
|
917
|
+
}, {
|
|
918
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
919
|
+
uuid: {
|
|
920
|
+
type: StringConstructor;
|
|
921
|
+
required: true;
|
|
922
|
+
};
|
|
923
|
+
}>> & {}>>;
|
|
924
|
+
wrapperSelector: import("vue").ComputedRef<string>;
|
|
912
925
|
key: import("vue").Ref<number>;
|
|
913
926
|
formRenderRef: import("vue").Ref<import("../..").FormRenderExpose | undefined>;
|
|
914
927
|
currentActiveField: import("vue").Ref<import("../../../../es/shared/types").UndefinedAble<FormConfigItem>>;
|
|
@@ -3260,7 +3273,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3260
3273
|
enterToNextWidget: boolean;
|
|
3261
3274
|
}>;
|
|
3262
3275
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
3263
|
-
},
|
|
3276
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3277
|
+
uuid: {
|
|
3278
|
+
type: StringConstructor;
|
|
3279
|
+
required: true;
|
|
3280
|
+
};
|
|
3281
|
+
}>>, {}>;
|
|
3264
3282
|
FormConfigMaterialItem: import("vue").DefineComponent<{
|
|
3265
3283
|
fieldItem: {
|
|
3266
3284
|
type: PropType<FormConfigItem>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, watch, toRaw, openBlock, createElementBlock, Fragment, createBlock, unref, createVNode, nextTick } from 'vue';
|
|
1
|
+
import { defineComponent, computed, 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
4
|
import '../../../../shared/components/VueDraggable/src/vuedraggable.js';
|
|
@@ -13,7 +13,10 @@ import FormRender from '../../../form-render/index.js';
|
|
|
13
13
|
|
|
14
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
15
|
__name: "FormConfigEdit",
|
|
16
|
+
props: { uuid: { type: String, required: true } },
|
|
16
17
|
setup(__props, { expose }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const wrapperSelector = computed(() => `#${props.uuid} .form-config__config`);
|
|
17
20
|
const key = ref(0);
|
|
18
21
|
const formRenderRef = ref();
|
|
19
22
|
const currentActiveField = inject(InjectionActiveFieldItem);
|
|
@@ -43,7 +46,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
46
|
}
|
|
44
47
|
prevOldField = field;
|
|
45
48
|
initialData.value = { editable: true, ...cloneDeep(toRaw(field)) };
|
|
46
|
-
fieldList.value = generateFieldListByFieldItem(field)
|
|
49
|
+
fieldList.value = generateFieldListByFieldItem(field).map((fieldItem) => {
|
|
50
|
+
return { ...fieldItem, componentProps: { to: wrapperSelector.value } };
|
|
51
|
+
});
|
|
47
52
|
key.value++;
|
|
48
53
|
},
|
|
49
54
|
{ immediate: true }
|
|
@@ -75,13 +80,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
80
|
show: showModal.value,
|
|
76
81
|
"onUpdate:show": _cache[0] || (_cache[0] = ($event) => showModal.value = $event),
|
|
77
82
|
preset: "dialog",
|
|
83
|
+
to: unref(wrapperSelector),
|
|
78
84
|
"close-on-esc": false,
|
|
79
85
|
"mask-closable": false,
|
|
80
86
|
closable: false,
|
|
81
87
|
title: "\u5B58\u5728\u586B\u5199\u9519\u8BEF\u7684\u5B57\u6BB5",
|
|
82
88
|
"positive-text": "\u7EE7\u7EED\u7F16\u8F91",
|
|
83
89
|
onPositiveClick
|
|
84
|
-
}, null, 8, ["show"])
|
|
90
|
+
}, null, 8, ["show", "to"])
|
|
85
91
|
], 64);
|
|
86
92
|
};
|
|
87
93
|
}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { FieldItem, FormChangePayload, FormRenderExpose } from '../../../../../es/components/form-render';
|
|
2
2
|
import { FormConfigItem } from '../../../../../es/components/index';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
uuid: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
uuid: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & {}>>;
|
|
15
|
+
wrapperSelector: import("vue").ComputedRef<string>;
|
|
4
16
|
key: import("vue").Ref<number>;
|
|
5
17
|
formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
|
|
6
18
|
currentActiveField: import("vue").Ref<import("../../../../../es/shared/types").UndefinedAble<FormConfigItem>>;
|
|
@@ -2352,5 +2364,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2352
2364
|
enterToNextWidget: boolean;
|
|
2353
2365
|
}>;
|
|
2354
2366
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
2355
|
-
},
|
|
2367
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2368
|
+
uuid: {
|
|
2369
|
+
type: StringConstructor;
|
|
2370
|
+
required: true;
|
|
2371
|
+
};
|
|
2372
|
+
}>>, {}>;
|
|
2356
2373
|
export default _default;
|
|
@@ -2,6 +2,10 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
|
|
3
3
|
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
value: {
|
|
6
|
+
type: PropType<string | number | (string | number)[]>;
|
|
7
|
+
default: undefined;
|
|
8
|
+
};
|
|
5
9
|
column: {
|
|
6
10
|
type: PropType<IhoTableFieldItem>;
|
|
7
11
|
required: true;
|
|
@@ -14,7 +18,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
18
|
type: NumberConstructor;
|
|
15
19
|
required: true;
|
|
16
20
|
};
|
|
17
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
21
|
+
}, () => 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<{
|
|
22
|
+
value: {
|
|
23
|
+
type: PropType<string | number | (string | number)[]>;
|
|
24
|
+
default: undefined;
|
|
25
|
+
};
|
|
18
26
|
column: {
|
|
19
27
|
type: PropType<IhoTableFieldItem>;
|
|
20
28
|
required: true;
|
|
@@ -27,5 +35,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
35
|
type: NumberConstructor;
|
|
28
36
|
required: true;
|
|
29
37
|
};
|
|
30
|
-
}
|
|
38
|
+
}>> & {
|
|
39
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
value: string | number | (string | number)[];
|
|
42
|
+
}>;
|
|
31
43
|
export default _default;
|
|
@@ -10,6 +10,10 @@ var EditSelect = defineComponent({
|
|
|
10
10
|
NSelect
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
|
+
value: {
|
|
14
|
+
type: [Array, String, Number],
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
13
17
|
column: {
|
|
14
18
|
type: Object,
|
|
15
19
|
required: true
|
|
@@ -23,6 +27,7 @@ var EditSelect = defineComponent({
|
|
|
23
27
|
required: true
|
|
24
28
|
}
|
|
25
29
|
},
|
|
30
|
+
emits: ["update:value"],
|
|
26
31
|
setup(props, {
|
|
27
32
|
attrs,
|
|
28
33
|
slots,
|
|
@@ -34,6 +39,7 @@ var EditSelect = defineComponent({
|
|
|
34
39
|
isShow
|
|
35
40
|
} = useCommon();
|
|
36
41
|
function onUpdateValue(value) {
|
|
42
|
+
emit("update:value", value);
|
|
37
43
|
globEmit("formChange", {
|
|
38
44
|
value,
|
|
39
45
|
row: props.row,
|
|
@@ -46,8 +52,7 @@ var EditSelect = defineComponent({
|
|
|
46
52
|
"show": isShow.value,
|
|
47
53
|
"onUpdate:show": ($event) => isShow.value = $event
|
|
48
54
|
}, attrs, {
|
|
49
|
-
"value": props.
|
|
50
|
-
"onUpdate:value": ($event) => props.row[props.column.field] = $event,
|
|
55
|
+
"value": props.value,
|
|
51
56
|
"consistentMenuWidth": false,
|
|
52
57
|
"clearable": true,
|
|
53
58
|
"filterable": true,
|
|
@@ -29,7 +29,9 @@ function selectRendererPlugin() {
|
|
|
29
29
|
return [createVNode(EditSelect, mergeProps((props == null ? void 0 : props.componentProps) || {}, {
|
|
30
30
|
"column": column,
|
|
31
31
|
"row": row,
|
|
32
|
-
"index": $rowIndex
|
|
32
|
+
"index": $rowIndex,
|
|
33
|
+
"value": row[column.field],
|
|
34
|
+
"onUpdate:value": ($event) => row[column.field] = $event
|
|
33
35
|
}), null)];
|
|
34
36
|
}
|
|
35
37
|
});
|
|
@@ -50,6 +50,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
50
50
|
InputNumber: import("vue").DefineComponent<{
|
|
51
51
|
modelValue: {
|
|
52
52
|
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
53
54
|
};
|
|
54
55
|
integer: {
|
|
55
56
|
type: BooleanConstructor;
|
|
@@ -59,6 +60,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
59
60
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
60
61
|
modelValue: {
|
|
61
62
|
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
62
64
|
};
|
|
63
65
|
integer: {
|
|
64
66
|
type: BooleanConstructor;
|
|
@@ -79,6 +81,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
79
81
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
82
|
modelValue: {
|
|
81
83
|
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
82
85
|
};
|
|
83
86
|
integer: {
|
|
84
87
|
type: BooleanConstructor;
|
|
@@ -87,6 +90,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
87
90
|
}>> & {
|
|
88
91
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
89
92
|
}, {
|
|
93
|
+
modelValue: string;
|
|
90
94
|
integer: boolean;
|
|
91
95
|
}>;
|
|
92
96
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "keydown")[], "change" | "keydown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -3,6 +3,7 @@ import { NPopover, NInputNumber, NSpace, NIcon } from 'naive-ui';
|
|
|
3
3
|
import { ArrowUndoSharp, Close, GitCompareOutline } from '@vicons/ionicons5';
|
|
4
4
|
import InputNumber from './components/InputNumber.js';
|
|
5
5
|
import { useRefHistory } from '@vueuse/core';
|
|
6
|
+
import { getNumber } from './utils/index.js';
|
|
6
7
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
7
8
|
|
|
8
9
|
const _hoisted_1 = { class: "c-keyboard" };
|
|
@@ -84,8 +85,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
85
|
denominatorValue.value = value2.toString();
|
|
85
86
|
}
|
|
86
87
|
function calculateFraction() {
|
|
87
|
-
|
|
88
|
-
inputValue.value = (
|
|
88
|
+
const value2 = getNumber(integerValue.value) + getNumber(numeratorValue.value) / getNumber(denominatorValue.value);
|
|
89
|
+
inputValue.value = (isNaN(value2) || Object.is(Infinity, value2) ? "" : value2).toString();
|
|
89
90
|
}
|
|
90
91
|
return (_ctx, _cache) => {
|
|
91
92
|
return !unref(isDefault) ? (openBlock(), createBlock(unref(NPopover), {
|
|
@@ -50,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
50
|
InputNumber: import("vue").DefineComponent<{
|
|
51
51
|
modelValue: {
|
|
52
52
|
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
53
54
|
};
|
|
54
55
|
integer: {
|
|
55
56
|
type: BooleanConstructor;
|
|
@@ -59,6 +60,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
60
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
60
61
|
modelValue: {
|
|
61
62
|
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
62
64
|
};
|
|
63
65
|
integer: {
|
|
64
66
|
type: BooleanConstructor;
|
|
@@ -79,6 +81,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
81
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
80
82
|
modelValue: {
|
|
81
83
|
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
82
85
|
};
|
|
83
86
|
integer: {
|
|
84
87
|
type: BooleanConstructor;
|
|
@@ -87,6 +90,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
90
|
}>> & {
|
|
88
91
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
89
92
|
}, {
|
|
93
|
+
modelValue: string;
|
|
90
94
|
integer: boolean;
|
|
91
95
|
}>;
|
|
92
96
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "keydown")[], "change" | "keydown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode } from 'vue';
|
|
2
2
|
import { NInput, NSpace, NIcon } from 'naive-ui';
|
|
3
3
|
import { CaretUp, CaretDown } from '@vicons/ionicons5';
|
|
4
|
+
import { getNumber } from '../utils/index.js';
|
|
4
5
|
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
5
6
|
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "InputNumber",
|
|
8
9
|
props: {
|
|
9
|
-
modelValue: { type: String },
|
|
10
|
+
modelValue: { type: String, default: "" },
|
|
10
11
|
integer: { type: Boolean, default: false }
|
|
11
12
|
},
|
|
12
13
|
emits: ["update:modelValue"],
|
|
@@ -23,8 +24,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
24
|
return /^\d+\.?\d*$/.test(value);
|
|
24
25
|
}
|
|
25
26
|
function calculate(type) {
|
|
26
|
-
|
|
27
|
-
const newValue = type === "+" ?
|
|
27
|
+
const value = getNumber(props.modelValue);
|
|
28
|
+
const newValue = type === "+" ? value + 1 : value - 1;
|
|
28
29
|
emit("update:modelValue", newValue.toString());
|
|
29
30
|
}
|
|
30
31
|
return (_ctx, _cache) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
modelValue: {
|
|
3
3
|
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
4
5
|
};
|
|
5
6
|
integer: {
|
|
6
7
|
type: BooleanConstructor;
|
|
@@ -10,6 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
11
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
11
12
|
modelValue: {
|
|
12
13
|
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
13
15
|
};
|
|
14
16
|
integer: {
|
|
15
17
|
type: BooleanConstructor;
|
|
@@ -30,6 +32,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
32
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
33
|
modelValue: {
|
|
32
34
|
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
33
36
|
};
|
|
34
37
|
integer: {
|
|
35
38
|
type: BooleanConstructor;
|
|
@@ -38,6 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
41
|
}>> & {
|
|
39
42
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
40
43
|
}, {
|
|
44
|
+
modelValue: string;
|
|
41
45
|
integer: boolean;
|
|
42
46
|
}>;
|
|
43
47
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getNumber(value: string): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.29
|
|
3
|
+
"version": "3.1.29",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "38a2c287facf3d0c4e719d3ab21bc305e1f44cb3"
|
|
65
65
|
}
|