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
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { defineComponent, ref, computed,
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createCommentVNode, unref, createElementVNode, createVNode, withCtx, renderList, normalizeClass, toDisplayString, createBlock, normalizeStyle, createTextVNode } from 'vue';
|
|
2
|
+
import { NSpace, NIcon } from 'naive-ui';
|
|
3
3
|
import { ArrowUndoSharp, Close, GitCompareOutline } from '@vicons/ionicons5';
|
|
4
4
|
import InputNumber from './components/InputNumber.js';
|
|
5
|
-
import { useRefHistory } from '@vueuse/core';
|
|
5
|
+
import { useRefHistory, useDraggable } from '@vueuse/core';
|
|
6
6
|
import { getNumber } from './utils/index.js';
|
|
7
7
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
8
8
|
|
|
9
|
-
const _hoisted_1 = {
|
|
9
|
+
const _hoisted_1 = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "c-keyboard"
|
|
12
|
+
};
|
|
10
13
|
const _hoisted_2 = { class: "left" };
|
|
11
14
|
const _hoisted_3 = { class: "keys" };
|
|
12
15
|
const _hoisted_4 = ["onClick"];
|
|
@@ -16,17 +19,15 @@ const _hoisted_7 = ["onClick"];
|
|
|
16
19
|
const _hoisted_8 = { class: "inputs" };
|
|
17
20
|
const _hoisted_9 = { class: "inputs-right" };
|
|
18
21
|
const _hoisted_10 = /* @__PURE__ */ createElementVNode("hr", null, null, -1);
|
|
19
|
-
const _hoisted_11 =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
const _hoisted_12 = /* @__PURE__ */ createElementVNode("span", null, "\u952E\u76D8", -1);
|
|
24
|
-
const _hoisted_13 = { class: "keys" };
|
|
25
|
-
const _hoisted_14 = ["onClick"];
|
|
22
|
+
const _hoisted_11 = /* @__PURE__ */ createElementVNode("span", null, "\u952E\u76D8", -1);
|
|
23
|
+
const _hoisted_12 = { class: "keys" };
|
|
24
|
+
const _hoisted_13 = ["onClick"];
|
|
26
25
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
26
|
__name: "Keyboard",
|
|
28
27
|
props: {
|
|
29
|
-
mode: { type: String, default: "
|
|
28
|
+
mode: { type: String, default: "english" },
|
|
29
|
+
dragable: { type: Boolean, default: false },
|
|
30
|
+
positionInitialValue: { type: Object, default: () => ({ x: 0, y: 0 }) }
|
|
30
31
|
},
|
|
31
32
|
emits: [
|
|
32
33
|
"change",
|
|
@@ -40,23 +41,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
41
|
const ENGLISHOTHERKEY = ["Switch", " ", "Undo", "Enter"];
|
|
41
42
|
const ENGLISHKEYS = ENGLISHKEY.split("").concat(ENGLISHOTHERKEY);
|
|
42
43
|
const ENGLISHKEYS_ = ENGLISHKEY.split(".")[0].split("").sort().concat(["."], ENGLISHOTHERKEY);
|
|
43
|
-
const
|
|
44
|
+
const englishKeyboardRef = ref(null);
|
|
45
|
+
const keyboardDragRef = ref(null);
|
|
44
46
|
const numberKeys = ref(NUMBERKEYS.split(""));
|
|
45
47
|
const days = ref(DAYS);
|
|
46
48
|
const doses = ref([2, 3, 4, 5, 6, 7, 8]);
|
|
47
49
|
const englishKeys = ref(ENGLISHKEYS.slice());
|
|
48
50
|
const value = ref();
|
|
49
51
|
const inputValue = ref("");
|
|
50
|
-
const { history, undo, redo } = useRefHistory(inputValue);
|
|
51
52
|
const integerValue = ref();
|
|
52
53
|
const numeratorValue = ref();
|
|
53
54
|
const denominatorValue = ref();
|
|
54
|
-
const
|
|
55
|
+
const inputValueStatus = ref("success");
|
|
56
|
+
const numeratorValueStatus = ref("success");
|
|
57
|
+
const denominatorValueStatus = ref("success");
|
|
58
|
+
const isDefault = computed(() => props.mode === "english");
|
|
55
59
|
const isDay = computed(() => props.mode === "day");
|
|
56
60
|
const isDose = computed(() => props.mode === "dose");
|
|
61
|
+
const { history, undo, redo } = useRefHistory(inputValue);
|
|
62
|
+
const { x, y, style } = useDraggable(englishKeyboardRef, {
|
|
63
|
+
initialValue: props.positionInitialValue,
|
|
64
|
+
preventDefault: true,
|
|
65
|
+
handle: keyboardDragRef
|
|
66
|
+
});
|
|
57
67
|
function keydown(key) {
|
|
58
|
-
var _a, _b
|
|
59
|
-
if (props.mode === "
|
|
68
|
+
var _a, _b;
|
|
69
|
+
if (props.mode === "english") {
|
|
60
70
|
if (key !== "Switch") {
|
|
61
71
|
emit("keydown", key);
|
|
62
72
|
} else {
|
|
@@ -67,191 +77,206 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
77
|
switch (key) {
|
|
68
78
|
case "Undo": {
|
|
69
79
|
undo();
|
|
80
|
+
setInputValueStatus();
|
|
70
81
|
break;
|
|
71
82
|
}
|
|
72
83
|
case "Enter":
|
|
73
84
|
value.value = +inputValue.value;
|
|
74
|
-
(_a = popoverRef.value) == null ? void 0 : _a.setShow(false);
|
|
75
85
|
emit("change", value.value);
|
|
76
86
|
break;
|
|
77
87
|
default:
|
|
78
88
|
if (typeof key === "number") {
|
|
79
89
|
inputValue.value = key.toString();
|
|
80
90
|
} else {
|
|
81
|
-
inputValue.value = (((
|
|
91
|
+
inputValue.value = (((_b = (_a = inputValue.value) == null ? void 0 : _a.toString) == null ? void 0 : _b.call(_a)) || "") + key;
|
|
82
92
|
}
|
|
93
|
+
setInputValueStatus();
|
|
83
94
|
break;
|
|
84
95
|
}
|
|
85
96
|
}
|
|
86
97
|
function updateFraction(value2) {
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
if (!setInputStatus(inputValue, inputValueStatus))
|
|
99
|
+
return;
|
|
100
|
+
inputValue.value = (Math.round(+inputValue.value * (1 / value2) * 100) / 100).toString();
|
|
101
|
+
setInputValueStatus();
|
|
89
102
|
}
|
|
90
103
|
function calculateFraction() {
|
|
104
|
+
if (!setInputStatus(inputValue, inputValueStatus) || !setInputStatus(numeratorValue, numeratorValueStatus, true) || !setInputStatus(denominatorValue, denominatorValueStatus, true))
|
|
105
|
+
return;
|
|
91
106
|
const value2 = getNumber(integerValue.value) + getNumber(numeratorValue.value) / getNumber(denominatorValue.value);
|
|
92
|
-
inputValue.value = (
|
|
107
|
+
inputValue.value = (Math.round(+inputValue.value * value2 * 100) / 100).toString();
|
|
108
|
+
setInputValueStatus();
|
|
109
|
+
}
|
|
110
|
+
function setInputStatus(valueRef, statusRef, isInteger) {
|
|
111
|
+
if (!isInteger && (!valueRef.value || valueRef.value === ".") || isInteger && !valueRef.value) {
|
|
112
|
+
statusRef.value = "error";
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
function setInputValueStatus() {
|
|
118
|
+
inputValueStatus.value = !inputValue.value ? "error" : "success";
|
|
93
119
|
}
|
|
94
120
|
return (_ctx, _cache) => {
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
class: normalizeClass(key === "0" ? "is-0" : ""),
|
|
127
|
-
onClick: ($event) => keydown(key)
|
|
128
|
-
}, toDisplayString(key), 11, _hoisted_4);
|
|
129
|
-
}), 128))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}),
|
|
133
|
-
createVNode(unref(NSpace), null, {
|
|
134
|
-
default: withCtx(() => [
|
|
135
|
-
createElementVNode("span", {
|
|
136
|
-
class: "opt",
|
|
137
|
-
onClick: _cache[2] || (_cache[2] = ($event) => keydown("Undo"))
|
|
138
|
-
}, [
|
|
139
|
-
createVNode(unref(NIcon), { component: unref(ArrowUndoSharp) }, null, 8, ["component"])
|
|
140
|
-
]),
|
|
141
|
-
createElementVNode("span", {
|
|
142
|
-
class: "opt",
|
|
143
|
-
onClick: _cache[3] || (_cache[3] = ($event) => keydown("Enter"))
|
|
144
|
-
}, "\u786E\u5B9A")
|
|
121
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
122
|
+
createCommentVNode(' <n-popover\n ref="popoverRef"\n v-if="!isDefault"\n trigger="click"\n :show-arrow="false"\n placement="bottom-start"\n style="padding: 0"\n display-directive="show"\n > '),
|
|
123
|
+
createCommentVNode(' <template #trigger>\n <n-input-number v-model:value="value" :show-button="false" />\n </template> '),
|
|
124
|
+
!unref(isDefault) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
125
|
+
createElementVNode("div", _hoisted_2, [
|
|
126
|
+
createVNode(InputNumber, {
|
|
127
|
+
modelValue: inputValue.value,
|
|
128
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
129
|
+
status: inputValueStatus.value,
|
|
130
|
+
"onUpdate:status": _cache[1] || (_cache[1] = ($event) => inputValueStatus.value = $event)
|
|
131
|
+
}, null, 8, ["modelValue", "status"]),
|
|
132
|
+
createElementVNode("div", _hoisted_3, [
|
|
133
|
+
createVNode(unref(NSpace), null, {
|
|
134
|
+
default: withCtx(() => [
|
|
135
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(numberKeys.value, (key) => {
|
|
136
|
+
return openBlock(), createElementBlock("span", {
|
|
137
|
+
key,
|
|
138
|
+
class: normalizeClass(key === "0" ? "is-0" : ""),
|
|
139
|
+
onClick: ($event) => keydown(key)
|
|
140
|
+
}, toDisplayString(key), 11, _hoisted_4);
|
|
141
|
+
}), 128))
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}),
|
|
145
|
+
createVNode(unref(NSpace), null, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
createElementVNode("span", {
|
|
148
|
+
class: "opt",
|
|
149
|
+
onClick: _cache[2] || (_cache[2] = ($event) => keydown("Undo"))
|
|
150
|
+
}, [
|
|
151
|
+
createVNode(unref(NIcon), { component: unref(ArrowUndoSharp) }, null, 8, ["component"])
|
|
145
152
|
]),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
153
|
+
createElementVNode("span", {
|
|
154
|
+
class: "opt",
|
|
155
|
+
onClick: _cache[3] || (_cache[3] = ($event) => keydown("Enter"))
|
|
156
|
+
}, "\u786E\u5B9A")
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
})
|
|
160
|
+
])
|
|
161
|
+
]),
|
|
162
|
+
unref(isDay) ? (openBlock(), createBlock(unref(NSpace), {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "right-days",
|
|
165
|
+
justify: "center",
|
|
166
|
+
vertical: ""
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [
|
|
169
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(days.value, (day) => {
|
|
170
|
+
return openBlock(), createElementBlock("span", {
|
|
171
|
+
class: "btn",
|
|
172
|
+
key: day,
|
|
173
|
+
onClick: ($event) => keydown(day)
|
|
174
|
+
}, toDisplayString(day) + "\u5929", 9, _hoisted_5);
|
|
175
|
+
}), 128))
|
|
149
176
|
]),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
177
|
+
_: 1
|
|
178
|
+
})) : createCommentVNode("v-if", true),
|
|
179
|
+
unref(isDose) ? (openBlock(), createBlock(unref(NSpace), {
|
|
180
|
+
key: 1,
|
|
181
|
+
class: "right-dose",
|
|
182
|
+
"wrap-item": false
|
|
183
|
+
}, {
|
|
184
|
+
default: withCtx(() => [
|
|
185
|
+
createElementVNode("div", _hoisted_6, [
|
|
186
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(doses.value, (dose) => {
|
|
158
187
|
return openBlock(), createElementBlock("span", {
|
|
159
188
|
class: "btn",
|
|
160
|
-
key:
|
|
161
|
-
onClick: ($event) =>
|
|
162
|
-
}, toDisplayString(
|
|
189
|
+
key: dose,
|
|
190
|
+
onClick: ($event) => updateFraction(dose)
|
|
191
|
+
}, "1/" + toDisplayString(dose), 9, _hoisted_7);
|
|
163
192
|
}), 128))
|
|
164
193
|
]),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
key: dose,
|
|
178
|
-
onClick: ($event) => updateFraction(dose)
|
|
179
|
-
}, "1/" + toDisplayString(dose), 9, _hoisted_7);
|
|
180
|
-
}), 128))
|
|
181
|
-
]),
|
|
182
|
-
createVNode(unref(NSpace), {
|
|
183
|
-
justify: "center",
|
|
184
|
-
vertical: ""
|
|
185
|
-
}, {
|
|
186
|
-
default: withCtx(() => [
|
|
187
|
-
createElementVNode("div", _hoisted_8, [
|
|
194
|
+
createVNode(unref(NSpace), {
|
|
195
|
+
justify: "center",
|
|
196
|
+
vertical: ""
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
createElementVNode("div", _hoisted_8, [
|
|
200
|
+
createVNode(InputNumber, {
|
|
201
|
+
integer: "",
|
|
202
|
+
modelValue: integerValue.value,
|
|
203
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => integerValue.value = $event)
|
|
204
|
+
}, null, 8, ["modelValue"]),
|
|
205
|
+
createElementVNode("div", _hoisted_9, [
|
|
188
206
|
createVNode(InputNumber, {
|
|
189
207
|
integer: "",
|
|
190
|
-
modelValue:
|
|
191
|
-
"onUpdate:modelValue": _cache[
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}, null, 8, ["modelValue"])
|
|
205
|
-
])
|
|
206
|
-
]),
|
|
207
|
-
createElementVNode("span", {
|
|
208
|
-
class: "btn",
|
|
209
|
-
onClick: calculateFraction
|
|
210
|
-
}, "\u5206\u5B50\u5F0F\u5242\u91CF")
|
|
208
|
+
modelValue: numeratorValue.value,
|
|
209
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => numeratorValue.value = $event),
|
|
210
|
+
status: numeratorValueStatus.value,
|
|
211
|
+
"onUpdate:status": _cache[6] || (_cache[6] = ($event) => numeratorValueStatus.value = $event)
|
|
212
|
+
}, null, 8, ["modelValue", "status"]),
|
|
213
|
+
_hoisted_10,
|
|
214
|
+
createVNode(InputNumber, {
|
|
215
|
+
integer: "",
|
|
216
|
+
modelValue: denominatorValue.value,
|
|
217
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => denominatorValue.value = $event),
|
|
218
|
+
status: denominatorValueStatus.value,
|
|
219
|
+
"onUpdate:status": _cache[8] || (_cache[8] = ($event) => denominatorValueStatus.value = $event)
|
|
220
|
+
}, null, 8, ["modelValue", "status"])
|
|
221
|
+
])
|
|
211
222
|
]),
|
|
212
|
-
|
|
213
|
-
|
|
223
|
+
createElementVNode("span", {
|
|
224
|
+
class: "btn",
|
|
225
|
+
onClick: calculateFraction
|
|
226
|
+
}, "\u5206\u5B50\u5F0F\u5242\u91CF")
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
})
|
|
230
|
+
]),
|
|
231
|
+
_: 1
|
|
232
|
+
})) : createCommentVNode("v-if", true)
|
|
233
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
234
|
+
createCommentVNode(" </n-popover> "),
|
|
235
|
+
createElementVNode("div", {
|
|
236
|
+
class: normalizeClass(["c-keyboard-english", __props.dragable ? "isFixed" : ""]),
|
|
237
|
+
ref_key: "englishKeyboardRef",
|
|
238
|
+
ref: englishKeyboardRef,
|
|
239
|
+
style: normalizeStyle(unref(style))
|
|
240
|
+
}, [
|
|
241
|
+
createVNode(unref(NSpace), {
|
|
242
|
+
"wrap-item": false,
|
|
243
|
+
align: "center",
|
|
244
|
+
justify: "space-between",
|
|
245
|
+
ref_key: "keyboardDragRef",
|
|
246
|
+
ref: keyboardDragRef,
|
|
247
|
+
style: { "cursor": "move" }
|
|
248
|
+
}, {
|
|
249
|
+
default: withCtx(() => [
|
|
250
|
+
_hoisted_11,
|
|
251
|
+
createVNode(unref(NIcon), {
|
|
252
|
+
onClick: _cache[9] || (_cache[9] = ($event) => keydown("close")),
|
|
253
|
+
component: unref(Close)
|
|
254
|
+
}, null, 8, ["component"])
|
|
214
255
|
]),
|
|
215
256
|
_: 1
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
class: normalizeClass(["key" + index]),
|
|
240
|
-
onClick: ($event) => keydown(key)
|
|
241
|
-
}, [
|
|
242
|
-
key === "Switch" ? (openBlock(), createBlock(unref(NIcon), {
|
|
243
|
-
key: 0,
|
|
244
|
-
component: unref(GitCompareOutline)
|
|
245
|
-
}, null, 8, ["component"])) : createCommentVNode("v-if", true),
|
|
246
|
-
key === "Undo" ? (openBlock(), createBlock(unref(NIcon), {
|
|
247
|
-
key: 1,
|
|
248
|
-
component: unref(ArrowUndoSharp)
|
|
249
|
-
}, null, 8, ["component"])) : createCommentVNode("v-if", true),
|
|
250
|
-
createTextVNode(" " + toDisplayString(!ENGLISHOTHERKEY.includes(key) || key === "Enter" ? key : key === "" ? "\u7A7A\u683C" : ""), 1)
|
|
251
|
-
], 10, _hoisted_14);
|
|
252
|
-
}), 128))
|
|
253
|
-
])
|
|
254
|
-
]));
|
|
257
|
+
}, 512),
|
|
258
|
+
createElementVNode("div", _hoisted_12, [
|
|
259
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(englishKeys.value, (key, index) => {
|
|
260
|
+
return openBlock(), createElementBlock("span", {
|
|
261
|
+
key,
|
|
262
|
+
class: normalizeClass(["key" + index]),
|
|
263
|
+
onClick: ($event) => keydown(key)
|
|
264
|
+
}, [
|
|
265
|
+
key === "Switch" ? (openBlock(), createBlock(unref(NIcon), {
|
|
266
|
+
key: 0,
|
|
267
|
+
component: unref(GitCompareOutline)
|
|
268
|
+
}, null, 8, ["component"])) : createCommentVNode("v-if", true),
|
|
269
|
+
key === "Undo" ? (openBlock(), createBlock(unref(NIcon), {
|
|
270
|
+
key: 1,
|
|
271
|
+
component: unref(ArrowUndoSharp)
|
|
272
|
+
}, null, 8, ["component"])) : createCommentVNode("v-if", true),
|
|
273
|
+
createTextVNode(" " + toDisplayString(!ENGLISHOTHERKEY.includes(key) || key === "Enter" ? key : key === "" ? "\u7A7A\u683C" : ""), 1)
|
|
274
|
+
], 10, _hoisted_13);
|
|
275
|
+
}), 128))
|
|
276
|
+
])
|
|
277
|
+
], 6)
|
|
278
|
+
], 2112))
|
|
279
|
+
], 2112);
|
|
255
280
|
};
|
|
256
281
|
}
|
|
257
282
|
});
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, Ref } from 'vue';
|
|
2
|
+
declare type IPointer = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
2
6
|
declare const _default: import("vue").DefineComponent<{
|
|
3
7
|
mode: {
|
|
4
|
-
type: PropType<"
|
|
8
|
+
type: PropType<"day" | "dose" | "english">;
|
|
5
9
|
default: string;
|
|
6
10
|
};
|
|
11
|
+
dragable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
positionInitialValue: {
|
|
16
|
+
type: PropType<IPointer>;
|
|
17
|
+
default: () => {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
7
22
|
}, {
|
|
8
23
|
NUMBERKEYS: string;
|
|
9
24
|
DAYS: number[];
|
|
@@ -13,35 +28,53 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
28
|
ENGLISHKEYS_: string[];
|
|
14
29
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
15
30
|
mode: {
|
|
16
|
-
type: PropType<"
|
|
31
|
+
type: PropType<"day" | "dose" | "english">;
|
|
17
32
|
default: string;
|
|
18
33
|
};
|
|
34
|
+
dragable: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
positionInitialValue: {
|
|
39
|
+
type: PropType<IPointer>;
|
|
40
|
+
default: () => {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
19
45
|
}>> & {
|
|
20
46
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
21
47
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
22
48
|
}>>;
|
|
23
49
|
emit: (event: "change" | "keydown", ...args: any[]) => void;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
50
|
+
englishKeyboardRef: Ref<HTMLElement | null>;
|
|
51
|
+
keyboardDragRef: Ref<HTMLElement | null>;
|
|
52
|
+
numberKeys: Ref<string[]>;
|
|
53
|
+
days: Ref<number[]>;
|
|
54
|
+
doses: Ref<number[]>;
|
|
55
|
+
englishKeys: Ref<string[]>;
|
|
56
|
+
value: Ref<any>;
|
|
57
|
+
inputValue: Ref<string>;
|
|
58
|
+
integerValue: Ref<any>;
|
|
59
|
+
numeratorValue: Ref<any>;
|
|
60
|
+
denominatorValue: Ref<any>;
|
|
61
|
+
inputValueStatus: Ref<string>;
|
|
62
|
+
numeratorValueStatus: Ref<string>;
|
|
63
|
+
denominatorValueStatus: Ref<string>;
|
|
37
64
|
isDefault: import("vue").ComputedRef<boolean>;
|
|
38
65
|
isDay: import("vue").ComputedRef<boolean>;
|
|
39
66
|
isDose: import("vue").ComputedRef<boolean>;
|
|
67
|
+
history: Ref<import("@vueuse/core").UseRefHistoryRecord<string>[]>;
|
|
68
|
+
undo: () => void;
|
|
69
|
+
redo: () => void;
|
|
70
|
+
x: Ref<number>;
|
|
71
|
+
y: Ref<number>;
|
|
72
|
+
style: import("vue").ComputedRef<string>;
|
|
40
73
|
keydown: (key: string | number) => void;
|
|
41
74
|
updateFraction: (value: number) => void;
|
|
42
75
|
calculateFraction: () => void;
|
|
43
|
-
|
|
44
|
-
|
|
76
|
+
setInputStatus: (valueRef: Ref<string>, statusRef: Ref<string>, isInteger?: boolean) => true | undefined;
|
|
77
|
+
setInputValueStatus: () => void;
|
|
45
78
|
NIcon: any;
|
|
46
79
|
NSpace: any;
|
|
47
80
|
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<{}>>, {}>;
|
|
@@ -56,6 +89,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
89
|
type: BooleanConstructor;
|
|
57
90
|
default: boolean;
|
|
58
91
|
};
|
|
92
|
+
status: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
59
96
|
}, {
|
|
60
97
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
61
98
|
modelValue: {
|
|
@@ -66,10 +103,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
103
|
type: BooleanConstructor;
|
|
67
104
|
default: boolean;
|
|
68
105
|
};
|
|
106
|
+
status: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
69
110
|
}>> & {
|
|
70
111
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
71
113
|
}>>;
|
|
72
|
-
emit: (event: "update:modelValue", ...args: any[]) => void;
|
|
114
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
73
115
|
update: (value: string | [string, string]) => void;
|
|
74
116
|
validator: (value: string) => boolean;
|
|
75
117
|
calculate: (type: string) => void;
|
|
@@ -78,7 +120,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
78
120
|
NSpace: any;
|
|
79
121
|
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<{}>>, {}>;
|
|
80
122
|
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<{}>>, {}>;
|
|
81
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
+
}, 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<{
|
|
82
124
|
modelValue: {
|
|
83
125
|
type: StringConstructor;
|
|
84
126
|
default: string;
|
|
@@ -87,21 +129,40 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
129
|
type: BooleanConstructor;
|
|
88
130
|
default: boolean;
|
|
89
131
|
};
|
|
132
|
+
status: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: string;
|
|
135
|
+
};
|
|
90
136
|
}>> & {
|
|
91
137
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
138
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
92
139
|
}, {
|
|
93
140
|
modelValue: string;
|
|
141
|
+
status: string;
|
|
94
142
|
integer: boolean;
|
|
95
143
|
}>;
|
|
96
144
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "keydown")[], "change" | "keydown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
97
145
|
mode: {
|
|
98
|
-
type: PropType<"
|
|
146
|
+
type: PropType<"day" | "dose" | "english">;
|
|
99
147
|
default: string;
|
|
100
148
|
};
|
|
149
|
+
dragable: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
positionInitialValue: {
|
|
154
|
+
type: PropType<IPointer>;
|
|
155
|
+
default: () => {
|
|
156
|
+
x: number;
|
|
157
|
+
y: number;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
101
160
|
}>> & {
|
|
102
161
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
103
162
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
104
163
|
}, {
|
|
105
|
-
mode: "
|
|
164
|
+
mode: "day" | "dose" | "english";
|
|
165
|
+
dragable: boolean;
|
|
166
|
+
positionInitialValue: IPointer;
|
|
106
167
|
}>;
|
|
107
168
|
export default _default;
|