cnhis-design-vue 3.1.14-beta.13 → 3.1.14-beta.16
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/node_modules/@formily/path/esm/contexts.js +22 -0
- package/es/node_modules/@formily/path/esm/destructor.js +124 -0
- package/es/node_modules/@formily/path/esm/index.js +579 -0
- package/es/node_modules/@formily/path/esm/matcher.js +199 -0
- package/es/node_modules/@formily/path/esm/parser.js +402 -0
- package/es/node_modules/@formily/path/esm/shared.js +73 -0
- package/es/node_modules/@formily/path/esm/tokenizer.js +287 -0
- package/es/node_modules/@formily/path/esm/tokens.js +240 -0
- package/es/node_modules/@formily/path/esm/types.js +17 -0
- package/es/packages/big-table/src/BigTable.vue.d.ts +13 -6
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/packages/big-table/src/utils.js +1 -0
- package/es/packages/big-table/style/index.css +133 -0
- package/es/packages/fabric-chart/src/FabricChart.js +0 -1
- package/es/packages/fabric-chart/src/hooks/useLeft.js +15 -4
- package/es/packages/form-render/src/components/renderer/combination.d.ts +6 -0
- package/es/packages/form-render/src/components/renderer/combination.js +53 -16
- package/es/packages/form-render/src/components/renderer/select.js +2 -4
- package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +1 -0
- package/es/packages/form-render/src/components/renderer/simpleComponent.js +4 -3
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +1 -0
- package/es/packages/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/packages/index.css +133 -0
- package/es/packages/shortcut-provider/src/types/index.d.ts +11 -9
- package/es/packages/shortcut-provider/src/utils/index.js +5 -5
- package/es/packages/shortcut-setter/index.d.ts +3248 -1486
- package/es/packages/shortcut-setter/src/ShortcutSetter.js +9 -5
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3248 -1486
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.js +24 -11
- package/es/packages/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +1700 -1661
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, openBlock, createElementBlock, createVNode, unref, withModifiers, createElementVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
1
|
+
import { defineComponent, computed, ref, openBlock, createElementBlock, createVNode, unref, withModifiers, createElementVNode, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
2
|
import { debounce, isString } from 'lodash-es';
|
|
3
3
|
import { useMessage, NInput, NButton, NPopconfirm } from 'naive-ui';
|
|
4
4
|
import { useShortcuts } from '../../../packages/shortcut-provider';
|
|
@@ -17,7 +17,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
value: null,
|
|
18
18
|
onChange: null,
|
|
19
19
|
onFocus: null,
|
|
20
|
-
fieldItem: null
|
|
20
|
+
fieldItem: null,
|
|
21
|
+
placeholder: { default: "\u70B9\u51FB\u8BBE\u7F6E\u5FEB\u6377\u952E" },
|
|
22
|
+
editPlaceholder: { default: "\u952E\u76D8\u6309\u4E0B\u8981\u8BBE\u7F6E\u7684\u5FEB\u6377\u952E\u7EC4\u5408" },
|
|
23
|
+
operation: { default: () => [] }
|
|
21
24
|
},
|
|
22
25
|
setup(__props) {
|
|
23
26
|
const props = __props;
|
|
@@ -34,9 +37,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
37
|
return transformKey2DisplaySignature((_b = (_a = shortcutItem.value) == null ? void 0 : _a.currentKeySignature) != null ? _b : "");
|
|
35
38
|
});
|
|
36
39
|
const state = ref(ShortcutInputState.STATIC);
|
|
40
|
+
const isEditState = computed(() => state.value === ShortcutInputState.STATIC);
|
|
41
|
+
function hasOperation(operation) {
|
|
42
|
+
return props.operation.includes(operation);
|
|
43
|
+
}
|
|
37
44
|
const currentEditShortcut = ref("");
|
|
38
45
|
const showContent = computed(() => {
|
|
39
|
-
return
|
|
46
|
+
return isEditState.value ? currentSetShortcut.value : currentEditShortcut.value;
|
|
47
|
+
});
|
|
48
|
+
const placeholder = computed(() => {
|
|
49
|
+
return isEditState.value ? props.placeholder : props.editPlaceholder;
|
|
40
50
|
});
|
|
41
51
|
function onInputFocus() {
|
|
42
52
|
state.value = ShortcutInputState.EDIT;
|
|
@@ -62,9 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
72
|
afterUpdate == null ? void 0 : afterUpdate();
|
|
63
73
|
}
|
|
64
74
|
}
|
|
65
|
-
const onInputKeyUp = debounce((event) => {
|
|
66
|
-
updateDecorator(() => update(props.fieldItem.val_key, event), () => event.target.blur());
|
|
67
|
-
}, 200, { leading: true, trailing: false });
|
|
75
|
+
const onInputKeyUp = debounce((event) => updateDecorator(() => update(props.fieldItem.val_key, event), () => event.target.blur()), 200, { leading: true, trailing: false });
|
|
68
76
|
function onStop() {
|
|
69
77
|
if (!shortcutItem.value)
|
|
70
78
|
return;
|
|
@@ -82,13 +90,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
90
|
ref: inputRef,
|
|
83
91
|
disabled: unref(disabledState),
|
|
84
92
|
value: unref(showContent),
|
|
93
|
+
placeholder: unref(placeholder),
|
|
85
94
|
onFocus: onInputFocus,
|
|
86
95
|
onBlur: onInputBlur,
|
|
87
96
|
onKeydown: withModifiers(unref(onInputKeyDown), ["prevent", "stop"]),
|
|
88
97
|
onKeyup: withModifiers(unref(onInputKeyUp), ["prevent", "stop"])
|
|
89
|
-
}, null, 8, ["disabled", "value", "onKeydown", "onKeyup"]),
|
|
98
|
+
}, null, 8, ["disabled", "value", "placeholder", "onKeydown", "onKeyup"]),
|
|
90
99
|
createElementVNode("section", _hoisted_2, [
|
|
91
|
-
|
|
100
|
+
hasOperation("disabled") ? (openBlock(), createBlock(unref(NButton), {
|
|
101
|
+
key: 0,
|
|
92
102
|
text: "",
|
|
93
103
|
onClick: onStop,
|
|
94
104
|
type: unref(disabledState) ? "info" : "warning"
|
|
@@ -97,8 +107,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
107
|
createTextVNode(toDisplayString(unref(disabledState) ? "\u542F\u7528" : "\u7981\u7528"), 1)
|
|
98
108
|
]),
|
|
99
109
|
_: 1
|
|
100
|
-
}, 8, ["type"]),
|
|
101
|
-
|
|
110
|
+
}, 8, ["type"])) : createCommentVNode("v-if", true),
|
|
111
|
+
hasOperation("reset") ? (openBlock(), createBlock(unref(NPopconfirm), {
|
|
112
|
+
key: 1,
|
|
113
|
+
onPositiveClick: onReset
|
|
114
|
+
}, {
|
|
102
115
|
trigger: withCtx(() => [
|
|
103
116
|
createVNode(unref(NButton), {
|
|
104
117
|
disabled: unref(disabledState),
|
|
@@ -116,7 +129,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
129
|
_hoisted_4
|
|
117
130
|
]),
|
|
118
131
|
_: 1
|
|
119
|
-
})
|
|
132
|
+
})) : createCommentVNode("v-if", true)
|
|
120
133
|
])
|
|
121
134
|
]);
|
|
122
135
|
};
|