@vunk/form 1.1.58 → 1.1.60
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,10 +1,9 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
2
|
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, normalizeClass, createCommentVNode } from 'vue';
|
|
3
|
-
import { VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
4
3
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
5
4
|
import { Popup } from 'vant';
|
|
6
5
|
import { DatePicker, TimePicker } from '@varlet/ui';
|
|
7
|
-
import { ElTabPane, ElTabs, dayjs } from 'element-plus';
|
|
6
|
+
import { ElDatePicker, ElTabPane, ElTabs, dayjs } from 'element-plus';
|
|
8
7
|
import 'vant/es/popup/style';
|
|
9
8
|
import '@varlet/ui/es/date-picker/style';
|
|
10
9
|
import '@varlet/ui/es/time-picker/style';
|
|
@@ -145,7 +144,7 @@ const _sfc_main = defineComponent({
|
|
|
145
144
|
name: "VkfVarDatetimePicker",
|
|
146
145
|
components: {
|
|
147
146
|
VkfFormItem,
|
|
148
|
-
|
|
147
|
+
ElDatePicker,
|
|
149
148
|
DatePicker,
|
|
150
149
|
TimePicker,
|
|
151
150
|
Popup,
|
|
@@ -216,7 +215,9 @@ const _sfc_main = defineComponent({
|
|
|
216
215
|
const readonly = useComputedReadonly(props2);
|
|
217
216
|
const popupShow = ref(false);
|
|
218
217
|
const currentTab = ref("date");
|
|
219
|
-
const preInput = () => {
|
|
218
|
+
const preInput = (e) => {
|
|
219
|
+
const target = e.target;
|
|
220
|
+
target.blur();
|
|
220
221
|
if (readonly.value)
|
|
221
222
|
return;
|
|
222
223
|
if (props2.modelValue && hasTime.value) {
|
|
@@ -238,7 +239,7 @@ const _sfc_main = defineComponent({
|
|
|
238
239
|
}
|
|
239
240
|
});
|
|
240
241
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
241
|
-
const
|
|
242
|
+
const _component_ElDatePicker = resolveComponent("ElDatePicker");
|
|
242
243
|
const _component_DatePicker = resolveComponent("DatePicker");
|
|
243
244
|
const _component_ElTabPane = resolveComponent("ElTabPane");
|
|
244
245
|
const _component_TimePicker = resolveComponent("TimePicker");
|
|
@@ -247,7 +248,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
247
248
|
const _component_VkfFormItem = resolveComponent("VkfFormItem");
|
|
248
249
|
return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
|
|
249
250
|
default: withCtx(() => [
|
|
250
|
-
createVNode(
|
|
251
|
+
createVNode(_component_ElDatePicker, {
|
|
251
252
|
"popper-class": "var-datetime-picker-el-popover",
|
|
252
253
|
"model-value": _ctx.modelValue,
|
|
253
254
|
onFocus: _ctx.preInput,
|
|
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
default: string;
|
|
64
64
|
};
|
|
65
65
|
}, {
|
|
66
|
-
preInput: () => void;
|
|
66
|
+
preInput: (e: FocusEvent) => void;
|
|
67
67
|
popupShow: import("vue").Ref<boolean>;
|
|
68
68
|
formItemBindProps: import("vue").ComputedRef<{
|
|
69
69
|
required: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown> | undefined;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { DatePickType } from 'element-plus';
|
|
2
2
|
import { VarDatePickerType } from './const';
|
|
3
|
+
import { VueComponentPropsType } from '@vunk/core';
|
|
4
|
+
import { BasicSource } from '@vunk/form';
|
|
5
|
+
import type CoreVue from './index.vue.d';
|
|
3
6
|
export interface VarDatePickerTypeMedia {
|
|
4
7
|
label: string;
|
|
5
8
|
value: VarDatePickerType;
|
|
@@ -12,4 +15,8 @@ export interface ElDatePickerTypeMedia {
|
|
|
12
15
|
isRange?: boolean;
|
|
13
16
|
hasTime?: boolean;
|
|
14
17
|
}
|
|
18
|
+
export interface Source<P extends string = string> extends VueComponentPropsType<typeof CoreVue>, BasicSource {
|
|
19
|
+
prop?: P;
|
|
20
|
+
templateType: 'VkfVarDatetimePicker';
|
|
21
|
+
}
|
|
15
22
|
export {};
|