cnhis-design-vue 3.1.32-beta.1 → 3.1.32-beta.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { defineComponent, ref, createVNode, mergeProps } from 'vue';
|
|
2
2
|
import { NTimePicker } from 'naive-ui';
|
|
3
3
|
import { useCommon } from './useCommon.js';
|
|
4
4
|
|
|
@@ -36,6 +36,7 @@ var EditTime = defineComponent({
|
|
|
36
36
|
formRef,
|
|
37
37
|
isShow
|
|
38
38
|
} = useCommon(props, attrs);
|
|
39
|
+
const __value = ref(attrs.formattedValue);
|
|
39
40
|
const onConfirm = (value) => {
|
|
40
41
|
emit("formChange", {
|
|
41
42
|
value,
|
|
@@ -62,8 +63,12 @@ var EditTime = defineComponent({
|
|
|
62
63
|
const result = valueFormat.includes(":") ? strInsert(str, 2) : str;
|
|
63
64
|
return result;
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
const onUpdateValue = (event) => {
|
|
67
|
+
var _a2;
|
|
68
|
+
__value.value = ((_a2 = event.target) == null ? void 0 : _a2.value) || "";
|
|
69
|
+
};
|
|
70
|
+
function onBlur() {
|
|
71
|
+
let time = __value.value;
|
|
67
72
|
const isHHmm = /^(0\d{1}|1\d{1}|2[0-3]):([0-5]\d{1})$/;
|
|
68
73
|
const ishhmm = /^(0\d{1}|1\d{1}):([0-5]\d{1})$/;
|
|
69
74
|
const isHHmmss = /^(0\d{1}|1\d{1}|2[0-3]):[0-5]\d{1}:([0-5]\d{1})$/;
|
|
@@ -100,7 +105,8 @@ var EditTime = defineComponent({
|
|
|
100
105
|
"show": isShow.value,
|
|
101
106
|
"onUpdate:show": ($event) => isShow.value = $event
|
|
102
107
|
}, attrs, config, onFunc, {
|
|
103
|
-
"onUpdateFormattedValue": onConfirm
|
|
108
|
+
"onUpdateFormattedValue": onConfirm,
|
|
109
|
+
"onKeyup": onUpdateValue
|
|
104
110
|
}), null);
|
|
105
111
|
}
|
|
106
112
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.32-beta.
|
|
3
|
+
"version": "3.1.32-beta.2",
|
|
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": "7b01729fae8e63678024cd0f657c0297cd2e6c56"
|
|
65
65
|
}
|