cnhis-design-vue 3.1.30-beta.4 → 3.1.30-beta.6
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/form-render/src/utils/business.js +24 -2
- package/es/components/iho-table/index.d.ts +62 -1
- package/es/components/iho-table/src/IhoTable.js +30 -16
- package/es/components/iho-table/src/IhoTable.vue.d.ts +62 -1
- package/es/components/iho-table/src/constants/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +3 -1
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +6 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +4 -8
- package/es/components/iho-table/src/types/index.d.ts +7 -3
- package/es/components/index.css +1 -1
- package/es/components/keyboard/index.d.ts +81 -12
- package/es/components/keyboard/src/Keyboard.js +196 -171
- package/es/components/keyboard/src/Keyboard.vue.d.ts +83 -22
- package/es/components/keyboard/src/components/InputNumber.js +13 -6
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +17 -2
- package/es/components/keyboard/style/index.css +1 -1
- package/es/components/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +20 -15
- package/package.json +2 -2
|
@@ -8,32 +8,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
8
|
__name: "InputNumber",
|
|
9
9
|
props: {
|
|
10
10
|
modelValue: { type: String, default: "" },
|
|
11
|
-
integer: { type: Boolean, default: false }
|
|
11
|
+
integer: { type: Boolean, default: false },
|
|
12
|
+
status: { type: String, default: "success" }
|
|
12
13
|
},
|
|
13
|
-
emits: ["update:modelValue"],
|
|
14
|
+
emits: ["update:modelValue", "update:status"],
|
|
14
15
|
setup(__props, { emit }) {
|
|
15
16
|
const props = __props;
|
|
16
17
|
function update(value) {
|
|
17
18
|
const val = typeof value === "string" ? value : value.join("");
|
|
18
19
|
emit("update:modelValue", val);
|
|
20
|
+
emit("update:status", !val ? "error" : "success");
|
|
19
21
|
}
|
|
20
22
|
function validator(value) {
|
|
21
23
|
if (props.integer) {
|
|
22
24
|
return /(^[1-9]\d*$)/.test(value) || !value;
|
|
23
25
|
}
|
|
24
|
-
return /^\d+\.?\d*$/.test(value);
|
|
26
|
+
return /^\d+\.?\d*$/.test(value) || !value;
|
|
25
27
|
}
|
|
26
28
|
function calculate(type) {
|
|
27
29
|
const value = getNumber(props.modelValue);
|
|
28
|
-
|
|
30
|
+
let newValue = type === "+" ? value + 1 : value - 1;
|
|
31
|
+
if (newValue <= 0 || isNaN(newValue))
|
|
32
|
+
newValue = 1;
|
|
29
33
|
emit("update:modelValue", newValue.toString());
|
|
34
|
+
emit("update:status", "success");
|
|
30
35
|
}
|
|
31
36
|
return (_ctx, _cache) => {
|
|
32
37
|
return openBlock(), createBlock(unref(NInput), {
|
|
33
38
|
value: __props.modelValue,
|
|
34
39
|
"onUpdate:value": update,
|
|
35
40
|
"allow-input": validator,
|
|
36
|
-
placeholder: ""
|
|
41
|
+
placeholder: "",
|
|
42
|
+
status: __props.status,
|
|
43
|
+
clearable: !__props.integer
|
|
37
44
|
}, {
|
|
38
45
|
suffix: withCtx(() => [
|
|
39
46
|
createVNode(unref(NSpace), {
|
|
@@ -56,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
63
|
})
|
|
57
64
|
]),
|
|
58
65
|
_: 1
|
|
59
|
-
}, 8, ["value"]);
|
|
66
|
+
}, 8, ["value", "status", "clearable"]);
|
|
60
67
|
};
|
|
61
68
|
}
|
|
62
69
|
});
|
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: BooleanConstructor;
|
|
8
8
|
default: boolean;
|
|
9
9
|
};
|
|
10
|
+
status: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
10
14
|
}, {
|
|
11
15
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
16
|
modelValue: {
|
|
@@ -17,10 +21,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
21
|
type: BooleanConstructor;
|
|
18
22
|
default: boolean;
|
|
19
23
|
};
|
|
24
|
+
status: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
20
28
|
}>> & {
|
|
21
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
22
31
|
}>>;
|
|
23
|
-
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
32
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
24
33
|
update: (value: string | [string, string]) => void;
|
|
25
34
|
validator: (value: string) => boolean;
|
|
26
35
|
calculate: (type: string) => void;
|
|
@@ -29,7 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
38
|
NSpace: any;
|
|
30
39
|
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<{}>>, {}>;
|
|
31
40
|
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<{}>>, {}>;
|
|
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<{
|
|
41
|
+
}, 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<{
|
|
33
42
|
modelValue: {
|
|
34
43
|
type: StringConstructor;
|
|
35
44
|
default: string;
|
|
@@ -38,10 +47,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
47
|
type: BooleanConstructor;
|
|
39
48
|
default: boolean;
|
|
40
49
|
};
|
|
50
|
+
status: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
41
54
|
}>> & {
|
|
42
55
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
43
57
|
}, {
|
|
44
58
|
modelValue: string;
|
|
59
|
+
status: string;
|
|
45
60
|
integer: boolean;
|
|
46
61
|
}>;
|
|
47
62
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-keyboard span,.c-keyboard-english .keys span{cursor:pointer}.c-keyboard{display:flex;height:160px}.c-keyboard .btn{align-items:center;background:linear-gradient(180deg,#fff,#f2f2f2);border-radius:2px;box-shadow:0 2px 2px #00000036;box-sizing:border-box;display:inline-flex;font-size:14px;justify-content:center;text-align:center}.c-keyboard .btn:hover{background:#2474ff33;border:1px solid #2474ff}.c-keyboard .btn:active{background:#2474ff;color:#fff}.c-keyboard .btn:hover{box-shadow:none}.c-keyboard .left{border-right:1px solid #d5d5d5;box-sizing:border-box;padding:6px;width:130px}.c-keyboard .left .n-input{height:28px;width:100%}.c-keyboard .left .n-input .n-input__input-el{height:28px}.c-keyboard .left .keys{display:flex;margin-top:5px}.c-keyboard .left .keys .n-space{gap:4px 4px!important}.c-keyboard .left .keys span{align-items:center;background-color:#e8e8e8;border-radius:2px;box-sizing:border-box;display:inline-flex;font-size:14px;height:26px;justify-content:center;text-align:center;width:26px}.c-keyboard .left .keys span:hover{background:#2474ff33;border:1px solid #2474ff}.c-keyboard .left .keys span:active{background:#2474ff;color:#fff}.c-keyboard .left .keys span.opt{height:56px}.c-keyboard .left .keys span.is-0{width:56px}.c-keyboard .right-days{padding:0 12px}.c-keyboard .right-days .btn{height:26px;width:56px}.c-keyboard .right-dose{gap:8px 8px!important;padding:5px 12px 5px 5px}.c-keyboard .right-dose .btn{height:32px;width:100px}.c-keyboard .right-dose .btns{display:flex;flex-flow:column nowrap;height:100%;overflow-y:scroll;padding-right:6px}.c-keyboard .right-dose .btns .btn{height:20px;margin-top:4px;width:40px}.c-keyboard .right-dose .btns::-webkit-scrollbar{height:1px;width:2px}.c-keyboard .right-dose .btns::-webkit-scrollbar-track{background:#d8d8d8;border-radius:2px;box-shadow:inset 0 0 5px #fff}.c-keyboard .right-dose .btns::-webkit-scrollbar-thumb{background:#535353;border-radius:2px;box-shadow:inset 0 0 5px #fff}.c-keyboard .right-dose .inputs{align-items:center;display:flex;gap:8px}.c-keyboard .right-dose .inputs .n-input{height:32px;width:46px}.c-keyboard .right-dose .inputs .n-input .n-input__input-el{height:32px}.c-keyboard .n-input .n-input-wrapper{padding-right:5px}.c-keyboard .n-input .n-input-wrapper .n-input__suffix{line-height:0}.c-keyboard .n-input .n-input-wrapper .n-input__suffix .n-space{gap:0 0!important}.c-keyboard .n-input .n-input-wrapper .n-input__suffix .n-space .n-icon{cursor:pointer}.c-keyboard-english{box-sizing:border-box;padding:10px 6px;width:308px}.c-keyboard-english .n-space span{font-size:12px}.c-keyboard-english .n-space .n-icon{cursor:pointer}.c-keyboard-english .keys{display:flex;flex-flow:row wrap;gap:4px 4px;margin-top:5px}.c-keyboard-english .keys span{align-items:center;background-color:#e8e8e8;border-radius:2px;box-sizing:border-box;display:inline-flex;font-size:14px;height:26px;justify-content:center;text-align:center;width:26px}.c-keyboard-english .keys span:hover{background:#2474ff33;border:1px solid #2474ff}.c-keyboard-english .keys span:active{background:#2474ff;color:#fff}.c-keyboard-english .keys span.key10,.c-keyboard-english .keys span.key27{margin-left:16px}.c-keyboard-english .keys span.key26{margin-right:25px}.c-keyboard-english .keys span.key19{margin-left:31px}.c-keyboard-english .keys span.key28{width:146px}.c-keyboard-english .keys span.key30{width:56px}
|
|
1
|
+
.c-keyboard span,.c-keyboard-english .keys span{cursor:pointer}.c-keyboard{display:flex;height:160px}.c-keyboard .btn{align-items:center;background:linear-gradient(180deg,#fff,#f2f2f2);border-radius:2px;box-shadow:0 2px 2px #00000036;box-sizing:border-box;display:inline-flex;font-size:14px;justify-content:center;text-align:center}.c-keyboard .btn:hover{background:#2474ff33;border:1px solid #2474ff}.c-keyboard .btn:active{background:#2474ff;color:#fff}.c-keyboard .btn:hover{box-shadow:none}.c-keyboard .left{border-right:1px solid #d5d5d5;box-sizing:border-box;padding:6px;width:130px}.c-keyboard .left .n-input{height:28px;width:100%}.c-keyboard .left .n-input .n-input__input-el{height:28px}.c-keyboard .left .keys{display:flex;margin-top:5px}.c-keyboard .left .keys .n-space{gap:4px 4px!important}.c-keyboard .left .keys span{align-items:center;background-color:#e8e8e8;border-radius:2px;box-sizing:border-box;display:inline-flex;font-size:14px;height:26px;justify-content:center;text-align:center;width:26px}.c-keyboard .left .keys span:hover{background:#2474ff33;border:1px solid #2474ff}.c-keyboard .left .keys span:active{background:#2474ff;color:#fff}.c-keyboard .left .keys span.opt{height:56px}.c-keyboard .left .keys span.is-0{width:56px}.c-keyboard .right-days{padding:0 12px}.c-keyboard .right-days .btn{height:26px;width:56px}.c-keyboard .right-dose{gap:8px 8px!important;padding:5px 12px 5px 5px}.c-keyboard .right-dose .btn{height:32px;width:100px}.c-keyboard .right-dose .btns{display:flex;flex-flow:column nowrap;height:100%;overflow-y:scroll;padding-right:6px}.c-keyboard .right-dose .btns .btn{height:20px;margin-top:4px;width:40px}.c-keyboard .right-dose .btns::-webkit-scrollbar{height:1px;width:2px}.c-keyboard .right-dose .btns::-webkit-scrollbar-track{background:#d8d8d8;border-radius:2px;box-shadow:inset 0 0 5px #fff}.c-keyboard .right-dose .btns::-webkit-scrollbar-thumb{background:#535353;border-radius:2px;box-shadow:inset 0 0 5px #fff}.c-keyboard .right-dose .inputs{align-items:center;display:flex;gap:8px}.c-keyboard .right-dose .inputs .n-input{height:32px;width:46px}.c-keyboard .right-dose .inputs .n-input .n-input__input-el{height:32px}.c-keyboard .n-input .n-input-wrapper{padding-right:5px}.c-keyboard .n-input .n-input-wrapper .n-input__suffix{line-height:0}.c-keyboard .n-input .n-input-wrapper .n-input__suffix .n-space{gap:0 0!important}.c-keyboard .n-input .n-input-wrapper .n-input__suffix .n-space .n-icon{cursor:pointer}.c-keyboard-english{background:#fff;box-sizing:border-box;padding:10px 6px;width:308px}.c-keyboard-english.isFixed{position:fixed;z-index:1}.c-keyboard-english .n-space span{font-size:12px}.c-keyboard-english .n-space .n-icon{cursor:pointer}.c-keyboard-english .keys{display:flex;flex-flow:row wrap;gap:4px 4px;margin-top:5px}.c-keyboard-english .keys span{align-items:center;background-color:#e8e8e8;border-radius:2px;box-sizing:border-box;display:inline-flex;font-size:14px;height:26px;justify-content:center;text-align:center;width:26px}.c-keyboard-english .keys span:hover{background:#2474ff33;border:1px solid #2474ff}.c-keyboard-english .keys span:active{background:#2474ff;color:#fff}.c-keyboard-english .keys span.key10,.c-keyboard-english .keys span.key27{margin-left:16px}.c-keyboard-english .keys span.key26{margin-right:25px}.c-keyboard-english .keys span.key19{margin-left:31px}.c-keyboard-english .keys span.key28{width:146px}.c-keyboard-english .keys span.key30{width:56px}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, withKeys, createTextVNode, toDisplayString, createCommentVNode, createElementBlock, createElementVNode, Fragment, renderList } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, withKeys, createTextVNode, toDisplayString, withDirectives, vShow, createCommentVNode, createElementBlock, createElementVNode, Fragment, renderList } from 'vue';
|
|
2
2
|
import { NGrid, NGi, NSpace, NInputGroup, NInput, NButton, NCheckbox, NTree, NIcon, NTooltip } from 'naive-ui';
|
|
3
3
|
import { CloseCircleSharp } from '@vicons/ionicons5';
|
|
4
4
|
import { filterTree } from './utils/index.js';
|
|
@@ -90,8 +90,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
function transformTree(tree) {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
var _a, _b;
|
|
94
|
+
for (let i = 0, len = tree.length; i < len; i++) {
|
|
95
|
+
const item = tree[i];
|
|
95
96
|
item.title = getLabelName(item);
|
|
96
97
|
if (!item.key)
|
|
97
98
|
item.key = item[props.wordbookChild.user_id_obj] || item[props.wordbook.parent_id_obj] || Date.now();
|
|
@@ -103,7 +104,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
104
|
}
|
|
104
105
|
if (!item.disabled && !item.children)
|
|
105
106
|
allCheckedKeys.push(item.key);
|
|
106
|
-
}
|
|
107
|
+
}
|
|
107
108
|
}
|
|
108
109
|
function setDisabled(data) {
|
|
109
110
|
var _a;
|
|
@@ -132,12 +133,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
133
|
return option[props.wordbookChild.user_name_obj] || option[props.wordbook.parent_name_obj] || option["orgName"] || option["title"] || "";
|
|
133
134
|
}
|
|
134
135
|
function setAllCheckedKeys(tree) {
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
var _a;
|
|
137
|
+
for (let i = 0, len = tree.length; i < len; i++) {
|
|
138
|
+
const item = tree[i];
|
|
137
139
|
((_a = item.children) == null ? void 0 : _a.length) && setAllCheckedKeys(item.children);
|
|
138
140
|
if (!item.disabled && !item.children)
|
|
139
141
|
allCheckedKeys.push(item.key);
|
|
140
|
-
}
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
async function searchClick() {
|
|
143
145
|
if (!isRemote.value) {
|
|
@@ -150,7 +152,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
function setTreeCheckd(tree, checked) {
|
|
153
|
-
tree.
|
|
155
|
+
for (let i = 0, len = tree.length; i < len; i++) {
|
|
156
|
+
const item = tree[i];
|
|
154
157
|
if (!item.disabled && (!item.children || item.isLeaf)) {
|
|
155
158
|
if (checked && !checkedKeys.value.includes(item.key)) {
|
|
156
159
|
checkedKeys.value.push(item.key);
|
|
@@ -161,20 +164,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
161
164
|
}
|
|
162
165
|
}
|
|
163
166
|
item.children && setTreeCheckd(item.children, checked);
|
|
164
|
-
}
|
|
167
|
+
}
|
|
165
168
|
}
|
|
166
169
|
function checkedAllChange(checked) {
|
|
167
170
|
setTreeCheckd(treeData.value, checked);
|
|
168
171
|
}
|
|
169
172
|
function setTagData(tree) {
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
var _a;
|
|
174
|
+
for (let i = 0, len = tree.length; i < len; i++) {
|
|
175
|
+
const item = tree[i];
|
|
172
176
|
checkedKeys.value.includes(item.key) && tagData.value.push({
|
|
173
177
|
key: item.key,
|
|
174
178
|
name: item.title
|
|
175
179
|
});
|
|
176
180
|
((_a = item.children) == null ? void 0 : _a.length) && setTagData(item.children);
|
|
177
|
-
}
|
|
181
|
+
}
|
|
178
182
|
}
|
|
179
183
|
function updateTreeChecked(keys) {
|
|
180
184
|
checkedKeys.value = keys;
|
|
@@ -228,14 +232,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
228
232
|
_: 1
|
|
229
233
|
})]),
|
|
230
234
|
_: 1
|
|
231
|
-
}), __props.multiple ? (openBlock(), createBlock(unref(NCheckbox), {
|
|
235
|
+
}), __props.multiple ? withDirectives((openBlock(), createBlock(unref(NCheckbox), {
|
|
232
236
|
key: 0,
|
|
233
237
|
checked: checkedAll.value,
|
|
234
238
|
"onUpdate:checked": [_cache[1] || (_cache[1] = ($event) => checkedAll.value = $event), checkedAllChange]
|
|
235
239
|
}, {
|
|
236
|
-
default: withCtx(() => [createTextVNode("\u5168\u9009")]),
|
|
240
|
+
default: withCtx(() => [createTextVNode(" \u5168\u9009 ")]),
|
|
237
241
|
_: 1
|
|
238
|
-
}, 8, ["checked"])) : createCommentVNode("v-if", true), createVNode(unref(NTree), {
|
|
242
|
+
}, 8, ["checked"])), [[vShow, unref(allCheckedKeys).length < 1e3]]) : createCommentVNode("v-if", true), createVNode(unref(NTree), {
|
|
243
|
+
"virtual-scroll": "",
|
|
239
244
|
class: "c-select-person__scroll",
|
|
240
245
|
"checked-keys": checkedKeys.value,
|
|
241
246
|
"expanded-keys": expandedKeys.value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.30-beta.
|
|
3
|
+
"version": "3.1.30-beta.6",
|
|
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": "21fe9d52c5242a1a00ed2aa48045ef5ff1d661f1"
|
|
65
65
|
}
|