cnhis-design-vue 3.1.31-beta.2 → 3.1.31-beta.4
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/button-print/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/components/{edit.js → EditFormat.js} +3 -3
- package/es/components/button-print/src/components/{edit.vue.d.ts → EditFormat.vue.d.ts} +0 -0
- package/es/components/button-print/src/components/IdentityVerification.js +2 -2
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/button-print/src/components/Preview.js +6 -0
- package/es/components/button-print/src/components/Preview.vue.d.ts +41 -0
- package/es/components/button-print/src/components/Preview.vue_vue_type_script_setup_true_lang.js +67 -0
- package/es/components/button-print/src/utils/browserPrint.d.ts +1 -1
- package/es/components/button-print/src/utils/browserPrint.js +1 -2
- package/es/components/button-print/src/utils/dialog.d.ts +5 -1
- package/es/components/button-print/src/utils/dialog.js +64 -22
- package/es/components/button-print/src/utils/print.d.ts +4 -1
- package/es/components/button-print/src/utils/print.js +11 -2
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +124 -66
- package/es/components/iho-table/src/IhoTable.js +2 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +124 -66
- package/es/components/iho-table/src/components/IhoTableColumn.js +14 -11
- package/es/components/iho-table/src/constants/index.d.ts +5 -3
- package/es/components/iho-table/src/constants/index.js +5 -3
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +64 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.js +17 -9
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -1
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +3 -2
- package/es/components/iho-table/src/plugins/filterPlugin/filter.js +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/index.js +14 -12
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +32 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +9 -11
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +11 -15
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +17 -24
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +11 -13
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +8 -11
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +13 -17
- package/es/components/iho-table/src/types/index.d.ts +6 -6
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -1
- package/es/components/iho-table/src/utils/index.d.ts +12 -2
- package/es/components/iho-table/src/utils/index.js +33 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/keyboard/index.d.ts +122 -64
- package/es/components/keyboard/src/Keyboard.js +109 -251
- package/es/components/keyboard/src/Keyboard.vue.d.ts +124 -66
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +6 -4
- package/es/components/keyboard/src/components/NumberPanel.js +206 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +118 -0
- package/es/components/search-cascader/src/components/SearchMenu.js +3 -3
- package/es/shared/utils/index.d.ts +1 -1
- package/es/shared/utils/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { FormValidationStatus } from 'naive-ui/es/form/src/interface';
|
|
1
3
|
declare const _default: import("vue").DefineComponent<{
|
|
2
4
|
modelValue: {
|
|
3
5
|
type: StringConstructor;
|
|
@@ -8,7 +10,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
10
|
default: boolean;
|
|
9
11
|
};
|
|
10
12
|
status: {
|
|
11
|
-
type:
|
|
13
|
+
type: PropType<FormValidationStatus>;
|
|
12
14
|
default: string;
|
|
13
15
|
};
|
|
14
16
|
}, {
|
|
@@ -22,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
24
|
default: boolean;
|
|
23
25
|
};
|
|
24
26
|
status: {
|
|
25
|
-
type:
|
|
27
|
+
type: PropType<FormValidationStatus>;
|
|
26
28
|
default: string;
|
|
27
29
|
};
|
|
28
30
|
}>> & {
|
|
@@ -48,7 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
50
|
default: boolean;
|
|
49
51
|
};
|
|
50
52
|
status: {
|
|
51
|
-
type:
|
|
53
|
+
type: PropType<FormValidationStatus>;
|
|
52
54
|
default: string;
|
|
53
55
|
};
|
|
54
56
|
}>> & {
|
|
@@ -56,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
58
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
57
59
|
}, {
|
|
58
60
|
modelValue: string;
|
|
59
|
-
status:
|
|
61
|
+
status: FormValidationStatus;
|
|
60
62
|
integer: boolean;
|
|
61
63
|
}>;
|
|
62
64
|
export default _default;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, Fragment, renderList, normalizeClass, toDisplayString, createBlock, createCommentVNode } from 'vue';
|
|
2
|
+
import { NSpace, NIcon } from 'naive-ui';
|
|
3
|
+
import { ArrowUndoSharp } from '@vicons/ionicons5';
|
|
4
|
+
import InputNumber from './InputNumber.js';
|
|
5
|
+
import { useRefHistory } from '@vueuse/core';
|
|
6
|
+
import { getNumber } from '../utils/index.js';
|
|
7
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
8
|
+
|
|
9
|
+
const _hoisted_1 = { class: "c-keyboard" };
|
|
10
|
+
const _hoisted_2 = { class: "left" };
|
|
11
|
+
const _hoisted_3 = { class: "keys" };
|
|
12
|
+
const _hoisted_4 = ["onClick"];
|
|
13
|
+
const _hoisted_5 = ["onClick"];
|
|
14
|
+
const _hoisted_6 = { class: "btns" };
|
|
15
|
+
const _hoisted_7 = ["onClick"];
|
|
16
|
+
const _hoisted_8 = { class: "inputs" };
|
|
17
|
+
const _hoisted_9 = { class: "inputs-right" };
|
|
18
|
+
const _hoisted_10 = /* @__PURE__ */ createElementVNode("hr", null, null, -1);
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
__name: "NumberPanel",
|
|
21
|
+
props: {
|
|
22
|
+
defaultValue: { type: Number },
|
|
23
|
+
mode: { type: String }
|
|
24
|
+
},
|
|
25
|
+
emits: ["change"],
|
|
26
|
+
setup(__props, { emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const NUMBERKEYS = "1234567890.";
|
|
29
|
+
const DAYS = [3, 7, 14, 30];
|
|
30
|
+
const isDay = computed(() => props.mode === "day");
|
|
31
|
+
const isDose = computed(() => props.mode === "dose");
|
|
32
|
+
const numberKeys = ref(NUMBERKEYS.split(""));
|
|
33
|
+
const days = ref(DAYS);
|
|
34
|
+
const doses = ref([2, 3, 4, 5, 6, 7, 8]);
|
|
35
|
+
const inputValue = ref("");
|
|
36
|
+
const integerValue = ref();
|
|
37
|
+
const numeratorValue = ref();
|
|
38
|
+
const denominatorValue = ref();
|
|
39
|
+
const inputValueStatus = ref("success");
|
|
40
|
+
const numeratorValueStatus = ref("success");
|
|
41
|
+
const denominatorValueStatus = ref("success");
|
|
42
|
+
if (props.defaultValue) {
|
|
43
|
+
inputValue.value = props.defaultValue.toString();
|
|
44
|
+
}
|
|
45
|
+
const { history, undo, redo } = useRefHistory(inputValue);
|
|
46
|
+
function keydown(key) {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
switch (key) {
|
|
49
|
+
case "Undo": {
|
|
50
|
+
undo();
|
|
51
|
+
setInputValueStatus();
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
case "Enter":
|
|
55
|
+
emit("change", +inputValue.value);
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
if (typeof key === "number") {
|
|
59
|
+
inputValue.value = key.toString();
|
|
60
|
+
} else {
|
|
61
|
+
inputValue.value = (((_b = (_a = inputValue.value) == null ? void 0 : _a.toString) == null ? void 0 : _b.call(_a)) || "") + key;
|
|
62
|
+
}
|
|
63
|
+
setInputValueStatus();
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function updateFraction(value) {
|
|
68
|
+
if (!setInputStatus(inputValue, inputValueStatus))
|
|
69
|
+
return;
|
|
70
|
+
inputValue.value = (Math.round(+inputValue.value * (1 / value) * 100) / 100).toString();
|
|
71
|
+
setInputValueStatus();
|
|
72
|
+
}
|
|
73
|
+
function calculateFraction() {
|
|
74
|
+
if (!setInputStatus(inputValue, inputValueStatus) || !setInputStatus(numeratorValue, numeratorValueStatus, true) || !setInputStatus(denominatorValue, denominatorValueStatus, true))
|
|
75
|
+
return;
|
|
76
|
+
const value = getNumber(integerValue.value) + getNumber(numeratorValue.value) / getNumber(denominatorValue.value);
|
|
77
|
+
inputValue.value = (Math.round(+inputValue.value * value * 100) / 100).toString();
|
|
78
|
+
setInputValueStatus();
|
|
79
|
+
}
|
|
80
|
+
function setInputStatus(valueRef, statusRef, isInteger) {
|
|
81
|
+
if (!isInteger && (!valueRef.value || valueRef.value === ".") || isInteger && !valueRef.value) {
|
|
82
|
+
statusRef.value = "error";
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
function setInputValueStatus() {
|
|
88
|
+
inputValueStatus.value = !inputValue.value ? "error" : "success";
|
|
89
|
+
}
|
|
90
|
+
return (_ctx, _cache) => {
|
|
91
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
92
|
+
createElementVNode("div", _hoisted_2, [
|
|
93
|
+
createVNode(InputNumber, {
|
|
94
|
+
modelValue: inputValue.value,
|
|
95
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
96
|
+
status: inputValueStatus.value,
|
|
97
|
+
"onUpdate:status": _cache[1] || (_cache[1] = ($event) => inputValueStatus.value = $event)
|
|
98
|
+
}, null, 8, ["modelValue", "status"]),
|
|
99
|
+
createElementVNode("div", _hoisted_3, [
|
|
100
|
+
createVNode(unref(NSpace), null, {
|
|
101
|
+
default: withCtx(() => [
|
|
102
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(numberKeys.value, (key) => {
|
|
103
|
+
return openBlock(), createElementBlock("span", {
|
|
104
|
+
key,
|
|
105
|
+
class: normalizeClass(key === "0" ? "is-0" : ""),
|
|
106
|
+
onClick: ($event) => keydown(key)
|
|
107
|
+
}, toDisplayString(key), 11, _hoisted_4);
|
|
108
|
+
}), 128))
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
}),
|
|
112
|
+
createVNode(unref(NSpace), null, {
|
|
113
|
+
default: withCtx(() => [
|
|
114
|
+
createElementVNode("span", {
|
|
115
|
+
class: "opt",
|
|
116
|
+
onClick: _cache[2] || (_cache[2] = ($event) => keydown("Undo"))
|
|
117
|
+
}, [
|
|
118
|
+
createVNode(unref(NIcon), { component: unref(ArrowUndoSharp) }, null, 8, ["component"])
|
|
119
|
+
]),
|
|
120
|
+
createElementVNode("span", {
|
|
121
|
+
class: "opt",
|
|
122
|
+
onClick: _cache[3] || (_cache[3] = ($event) => keydown("Enter"))
|
|
123
|
+
}, "\u786E\u5B9A")
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
})
|
|
127
|
+
])
|
|
128
|
+
]),
|
|
129
|
+
unref(isDay) ? (openBlock(), createBlock(unref(NSpace), {
|
|
130
|
+
key: 0,
|
|
131
|
+
class: "right-days",
|
|
132
|
+
justify: "center",
|
|
133
|
+
vertical: ""
|
|
134
|
+
}, {
|
|
135
|
+
default: withCtx(() => [
|
|
136
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(days.value, (day) => {
|
|
137
|
+
return openBlock(), createElementBlock("span", {
|
|
138
|
+
class: "btn",
|
|
139
|
+
key: day,
|
|
140
|
+
onClick: ($event) => keydown(day)
|
|
141
|
+
}, toDisplayString(day) + "\u5929", 9, _hoisted_5);
|
|
142
|
+
}), 128))
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
})) : createCommentVNode("v-if", true),
|
|
146
|
+
unref(isDose) ? (openBlock(), createBlock(unref(NSpace), {
|
|
147
|
+
key: 1,
|
|
148
|
+
class: "right-dose",
|
|
149
|
+
"wrap-item": false
|
|
150
|
+
}, {
|
|
151
|
+
default: withCtx(() => [
|
|
152
|
+
createElementVNode("div", _hoisted_6, [
|
|
153
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(doses.value, (dose) => {
|
|
154
|
+
return openBlock(), createElementBlock("span", {
|
|
155
|
+
class: "btn",
|
|
156
|
+
key: dose,
|
|
157
|
+
onClick: ($event) => updateFraction(dose)
|
|
158
|
+
}, "1/" + toDisplayString(dose), 9, _hoisted_7);
|
|
159
|
+
}), 128))
|
|
160
|
+
]),
|
|
161
|
+
createVNode(unref(NSpace), {
|
|
162
|
+
justify: "center",
|
|
163
|
+
vertical: ""
|
|
164
|
+
}, {
|
|
165
|
+
default: withCtx(() => [
|
|
166
|
+
createElementVNode("div", _hoisted_8, [
|
|
167
|
+
createVNode(InputNumber, {
|
|
168
|
+
integer: "",
|
|
169
|
+
modelValue: integerValue.value,
|
|
170
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => integerValue.value = $event)
|
|
171
|
+
}, null, 8, ["modelValue"]),
|
|
172
|
+
createElementVNode("div", _hoisted_9, [
|
|
173
|
+
createVNode(InputNumber, {
|
|
174
|
+
integer: "",
|
|
175
|
+
modelValue: numeratorValue.value,
|
|
176
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => numeratorValue.value = $event),
|
|
177
|
+
status: numeratorValueStatus.value,
|
|
178
|
+
"onUpdate:status": _cache[6] || (_cache[6] = ($event) => numeratorValueStatus.value = $event)
|
|
179
|
+
}, null, 8, ["modelValue", "status"]),
|
|
180
|
+
_hoisted_10,
|
|
181
|
+
createVNode(InputNumber, {
|
|
182
|
+
integer: "",
|
|
183
|
+
modelValue: denominatorValue.value,
|
|
184
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => denominatorValue.value = $event),
|
|
185
|
+
status: denominatorValueStatus.value,
|
|
186
|
+
"onUpdate:status": _cache[8] || (_cache[8] = ($event) => denominatorValueStatus.value = $event)
|
|
187
|
+
}, null, 8, ["modelValue", "status"])
|
|
188
|
+
])
|
|
189
|
+
]),
|
|
190
|
+
createElementVNode("span", {
|
|
191
|
+
class: "btn",
|
|
192
|
+
onClick: calculateFraction
|
|
193
|
+
}, "\u5206\u5B50\u5F0F\u5242\u91CF")
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
})
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
})) : createCommentVNode("v-if", true)
|
|
200
|
+
]);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
var NumberPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "NumberPanel.vue"]]);
|
|
205
|
+
|
|
206
|
+
export { NumberPanel as default };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FormValidationStatus } from 'naive-ui/es/form/src/interface';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
defaultValue: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
};
|
|
7
|
+
mode: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
NUMBERKEYS: string;
|
|
12
|
+
DAYS: number[];
|
|
13
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
defaultValue: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
};
|
|
17
|
+
mode: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
}>>;
|
|
23
|
+
emit: (event: "change", ...args: any[]) => void;
|
|
24
|
+
isDay: import("vue").ComputedRef<boolean>;
|
|
25
|
+
isDose: import("vue").ComputedRef<boolean>;
|
|
26
|
+
numberKeys: Ref<string[]>;
|
|
27
|
+
days: Ref<number[]>;
|
|
28
|
+
doses: Ref<number[]>;
|
|
29
|
+
inputValue: Ref<string>;
|
|
30
|
+
integerValue: Ref<any>;
|
|
31
|
+
numeratorValue: Ref<any>;
|
|
32
|
+
denominatorValue: Ref<any>;
|
|
33
|
+
inputValueStatus: Ref<FormValidationStatus>;
|
|
34
|
+
numeratorValueStatus: Ref<FormValidationStatus>;
|
|
35
|
+
denominatorValueStatus: Ref<FormValidationStatus>;
|
|
36
|
+
history: Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
|
|
37
|
+
undo: () => void;
|
|
38
|
+
redo: () => void;
|
|
39
|
+
keydown: (key: string | number) => void;
|
|
40
|
+
updateFraction: (value: number) => void;
|
|
41
|
+
calculateFraction: () => void;
|
|
42
|
+
setInputStatus: (valueRef: Ref<string>, statusRef: Ref<string>, isInteger?: boolean) => true | undefined;
|
|
43
|
+
setInputValueStatus: () => void;
|
|
44
|
+
NIcon: any;
|
|
45
|
+
NSpace: any;
|
|
46
|
+
ArrowUndoSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
47
|
+
InputNumber: import("vue").DefineComponent<{
|
|
48
|
+
modelValue: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
integer: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
status: {
|
|
57
|
+
type: import("vue").PropType<FormValidationStatus>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
modelValue: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
integer: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
status: {
|
|
71
|
+
type: import("vue").PropType<FormValidationStatus>;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
}>> & {
|
|
75
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}>>;
|
|
78
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
79
|
+
update: (value: string | [string, string]) => void;
|
|
80
|
+
validator: (value: string) => boolean;
|
|
81
|
+
calculate: (type: string) => void;
|
|
82
|
+
NInput: any;
|
|
83
|
+
NIcon: any;
|
|
84
|
+
NSpace: any;
|
|
85
|
+
CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
86
|
+
CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
87
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
88
|
+
modelValue: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
integer: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
status: {
|
|
97
|
+
type: import("vue").PropType<FormValidationStatus>;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
}>> & {
|
|
101
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
102
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
modelValue: string;
|
|
105
|
+
status: FormValidationStatus;
|
|
106
|
+
integer: boolean;
|
|
107
|
+
}>;
|
|
108
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
109
|
+
defaultValue: {
|
|
110
|
+
type: NumberConstructor;
|
|
111
|
+
};
|
|
112
|
+
mode: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
};
|
|
115
|
+
}>> & {
|
|
116
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
117
|
+
}, {}>;
|
|
118
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, inject, createVNode, withModifiers, ref, createTextVNode } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { traverse } from '../../../../shared/utils/index.js';
|
|
3
3
|
import { Reload, ChevronForward } from '@vicons/ionicons5';
|
|
4
4
|
import { NOOP } from '@vue/shared';
|
|
5
5
|
import { useVirtualList } from '@vueuse/core';
|
|
@@ -102,14 +102,14 @@ const SearchMenuList = defineComponent({
|
|
|
102
102
|
"title": item.data[props.labelKey]
|
|
103
103
|
}, [createVNode("div", {
|
|
104
104
|
"class": "search-cascader__optionText"
|
|
105
|
-
}, [
|
|
105
|
+
}, [showCheckbox.value ? createVNode(NCheckbox, {
|
|
106
106
|
"style": {
|
|
107
107
|
marginRight: "8px"
|
|
108
108
|
},
|
|
109
109
|
"checked": isChecked(item.data),
|
|
110
110
|
"onClick": withModifiers(NOOP, ["stop"]),
|
|
111
111
|
"onUpdateChecked": (v) => v && updateValue(item.data)
|
|
112
|
-
}, null)
|
|
112
|
+
}, null) : null, item.data[props.labelKey]]), loadingNode.value === item.data ? createVNode(Reload, {
|
|
113
113
|
"class": "rotate"
|
|
114
114
|
}, null) : item.data.isLeaf ? null : createVNode(ChevronForward, null, null)]);
|
|
115
115
|
})])]);
|
|
@@ -11,4 +11,4 @@ export declare function deepOmit<T extends AnyObject>(target: T, keys: Array<key
|
|
|
11
11
|
export declare function separateMetaModule<T extends AnyObject>(modules: Record<string, unknown>): T;
|
|
12
12
|
export declare function findAncestor(ele: HTMLElement | null, finder: (ele: HTMLElement) => boolean): HTMLElement | null;
|
|
13
13
|
export declare function widthAppend(value: string | number, append?: string): string;
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function targetStringIncludes(arr: string[], target: string): boolean;
|
package/es/shared/utils/index.js
CHANGED
|
@@ -136,8 +136,8 @@ function widthAppend(value, append = "px") {
|
|
|
136
136
|
return value.endsWith(append) ? value : `${value}${append}`;
|
|
137
137
|
throw new Error(`invalid width value ${value}, it need to be a string or number!`);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
139
|
+
function targetStringIncludes(arr, target) {
|
|
140
|
+
return arr.some((value) => target.includes(value));
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
export { DMZ, arrayed, deepOmit, findAncestor, generateTimeFormat, getStringWidth, safeComponentRegister, separateMetaModule, traverse, uuidGenerator,
|
|
143
|
+
export { DMZ, arrayed, deepOmit, findAncestor, generateTimeFormat, getStringWidth, safeComponentRegister, separateMetaModule, targetStringIncludes, traverse, uuidGenerator, widthAppend };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.31-beta.
|
|
3
|
+
"version": "3.1.31-beta.4",
|
|
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": "86063b8f79b04322a2609eecba39bd6d44de88db"
|
|
65
65
|
}
|