cnhis-design-vue 3.1.39-beta.4 → 3.1.39-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/button-print/index.d.ts +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +9 -2
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +31 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +13 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -2
- package/es/components/iho-table/src/types/index.d.ts +5 -1
- package/es/components/keyboard/index.d.ts +4 -0
- package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -0
- package/es/components/keyboard/src/Keyboard.vue.js +10 -2
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +3 -1
- package/es/components/keyboard/src/components/InputNumber.vue.js +13 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +2 -0
- package/package.json +2 -2
|
@@ -191,6 +191,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
191
191
|
handleClickBtn: (visible?: boolean) => Promise<false | undefined>;
|
|
192
192
|
reformatPrintParams: () => void;
|
|
193
193
|
verifiySuccess: (token: string) => void;
|
|
194
|
+
directPrint: () => Promise<void>;
|
|
194
195
|
NDropdown: any;
|
|
195
196
|
NButton: any;
|
|
196
197
|
NIcon: any;
|
|
@@ -199,6 +199,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
199
199
|
handleClickBtn: (visible?: boolean) => Promise<false | undefined>;
|
|
200
200
|
reformatPrintParams: () => void;
|
|
201
201
|
verifiySuccess: (token: string) => void;
|
|
202
|
+
directPrint: () => Promise<void>;
|
|
202
203
|
NDropdown: any;
|
|
203
204
|
NButton: any;
|
|
204
205
|
NIcon: any;
|
|
@@ -79,6 +79,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
},
|
|
80
80
|
emits: ["success", "error", "clickoutside"],
|
|
81
81
|
setup(__props, {
|
|
82
|
+
expose,
|
|
82
83
|
emit
|
|
83
84
|
}) {
|
|
84
85
|
const props = __props;
|
|
@@ -127,8 +128,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
127
128
|
if (state.spinning)
|
|
128
129
|
return;
|
|
129
130
|
if (origin === "button") {
|
|
130
|
-
await
|
|
131
|
-
handleClickPrint();
|
|
131
|
+
await directPrint();
|
|
132
132
|
return;
|
|
133
133
|
} else {
|
|
134
134
|
return handleClickBtn();
|
|
@@ -477,6 +477,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
477
477
|
}, {
|
|
478
478
|
deep: true
|
|
479
479
|
});
|
|
480
|
+
async function directPrint() {
|
|
481
|
+
await handleClickBtn(false);
|
|
482
|
+
handleClickPrint();
|
|
483
|
+
}
|
|
484
|
+
expose({
|
|
485
|
+
directPrint
|
|
486
|
+
});
|
|
480
487
|
return (_ctx, _cache) => {
|
|
481
488
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(NDropdown), {
|
|
482
489
|
class: "c-dropdown",
|
|
@@ -2,7 +2,7 @@ import { AnyObject } from '../../../../../../es/shared/types';
|
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
export declare const RADIO: import("vue").DefineComponent<{
|
|
4
4
|
value: {
|
|
5
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
5
|
+
type: (ArrayConstructor | NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
6
6
|
};
|
|
7
7
|
options: {
|
|
8
8
|
type: PropType<AnyObject[]>;
|
|
@@ -44,7 +44,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
44
44
|
onChange: {};
|
|
45
45
|
}, () => 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<{
|
|
46
46
|
value: {
|
|
47
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
47
|
+
type: (ArrayConstructor | NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
48
48
|
};
|
|
49
49
|
options: {
|
|
50
50
|
type: PropType<AnyObject[]>;
|
|
@@ -94,7 +94,7 @@ export declare const RADIO: import("vue").DefineComponent<{
|
|
|
94
94
|
}>;
|
|
95
95
|
export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
96
96
|
value: {
|
|
97
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
97
|
+
type: (ArrayConstructor | NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
98
98
|
};
|
|
99
99
|
options: {
|
|
100
100
|
type: PropType<AnyObject[]>;
|
|
@@ -136,7 +136,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
136
136
|
onChange: {};
|
|
137
137
|
}, () => 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<{
|
|
138
138
|
value: {
|
|
139
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
139
|
+
type: (ArrayConstructor | NumberConstructor | ObjectConstructor | StringConstructor)[];
|
|
140
140
|
};
|
|
141
141
|
options: {
|
|
142
142
|
type: PropType<AnyObject[]>;
|
|
@@ -276,7 +276,8 @@ function useFieldListAdaptor(collector) {
|
|
|
276
276
|
return fin;
|
|
277
277
|
}, {});
|
|
278
278
|
function bindIndex(schema, idx) {
|
|
279
|
-
|
|
279
|
+
schema["x-index"] = idx;
|
|
280
|
+
return schema;
|
|
280
281
|
}
|
|
281
282
|
function createFieldName(fieldItem) {
|
|
282
283
|
if (fieldItem.suffixConfig) {
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import { createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { isNumber } from 'lodash-es';
|
|
2
3
|
import { NInputNumber } from 'naive-ui';
|
|
3
4
|
import '../../../../index.js';
|
|
4
5
|
import { EDITABLE_WIDGET_TYPE } from '../../../constants/index.js';
|
|
5
6
|
import { IhoTableRenderHelper } from '../../../utils/index.js';
|
|
6
7
|
import { defineTablePlugin } from '../../../hooks/useTablePlugin.js';
|
|
7
8
|
|
|
9
|
+
const IhoTableInputNumber = defineComponent({
|
|
10
|
+
name: "IhoTableInputNumber",
|
|
11
|
+
props: {
|
|
12
|
+
value: [String, Number]
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:value"],
|
|
15
|
+
setup(props, {
|
|
16
|
+
emit
|
|
17
|
+
}) {
|
|
18
|
+
const valueRef = computed({
|
|
19
|
+
get() {
|
|
20
|
+
if (isNumber(props.value))
|
|
21
|
+
return props.value;
|
|
22
|
+
return props.value ? isNumber(+props.value) ? +props.value : null : null;
|
|
23
|
+
},
|
|
24
|
+
set(value) {
|
|
25
|
+
emit("update:value", value);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return () => {
|
|
29
|
+
return createVNode(NInputNumber, {
|
|
30
|
+
"value": valueRef.value,
|
|
31
|
+
"onUpdate:value": ($event) => valueRef.value = $event
|
|
32
|
+
}, null);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
8
36
|
function numberRendererPlugin() {
|
|
9
37
|
const pluginName = "numberRendererPlugin";
|
|
10
38
|
return defineTablePlugin({
|
|
@@ -23,7 +51,6 @@ function numberRendererPlugin() {
|
|
|
23
51
|
placeholder = "\u8BF7\u8F93\u5165"
|
|
24
52
|
} = fieldItem.componentProps || {};
|
|
25
53
|
const config = {
|
|
26
|
-
...fieldItem.componentProps || {},
|
|
27
54
|
clearable: true,
|
|
28
55
|
placeholder,
|
|
29
56
|
onBlur: () => emitFormChangeWithParams({
|
|
@@ -39,10 +66,10 @@ function numberRendererPlugin() {
|
|
|
39
66
|
},
|
|
40
67
|
onClick: emitFormClick
|
|
41
68
|
};
|
|
42
|
-
return [createVNode(
|
|
69
|
+
return [createVNode(IhoTableInputNumber, mergeProps({
|
|
43
70
|
"value": row[column.field],
|
|
44
71
|
"onUpdate:value": ($event) => row[column.field] = $event
|
|
45
|
-
}, config), null)];
|
|
72
|
+
}, fieldItem.componentProps, config), null)];
|
|
46
73
|
})
|
|
47
74
|
});
|
|
48
75
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, Func } from '../../../../../../../../es/shared/types';
|
|
2
2
|
import { CSSProperties, PropType } from 'vue';
|
|
3
3
|
import { VxeTableDefines } from 'vxe-table';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -47,23 +47,27 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
47
|
required: true;
|
|
48
48
|
};
|
|
49
49
|
}>> & {
|
|
50
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
50
51
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
51
52
|
}>>;
|
|
53
|
+
emit: (event: "click" | "update:value", ...args: any[]) => void;
|
|
52
54
|
tableHandler: import("../../../../types").IhoTableHandler;
|
|
53
|
-
popoverRef: import("vue").Ref<
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
popoverRef: import("vue").Ref<{
|
|
56
|
+
syncPosition: Func;
|
|
57
|
+
} | undefined>;
|
|
58
|
+
editContent: import("vue").Ref<unknown>;
|
|
59
|
+
setEditContent: (value: unknown) => void;
|
|
56
60
|
show: import("vue").Ref<boolean>;
|
|
57
61
|
setShow: (v: boolean) => void;
|
|
58
|
-
|
|
62
|
+
onContentClick: (event: MouseEvent) => void;
|
|
63
|
+
updateShow: (show: boolean) => void;
|
|
59
64
|
onShow: () => Promise<void>;
|
|
60
65
|
emitFormChangeWithParams: (params?: AnyObject) => void;
|
|
61
66
|
onClose: () => Promise<void>;
|
|
62
|
-
updateShow: (show: boolean) => void;
|
|
63
67
|
style: import("vue").ComputedRef<CSSProperties>;
|
|
64
68
|
NPopover: any;
|
|
65
69
|
NInput: any;
|
|
66
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
70
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:value")[], "click" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
67
71
|
value: {};
|
|
68
72
|
height: {
|
|
69
73
|
type: NumberConstructor;
|
|
@@ -86,6 +90,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
86
90
|
required: true;
|
|
87
91
|
};
|
|
88
92
|
}>> & {
|
|
93
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
89
94
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
90
95
|
}, {
|
|
91
96
|
height: number;
|
|
@@ -5,6 +5,7 @@ import { InjectionIhoTableHandler } from '../../../../constants/index.js';
|
|
|
5
5
|
import { useIhoTableFormEvent } from '../../../../utils/index.js';
|
|
6
6
|
import _export_sfc from '../../../../../../../_virtual/plugin-vue_export-helper.js';
|
|
7
7
|
|
|
8
|
+
const _hoisted_1 = ["onClick"];
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "editSeparate",
|
|
10
11
|
props: {
|
|
@@ -15,7 +16,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
16
|
displayContent: { type: String, default: "" },
|
|
16
17
|
rowIndex: { type: Number, required: true }
|
|
17
18
|
},
|
|
18
|
-
emits: ["update:value"],
|
|
19
|
+
emits: ["update:value", "click"],
|
|
19
20
|
setup(__props, { emit }) {
|
|
20
21
|
const props = __props;
|
|
21
22
|
const tableHandler = inject(InjectionIhoTableHandler);
|
|
@@ -28,7 +29,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
29
|
function setShow(v) {
|
|
29
30
|
show.value = v;
|
|
30
31
|
}
|
|
32
|
+
function onContentClick(event) {
|
|
33
|
+
show.value = !show.value;
|
|
34
|
+
emit("click", event);
|
|
35
|
+
}
|
|
31
36
|
watch(show, updateShow);
|
|
37
|
+
function updateShow(show2) {
|
|
38
|
+
show2 ? onShow() : onClose();
|
|
39
|
+
}
|
|
32
40
|
async function onShow() {
|
|
33
41
|
var _a;
|
|
34
42
|
editContent.value = cloneDeep(props.value);
|
|
@@ -47,9 +55,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
55
|
emitFormChangeWithParams({ oldValue });
|
|
48
56
|
tableHandler.updateTableDataRef();
|
|
49
57
|
}
|
|
50
|
-
function updateShow(show2) {
|
|
51
|
-
show2 ? onShow() : onClose();
|
|
52
|
-
}
|
|
53
58
|
const style = computed(() => ({
|
|
54
59
|
border: "1px solid #f5f5f5",
|
|
55
60
|
height: props.height - 16 + "px",
|
|
@@ -69,14 +74,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
74
|
ref: popoverRef,
|
|
70
75
|
trigger: "manual",
|
|
71
76
|
show: show.value,
|
|
72
|
-
"onUpdate:show": _cache[
|
|
77
|
+
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => show.value = $event),
|
|
73
78
|
"show-arrow": false
|
|
74
79
|
}, {
|
|
75
80
|
trigger: withCtx(() => [
|
|
76
81
|
createElementVNode("div", {
|
|
77
|
-
onClick:
|
|
82
|
+
onClick: withModifiers(onContentClick, ["stop"]),
|
|
78
83
|
style: normalizeStyle(unref(style))
|
|
79
|
-
}, toDisplayString(__props.displayContent || " "),
|
|
84
|
+
}, toDisplayString(__props.displayContent || " "), 13, _hoisted_1)
|
|
80
85
|
]),
|
|
81
86
|
default: withCtx(() => [
|
|
82
87
|
renderSlot(_ctx.$slots, "menu", {
|
|
@@ -88,7 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
93
|
}, () => [
|
|
89
94
|
createVNode(unref(NInput), {
|
|
90
95
|
value: editContent.value,
|
|
91
|
-
"onUpdate:value": _cache[
|
|
96
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => editContent.value = $event),
|
|
92
97
|
type: "textarea"
|
|
93
98
|
}, null, 8, ["value"])
|
|
94
99
|
])
|
|
@@ -3,7 +3,7 @@ import { traverse } from '../../../../../../../shared/utils/index.js';
|
|
|
3
3
|
import { isFunction, isObject, range } from 'lodash-es';
|
|
4
4
|
import '../../../../../index.js';
|
|
5
5
|
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
|
|
6
|
-
import { IhoTableRenderHelper, getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
|
|
6
|
+
import { createIhoTableClearActivedInterceptor, IhoTableRenderHelper, getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
|
|
7
7
|
import { isSeparateColumn, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separateUtils.js';
|
|
8
8
|
import EditSeparate from './editSeparate.vue.js';
|
|
9
9
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
@@ -24,6 +24,7 @@ function separateRendererPlugins() {
|
|
|
24
24
|
return defineTablePlugin({
|
|
25
25
|
name: pluginName,
|
|
26
26
|
vxe(instance) {
|
|
27
|
+
instance.interceptor.add("event.clearActived", createIhoTableClearActivedInterceptor(EDITABLE_WIDGET_TYPE.SEPARATE, (ele) => ele.classList.contains("v-binder-follower-content")));
|
|
27
28
|
instance.renderer.add(EDITABLE_WIDGET_TYPE.SEPARATE, {
|
|
28
29
|
renderCell(renderOpts, {
|
|
29
30
|
column,
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js
CHANGED
|
@@ -25,7 +25,6 @@ function timeRendererPlugin() {
|
|
|
25
25
|
valueFormat = "HH:mm"
|
|
26
26
|
} = fieldItem.componentProps || {};
|
|
27
27
|
const config = {
|
|
28
|
-
...fieldItem.componentProps || {},
|
|
29
28
|
placeholder,
|
|
30
29
|
valueFormat,
|
|
31
30
|
format: valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
@@ -41,7 +40,7 @@ function timeRendererPlugin() {
|
|
|
41
40
|
return [createVNode(NTimePicker, mergeProps({
|
|
42
41
|
"formattedValue": row[column.field],
|
|
43
42
|
"onUpdate:formattedValue": ($event) => row[column.field] = $event
|
|
44
|
-
}, config), null)];
|
|
43
|
+
}, fieldItem.componentProps, config), null)];
|
|
45
44
|
})
|
|
46
45
|
});
|
|
47
46
|
}
|
|
@@ -65,7 +65,11 @@ export declare type LowCodeTableFieldItem = {
|
|
|
65
65
|
formType: string;
|
|
66
66
|
fieldSetting: string;
|
|
67
67
|
componentProps: AnyObject;
|
|
68
|
-
options:
|
|
68
|
+
options: {
|
|
69
|
+
label?: string;
|
|
70
|
+
value: string;
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
}[];
|
|
69
73
|
annotation: boolean;
|
|
70
74
|
slotFn: NonNullable<IhoTableFieldItem['slots']>['default'];
|
|
71
75
|
headerSlotFn: NonNullable<IhoTableFieldItem['slots']>['header'];
|
|
@@ -37,6 +37,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
37
37
|
ENGLISHOTHERKEY: string[];
|
|
38
38
|
ENGLISHKEYS: string[];
|
|
39
39
|
ENGLISHKEYS_: string[];
|
|
40
|
+
toSelectInputContent: import("vue").Ref<number>;
|
|
40
41
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
41
42
|
mode: {
|
|
42
43
|
type: import("vue").PropType<"number" | "day" | "dose" | "english">;
|
|
@@ -94,6 +95,7 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
94
95
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
95
96
|
keydown: (key: string | number) => void;
|
|
96
97
|
onChange: (value: number) => void;
|
|
98
|
+
select: () => void;
|
|
97
99
|
NPopover: any;
|
|
98
100
|
NInputNumber: any;
|
|
99
101
|
NIcon: any;
|
|
@@ -224,6 +226,8 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
224
226
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
225
227
|
}>>;
|
|
226
228
|
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
229
|
+
inputRef: any;
|
|
230
|
+
toSelectInputContent: import("vue").Ref<number>;
|
|
227
231
|
update: (value: string | [string, string]) => void;
|
|
228
232
|
validator: (value: string) => boolean;
|
|
229
233
|
calculate: (type: string) => void;
|
|
@@ -38,6 +38,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
38
|
ENGLISHOTHERKEY: string[];
|
|
39
39
|
ENGLISHKEYS: string[];
|
|
40
40
|
ENGLISHKEYS_: string[];
|
|
41
|
+
toSelectInputContent: import("vue").Ref<number>;
|
|
41
42
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
42
43
|
mode: {
|
|
43
44
|
type: PropType<"number" | "day" | "dose" | "english">;
|
|
@@ -95,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
96
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
96
97
|
keydown: (key: string | number) => void;
|
|
97
98
|
onChange: (value: number) => void;
|
|
99
|
+
select: () => void;
|
|
98
100
|
NPopover: any;
|
|
99
101
|
NInputNumber: any;
|
|
100
102
|
NIcon: any;
|
|
@@ -225,6 +227,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
225
227
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
226
228
|
}>>;
|
|
227
229
|
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
230
|
+
inputRef: any;
|
|
231
|
+
toSelectInputContent: import("vue").Ref<number>;
|
|
228
232
|
update: (value: string | [string, string]) => void;
|
|
229
233
|
validator: (value: string) => boolean;
|
|
230
234
|
calculate: (type: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, provide, computed, unref, openBlock, createBlock, withCtx, createVNode, normalizeProps, mergeProps, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { NPopover, NInputNumber, NSpace, NIcon } from 'naive-ui';
|
|
3
3
|
import { Close, GitCompareOutline, ArrowUndoSharp } from '@vicons/ionicons5';
|
|
4
4
|
import NumberPanel from './components/NumberPanel.vue.js';
|
|
@@ -23,12 +23,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
"change",
|
|
24
24
|
"keydown"
|
|
25
25
|
],
|
|
26
|
-
setup(__props, { emit }) {
|
|
26
|
+
setup(__props, { expose, emit }) {
|
|
27
27
|
const props = __props;
|
|
28
28
|
const ENGLISHKEY = "QWERTYUIOPASDFGHJKLZXCVBNM.";
|
|
29
29
|
const ENGLISHOTHERKEY = ["Switch", " ", "Undo", "Enter"];
|
|
30
30
|
const ENGLISHKEYS = ENGLISHKEY.split("").concat(ENGLISHOTHERKEY);
|
|
31
31
|
const ENGLISHKEYS_ = ENGLISHKEY.split(".")[0].split("").sort().concat(["."], ENGLISHOTHERKEY);
|
|
32
|
+
let toSelectInputContent = ref(Date.now());
|
|
33
|
+
provide("toSelectInputContent", toSelectInputContent);
|
|
32
34
|
const isDefault = computed(() => props.mode === "english");
|
|
33
35
|
const moveNumberPaneOptions = computed(() => {
|
|
34
36
|
return {
|
|
@@ -78,6 +80,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
80
|
currentValue.value = value;
|
|
79
81
|
emit("change", value);
|
|
80
82
|
}
|
|
83
|
+
function select() {
|
|
84
|
+
toSelectInputContent.value = Date.now();
|
|
85
|
+
}
|
|
86
|
+
expose({
|
|
87
|
+
select
|
|
88
|
+
});
|
|
81
89
|
return (_ctx, _cache) => {
|
|
82
90
|
return !unref(isDefault) && !__props.panel ? (openBlock(), createBlock(unref(NPopover), {
|
|
83
91
|
key: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, Ref } from 'vue';
|
|
2
2
|
import { FormValidationStatus } from 'naive-ui/es/form/src/interface';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
@@ -32,6 +32,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
33
33
|
}>>;
|
|
34
34
|
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
35
|
+
inputRef: any;
|
|
36
|
+
toSelectInputContent: Ref<number>;
|
|
35
37
|
update: (value: string | [string, string]) => void;
|
|
36
38
|
validator: (value: string) => boolean;
|
|
37
39
|
calculate: (type: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, ref, inject, watch, 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
4
|
import { getNumber } from '../utils/index.js';
|
|
@@ -14,6 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
emits: ["update:modelValue", "update:status"],
|
|
15
15
|
setup(__props, { emit }) {
|
|
16
16
|
const props = __props;
|
|
17
|
+
const inputRef = ref(null);
|
|
18
|
+
const toSelectInputContent = inject("toSelectInputContent");
|
|
17
19
|
function update(value) {
|
|
18
20
|
const val = typeof value === "string" ? value : value.join("");
|
|
19
21
|
emit("update:modelValue", val);
|
|
@@ -33,8 +35,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
35
|
emit("update:modelValue", newValue.toString());
|
|
34
36
|
emit("update:status", "success");
|
|
35
37
|
}
|
|
38
|
+
watch(
|
|
39
|
+
() => toSelectInputContent.value,
|
|
40
|
+
(value) => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
(_b = (_a = inputRef.value) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
|
|
43
|
+
}
|
|
44
|
+
);
|
|
36
45
|
return (_ctx, _cache) => {
|
|
37
46
|
return openBlock(), createBlock(unref(NInput), {
|
|
47
|
+
autofocus: "",
|
|
48
|
+
ref_key: "inputRef",
|
|
49
|
+
ref: inputRef,
|
|
38
50
|
value: __props.modelValue,
|
|
39
51
|
"onUpdate:value": update,
|
|
40
52
|
"allow-input": validator,
|
|
@@ -124,6 +124,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
124
124
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
125
125
|
}>>;
|
|
126
126
|
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
127
|
+
inputRef: any;
|
|
128
|
+
toSelectInputContent: Ref<number>;
|
|
127
129
|
update: (value: string | [string, string]) => void;
|
|
128
130
|
validator: (value: string) => boolean;
|
|
129
131
|
calculate: (type: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.39-beta.
|
|
3
|
+
"version": "3.1.39-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": "bc849f39e8e9c85a74e66d3c30c0705034cc1a5e"
|
|
65
65
|
}
|