cnhis-design-vue 3.1.30-beta.5 → 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/iho-table/index.d.ts +3 -1
- package/es/components/iho-table/src/IhoTable.js +32 -21
- package/es/components/iho-table/src/IhoTable.vue.d.ts +3 -1
- package/es/components/iho-table/src/constants/index.d.ts +1 -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 +4 -2
- 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/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}
|
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
|
}
|