@vunk/form 1.1.59 → 1.1.61
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,5 +1,5 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
|
-
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, normalizeClass, createCommentVNode } from 'vue';
|
|
2
|
+
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode, createVNode, normalizeClass, createCommentVNode } from 'vue';
|
|
3
3
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
4
4
|
import { Popup } from 'vant';
|
|
5
5
|
import { DatePicker, TimePicker } from '@varlet/ui';
|
|
@@ -215,6 +215,10 @@ const _sfc_main = defineComponent({
|
|
|
215
215
|
const readonly = useComputedReadonly(props2);
|
|
216
216
|
const popupShow = ref(false);
|
|
217
217
|
const currentTab = ref("date");
|
|
218
|
+
const inputBlur = (e) => {
|
|
219
|
+
const target = e.target;
|
|
220
|
+
target.blur();
|
|
221
|
+
};
|
|
218
222
|
const preInput = () => {
|
|
219
223
|
if (readonly.value)
|
|
220
224
|
return;
|
|
@@ -225,6 +229,7 @@ const _sfc_main = defineComponent({
|
|
|
225
229
|
};
|
|
226
230
|
return {
|
|
227
231
|
preInput,
|
|
232
|
+
inputBlur,
|
|
228
233
|
popupShow,
|
|
229
234
|
formItemBindProps,
|
|
230
235
|
varDatePickerType,
|
|
@@ -246,16 +251,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
246
251
|
const _component_VkfFormItem = resolveComponent("VkfFormItem");
|
|
247
252
|
return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
|
|
248
253
|
default: withCtx(() => [
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
createElementVNode("div", {
|
|
255
|
+
onClickCapture: _cache[0] || (_cache[0] = (...args) => _ctx.preInput && _ctx.preInput(...args))
|
|
256
|
+
}, [
|
|
257
|
+
createVNode(_component_ElDatePicker, {
|
|
258
|
+
"popper-class": "var-datetime-picker-el-popover",
|
|
259
|
+
"model-value": _ctx.modelValue,
|
|
260
|
+
onFocus: _ctx.inputBlur,
|
|
261
|
+
type: _ctx.type,
|
|
262
|
+
readonly: _ctx.readonly,
|
|
263
|
+
"value-format": _ctx.valueFormat
|
|
264
|
+
}, null, 8, ["model-value", "onFocus", "type", "readonly", "value-format"])
|
|
265
|
+
], 32),
|
|
255
266
|
createVNode(_component_Popup, {
|
|
256
267
|
position: "bottom",
|
|
257
268
|
show: _ctx.popupShow,
|
|
258
|
-
"onUpdate:show": _cache[
|
|
269
|
+
"onUpdate:show": _cache[4] || (_cache[4] = ($event) => _ctx.popupShow = $event),
|
|
259
270
|
round: ""
|
|
260
271
|
}, {
|
|
261
272
|
default: withCtx(() => [
|
|
@@ -264,7 +275,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
264
275
|
"is-hidden": !_ctx.hasTime
|
|
265
276
|
}]),
|
|
266
277
|
modelValue: _ctx.currentTab,
|
|
267
|
-
"onUpdate:modelValue": _cache[
|
|
278
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.currentTab = $event)
|
|
268
279
|
}, {
|
|
269
280
|
default: withCtx(() => [
|
|
270
281
|
createVNode(_component_ElTabPane, {
|
|
@@ -276,7 +287,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
276
287
|
type: _ctx.varDatePickerType,
|
|
277
288
|
range: _ctx.isRange,
|
|
278
289
|
modelValue: _ctx.valueDate,
|
|
279
|
-
"onUpdate:modelValue": _cache[
|
|
290
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.valueDate = $event),
|
|
280
291
|
"allowed-dates": _ctx.allowedDates
|
|
281
292
|
}, null, 8, ["type", "range", "modelValue", "allowed-dates"])
|
|
282
293
|
]),
|
|
@@ -290,7 +301,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
290
301
|
default: withCtx(() => [
|
|
291
302
|
createVNode(_component_TimePicker, {
|
|
292
303
|
modelValue: _ctx.valueTime,
|
|
293
|
-
"onUpdate:modelValue": _cache[
|
|
304
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.valueTime = $event),
|
|
305
|
+
format: "24hr"
|
|
294
306
|
}, null, 8, ["modelValue"])
|
|
295
307
|
]),
|
|
296
308
|
_: 1
|
|
@@ -64,6 +64,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
64
|
};
|
|
65
65
|
}, {
|
|
66
66
|
preInput: () => void;
|
|
67
|
+
inputBlur: (e: FocusEvent) => void;
|
|
67
68
|
popupShow: import("vue").Ref<boolean>;
|
|
68
69
|
formItemBindProps: import("vue").ComputedRef<{
|
|
69
70
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|