@vunk/form 2.18.1 → 2.19.0
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/components/_plugin-vue_export-helper.cjs +1 -11
- package/components/api-tables-select/index.cjs +1 -467
- package/components/api-tables-select/index.mjs +56 -413
- package/components/api-tables-select/src/ctx.d.ts +152 -172
- package/components/api-tables-select/src/index.vue.d.ts +394 -983
- package/components/button/index.cjs +1 -112
- package/components/button/index.mjs +57 -85
- package/components/button/src/ctx.d.ts +28 -113
- package/components/button/src/index.vue.d.ts +317 -625
- package/components/card-input-collection/index.cjs +1 -352
- package/components/card-input-collection/index.mjs +177 -261
- package/components/card-input-collection/src/core.vue.d.ts +54 -950
- package/components/card-input-collection/src/ctx.d.ts +19 -49
- package/components/card-input-collection/src/index.vue.d.ts +46 -110
- package/components/cascader/index.cjs +1 -150
- package/components/cascader/index.mjs +88 -116
- package/components/cascader/src/ctx.d.ts +140 -207
- package/components/cascader/src/index.vue.d.ts +315 -522
- package/components/cascader/src/use.d.ts +1 -1
- package/components/checkbox/index.cjs +1 -152
- package/components/checkbox/index.mjs +75 -119
- package/components/checkbox/src/ctx.d.ts +46 -69
- package/components/checkbox/src/index.vue.d.ts +448 -1016
- package/components/cloneDeep.cjs +1 -2106
- package/components/color-picker/index.cjs +1 -80
- package/components/color-picker/index.mjs +46 -69
- package/components/color-picker/src/ctx.d.ts +130 -107
- package/components/color-picker/src/index.vue.d.ts +285 -255
- package/components/date-picker/index.cjs +1 -119
- package/components/date-picker/index.mjs +63 -97
- package/components/date-picker/src/ctx.d.ts +123 -206
- package/components/date-picker/src/index.vue.d.ts +269 -1358
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/date-picker-range/index.cjs +1 -177
- package/components/date-picker-range/index.mjs +62 -113
- package/components/date-picker-range/src/ctx.d.ts +130 -206
- package/components/date-picker-range/src/index.vue.d.ts +861 -448
- package/components/debounce.cjs +1 -0
- package/components/dialog/index.cjs +1 -126
- package/components/dialog/index.mjs +65 -99
- package/components/dialog/src/ctx.d.ts +17 -108
- package/components/dialog/src/index.vue.d.ts +77 -1072
- package/components/dialog-input-collection/index.cjs +1 -624
- package/components/dialog-input-collection/index.mjs +276 -498
- package/components/dialog-input-collection/src/ctx.d.ts +21 -52
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +29 -6371
- package/components/dialog-input-collection/src/index.vue.d.ts +65 -7630
- package/components/dialog-input-collection/src/layout.vue.d.ts +13 -73
- package/components/download-plus/index.cjs +1 -456
- package/components/download-plus/index.mjs +215 -358
- package/components/download-plus/src/api.d.ts +1 -1
- package/components/download-plus/src/ctx.d.ts +21 -52
- package/components/download-plus/src/index.vue.d.ts +437 -1177
- package/components/editable-text/index.cjs +1 -295
- package/components/editable-text/index.mjs +113 -239
- package/components/editable-text/src/ctx.d.ts +24 -50
- package/components/editable-text/src/index.vue.d.ts +59 -3258
- package/components/el-slider/index.cjs +1 -0
- package/components/el-slider/index.d.ts +5 -0
- package/components/el-slider/index.mjs +475 -0
- package/components/el-slider/src/button.d.ts +36 -0
- package/components/el-slider/src/button.vue.d.ts +41 -0
- package/components/el-slider/src/composables/index.cjs +1 -0
- package/components/el-slider/src/composables/index.d.ts +6 -0
- package/components/el-slider/src/composables/index.mjs +9 -0
- package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
- package/components/el-slider/src/composables/use-marks.d.ts +7 -0
- package/components/el-slider/src/composables/use-slide.d.ts +23 -0
- package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
- package/components/el-slider/src/composables/use-stops.d.ts +8 -0
- package/components/el-slider/src/composables/use-watch.d.ts +4 -0
- package/components/el-slider/src/constants.d.ts +14 -0
- package/components/el-slider/src/marker.d.ts +37 -0
- package/components/el-slider/src/slider-core.vue.d.ts +218 -0
- package/components/el-slider/src/slider.d.ts +174 -0
- package/components/esri-input-geojson/index.cjs +2 -1604
- package/components/esri-input-geojson/index.mjs +682 -1290
- package/components/esri-input-geojson/src/append.vue.d.ts +239 -1099
- package/components/esri-input-geojson/src/const.d.ts +1 -1
- package/components/esri-input-geojson/src/ctx.d.ts +66 -161
- package/components/esri-input-geojson/src/default-view.vue.d.ts +8 -132
- package/components/esri-input-geojson/src/index.vue.d.ts +982 -708
- package/components/esri-input-geojson/src/types.d.ts +1 -0
- package/components/esri-input-geojson/src/viewer.vue.d.ts +53 -282
- package/components/fieldset/index.cjs +1 -110
- package/components/fieldset/index.mjs +63 -76
- package/components/fieldset/src/ctx.d.ts +4 -4
- package/components/fieldset/src/index.vue.d.ts +7 -7
- package/components/form/index.cjs +1 -248
- package/components/form/index.mjs +107 -161
- package/components/form/src/ctx.d.ts +15 -64
- package/components/form/src/index.vue.d.ts +374 -2431
- package/components/form-item/index.cjs +1 -294
- package/components/form-item/index.mjs +140 -229
- package/components/form-item/src/core.vue.d.ts +32 -1854
- package/components/form-item/src/ctx.d.ts +19 -51
- package/components/form-item/src/index.vue.d.ts +38 -101
- package/components/form-item-renderer/index.cjs +1 -193
- package/components/form-item-renderer/index.mjs +103 -162
- package/components/form-item-renderer/src/core.vue.d.ts +9 -9
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +24 -74
- package/components/form-item-renderer-template/index.cjs +1 -47
- package/components/form-item-renderer-template/index.mjs +20 -33
- package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
- package/components/forms-provider/index.cjs +1 -99
- package/components/forms-provider/index.mjs +44 -73
- package/components/forms-provider/src/core.d.ts +3 -2
- package/components/forms-provider/src/segment.vue.d.ts +8 -8
- package/components/forms-provider/src/view.vue.d.ts +14 -4
- package/components/index.cjs +1 -399
- package/components/index2.cjs +1 -17
- package/components/information/index.cjs +1 -65
- package/components/information/index.mjs +28 -38
- package/components/information/src/ctx.d.ts +2 -2
- package/components/information/src/index.vue.d.ts +4 -4
- package/components/information-collection/index.cjs +1 -81
- package/components/information-collection/index.mjs +44 -48
- package/components/information-collection/src/ctx.d.ts +29 -65
- package/components/information-collection/src/index.vue.d.ts +64 -136
- package/components/information-renderer/index.cjs +1 -16
- package/components/information-renderer/index.d.ts +9 -9
- package/components/information-renderer/index.mjs +9 -10
- package/components/information-tag/index.cjs +1 -101
- package/components/information-tag/index.mjs +44 -54
- package/components/information-tag/src/ctx.d.ts +6 -21
- package/components/information-tag/src/index.vue.d.ts +23 -51
- package/components/information-templates-default/index.cjs +1 -101
- package/components/information-templates-default/index.mjs +63 -73
- package/components/information-templates-default/src/index.vue.d.ts +1 -1
- package/components/input/index.cjs +1 -115
- package/components/input/index.mjs +60 -83
- package/components/input/src/ctx.d.ts +51 -152
- package/components/input/src/index.vue.d.ts +392 -951
- package/components/input-array/index.cjs +1 -297
- package/components/input-array/index.mjs +115 -232
- package/components/input-array/src/ctx.d.ts +19 -49
- package/components/input-array/src/form-template.vue.d.ts +1 -900
- package/components/input-array/src/index.vue.d.ts +43 -729
- package/components/input-collection/index.cjs +1 -444
- package/components/input-collection/index.mjs +195 -347
- package/components/input-collection/src/core.vue.d.ts +64 -1026
- package/components/input-collection/src/ctx.d.ts +21 -51
- package/components/input-collection/src/index.vue.d.ts +50 -114
- package/components/input-file/index.cjs +1 -142
- package/components/input-file/index.mjs +68 -100
- package/components/input-file/src/ctx.d.ts +8 -29
- package/components/input-file/src/index.vue.d.ts +444 -74
- package/components/input-file/src/template.vue.d.ts +1 -124
- package/components/input-link/index.cjs +1 -167
- package/components/input-link/index.mjs +60 -83
- package/components/input-link/src/ctx.d.ts +52 -137
- package/components/input-link/src/index.vue.d.ts +833 -311
- package/components/input-number/index.cjs +1 -119
- package/components/input-number/index.mjs +73 -87
- package/components/input-number/src/ctx.d.ts +38 -131
- package/components/input-number/src/index.vue.d.ts +321 -683
- package/components/input-tag/index.cjs +1 -100
- package/components/input-tag/index.mjs +51 -78
- package/components/input-tag/src/ctx.d.ts +43 -145
- package/components/input-tag/src/index.vue.d.ts +324 -778
- package/components/isObject.cjs +1 -165
- package/components/monaco-editor/index.cjs +1 -83
- package/components/monaco-editor/index.mjs +40 -59
- package/components/monaco-editor/src/ctx.d.ts +19 -44
- package/components/monaco-editor/src/index.vue.d.ts +209 -109
- package/components/radio/index.cjs +1 -267
- package/components/radio/index.mjs +110 -209
- package/components/radio/src/ctx.d.ts +27 -91
- package/components/radio/src/index.vue.d.ts +298 -1279
- package/components/radio/src/option.vue.d.ts +29 -881
- package/components/radio/src/wraper.vue.d.ts +64 -196
- package/components/renderer-data/index.cjs +1 -41
- package/components/renderer-data/index.mjs +19 -26
- package/components/renderer-data/src/ctx.d.ts +1 -1
- package/components/renderer-data/src/index.vue.d.ts +2 -2
- package/components/select/index.cjs +1 -311
- package/components/select/index.mjs +156 -214
- package/components/select/src/core.vue.d.ts +638 -1080
- package/components/select/src/ctx.d.ts +140 -223
- package/components/select/src/index.vue.d.ts +334 -610
- package/components/select/src/options.vue.d.ts +1 -1
- package/components/slider/index.cjs +1 -88
- package/components/slider/index.mjs +41 -70
- package/components/slider/src/ctx.d.ts +63 -174
- package/components/slider/src/index.vue.d.ts +151 -420
- package/components/style.css +1 -0
- package/components/switch/index.cjs +1 -88
- package/components/switch/index.mjs +37 -69
- package/components/switch/src/ctx.d.ts +34 -113
- package/components/switch/src/index.vue.d.ts +88 -699
- package/components/switch/src/types.d.ts +2 -2
- package/components/tables-select/index.cjs +1 -263
- package/components/tables-select/index.mjs +102 -172
- package/components/tables-select/src/ctx.d.ts +76 -91
- package/components/tables-select/src/index.vue.d.ts +228 -4969
- package/components/template-instances-provider/index.cjs +1 -31
- package/components/template-instances-provider/index.mjs +18 -22
- package/components/template-instances-provider/src/index.vue.d.ts +2 -2
- package/components/templates-default/index.cjs +1 -235
- package/components/templates-default/index.mjs +152 -211
- package/components/templates-default/src/ctx.d.ts +5 -3
- package/components/templates-default/src/index.vue.d.ts +7298 -157
- package/components/templates-element-plus/index.cjs +1 -112
- package/components/templates-element-plus/index.mjs +49 -91
- package/components/templates-element-plus/src/ctx.d.ts +1 -1
- package/components/templates-element-plus/src/index.vue.d.ts +65 -258
- package/components/templates-esri/index.cjs +1 -65
- package/components/templates-esri/index.mjs +29 -39
- package/components/templates-esri/src/ctx.d.ts +1 -1
- package/components/templates-esri/src/index.vue.d.ts +1776 -24
- package/components/templates-layout/index.cjs +1 -137
- package/components/templates-layout/index.mjs +78 -116
- package/components/templates-layout/src/ctx.d.ts +1 -1
- package/components/templates-layout/src/index.vue.d.ts +79 -411
- package/components/templates-variant/index.cjs +1 -70
- package/components/templates-variant/index.mjs +33 -43
- package/components/templates-variant/src/ctx.d.ts +1 -1
- package/components/templates-variant/src/index.vue.d.ts +1238 -24
- package/components/time-picker/index.cjs +1 -104
- package/components/time-picker/index.mjs +57 -87
- package/components/time-picker/src/ctx.d.ts +121 -211
- package/components/time-picker/src/index.vue.d.ts +263 -1368
- package/components/upload/index.cjs +1 -663
- package/components/upload/index.mjs +343 -537
- package/components/upload/src/ctx.d.ts +108 -195
- package/components/upload/src/file.vue.d.ts +197 -776
- package/components/upload/src/index.vue.d.ts +689 -1931
- package/components/upload/src/types.d.ts +1 -1
- package/components/upload/src/wraper.vue.d.ts +232 -407
- package/components/upload-plus/index.cjs +21 -18673
- package/components/upload-plus/index.mjs +4598 -18372
- package/components/upload-plus/src/api.d.ts +2 -2
- package/components/upload-plus/src/ctx.d.ts +24 -51
- package/components/upload-plus/src/index.vue.d.ts +51 -1656
- package/components/use-watch.cjs +1 -0
- package/components/van-cascader/index.cjs +1 -125
- package/components/van-cascader/index.mjs +51 -96
- package/components/van-cascader/src/ctx.d.ts +135 -203
- package/components/van-cascader/src/index.vue.d.ts +312 -985
- package/components/var-datetime-picker/index.cjs +1 -333
- package/components/var-datetime-picker/index.mjs +175 -254
- package/components/var-datetime-picker/src/ctx.d.ts +19 -50
- package/components/var-datetime-picker/src/index.vue.d.ts +688 -1115
- package/components/vditor/index.cjs +1 -86
- package/components/vditor/index.mjs +40 -66
- package/components/vditor/src/ctx.d.ts +16 -45
- package/components/vditor/src/index.vue.d.ts +195 -120
- package/composables/element-plus/index.cjs +1 -23
- package/composables/element-plus/index.mjs +14 -18
- package/composables/index.cjs +1 -161
- package/composables/index.d.ts +1 -0
- package/composables/index.mjs +102 -135
- package/composables/useForm.d.ts +2 -2
- package/composables/useRtl.d.ts +18 -0
- package/composables/useSourceManager.d.ts +2 -2
- package/composables/useTemplateInstances.d.ts +3 -3
- package/index.css +1 -562
- package/index.d.ts +0 -3
- package/index.esm.js +23 -48
- package/locale/index.cjs +1 -110
- package/locale/index.mjs +37 -45
- package/locale/lang/en.d.ts +2 -6
- package/locale/lang/index.cjs +1 -2
- package/locale/lang/index.d.ts +1 -0
- package/locale/lang/zh-cn.d.ts +2 -6
- package/package.json +14 -85
- package/shared/const/index.cjs +1 -59
- package/shared/const/index.d.ts +1 -1
- package/shared/const/index.mjs +18 -20
- package/shared/element-plus/ctx.d.ts +40 -37
- package/shared/element-plus/index.cjs +1 -211
- package/shared/element-plus/index.mjs +93 -161
- package/shared/element-plus/instances.d.ts +207 -321
- package/shared/form/index.cjs +1 -33
- package/shared/form/index.mjs +23 -25
- package/shared/helper/index.cjs +1 -11
- package/shared/helper/index.mjs +7 -8
- package/shared/index.cjs +1 -8
- package/shared/index.mjs +5 -1
- package/shared/infer-prop/index.cjs +1 -36
- package/shared/infer-prop/index.mjs +22 -28
- package/shared/progress-it/index.cjs +1 -42
- package/shared/progress-it/index.mjs +15 -31
- package/shared/rules/index.cjs +1 -56
- package/shared/rules/index.mjs +19 -18
- package/shared/types/form/index.cjs +1 -2
- package/shared/types/index.cjs +1 -2
- package/shared/types/source/index.cjs +1 -2
- package/shared/types/source-manager/index.cjs +1 -2
- package/shared/upload/index.cjs +1 -774
- package/shared/upload/index.mjs +180 -764
- package/component.d.ts +0 -3
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/card-input-collection/index.css +0 -21
- package/components/cascader/index.css +0 -9
- package/components/checkbox/index.css +0 -30
- package/components/cloneDeep.mjs +0 -2104
- package/components/date-picker-range/index.css +0 -18
- package/components/dialog-input-collection/index.css +0 -21
- package/components/download-plus/index.css +0 -68
- package/components/editable-text/index.css +0 -9
- package/components/esri-input-geojson/index.css +0 -32
- package/components/fieldset/index.css +0 -5
- package/components/form-item/index.css +0 -35
- package/components/index.mjs +0 -378
- package/components/index2.mjs +0 -14
- package/components/information-tag/index.css +0 -6
- package/components/information-templates-default/index.css +0 -16
- package/components/input-array/index.css +0 -14
- package/components/input-collection/index.css +0 -20
- package/components/input-link/index.css +0 -4
- package/components/input-number/index.css +0 -13
- package/components/isObject.mjs +0 -158
- package/components/monaco-editor/index.css +0 -4
- package/components/radio/index.css +0 -40
- package/components/select/index.css +0 -15
- package/components/switch/index.css +0 -10
- package/components/tables-select/index.css +0 -3
- package/components/templates-layout/index.css +0 -3
- package/components/upload/index.css +0 -34
- package/components/upload-plus/index.css +0 -84
- package/components/van-cascader/index.css +0 -6
- package/components/var-datetime-picker/index.css +0 -17
- package/defaults.d.ts +0 -5
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { _VkfFormItemCtx, VkfFormItem } from
|
|
2
|
-
import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode, createVNode, normalizeClass, createCommentVNode } from
|
|
3
|
-
import { useComputedReadonly } from
|
|
4
|
-
import { useLocale } from
|
|
5
|
-
import { Popup } from
|
|
6
|
-
import { DatePicker, TimePicker } from
|
|
7
|
-
import { ElDatePicker, ElTabPane, ElTabs, dayjs } from
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { _ as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
..._VkfFormItemCtx.props,
|
|
1
|
+
import { _VkfFormItemCtx as Y, VkfFormItem as M } from "@vunk/form/components/form-item";
|
|
2
|
+
import { defineComponent as w, computed as n, ref as F, resolveComponent as r, openBlock as h, createBlock as R, normalizeProps as B, guardReactiveProps as H, withCtx as i, createElementVNode as I, createVNode as u, normalizeClass as S, createCommentVNode as C } from "vue";
|
|
3
|
+
import { useComputedReadonly as O } from "@vunk/form/composables";
|
|
4
|
+
import { useLocale as U } from "@vunk/form/composables/element-plus";
|
|
5
|
+
import { Popup as $ } from "vant";
|
|
6
|
+
import { DatePicker as j, TimePicker as z } from "@varlet/ui";
|
|
7
|
+
import { ElDatePicker as N, ElTabPane as L, ElTabs as _, dayjs as m } from "element-plus";
|
|
8
|
+
import "vant/es/popup/style";
|
|
9
|
+
import "@varlet/ui/es/date-picker/style";
|
|
10
|
+
import "@varlet/ui/es/time-picker/style";
|
|
11
|
+
import { _ as q } from "../_plugin-vue_export-helper.cjs";
|
|
12
|
+
const A = {
|
|
13
|
+
...Y.props,
|
|
15
14
|
modelValue: null,
|
|
16
15
|
readonly: Boolean,
|
|
17
16
|
type: {
|
|
@@ -28,300 +27,222 @@ const props = {
|
|
|
28
27
|
type: String,
|
|
29
28
|
default: "YYYY-MM-DD HH:mm"
|
|
30
29
|
}
|
|
31
|
-
}
|
|
32
|
-
const emits = {
|
|
30
|
+
}, G = {
|
|
33
31
|
"update:modelValue": null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const VarDatePickerTypeOptions = [
|
|
32
|
+
}, J = [
|
|
37
33
|
{
|
|
38
|
-
label: "
|
|
39
|
-
value: "date"
|
|
34
|
+
label: "日期",
|
|
35
|
+
value: "date",
|
|
40
36
|
format: "YYYY-MM-DD"
|
|
41
37
|
},
|
|
42
38
|
{
|
|
43
|
-
label: "
|
|
44
|
-
value: "year"
|
|
39
|
+
label: "年",
|
|
40
|
+
value: "year",
|
|
45
41
|
format: "YYYY"
|
|
46
42
|
},
|
|
47
43
|
{
|
|
48
|
-
label: "
|
|
49
|
-
value: "month"
|
|
44
|
+
label: "月",
|
|
45
|
+
value: "month",
|
|
50
46
|
format: "YYYY-MM"
|
|
51
47
|
}
|
|
52
|
-
]
|
|
53
|
-
const VarDatePickerTypeReflect = VarDatePickerTypeOptions.reduce((acc, cur) => {
|
|
54
|
-
acc[cur.value] = cur;
|
|
55
|
-
return acc;
|
|
56
|
-
}, {});
|
|
57
|
-
const ElDatePickerTypeOptions = [
|
|
48
|
+
], K = J.reduce((e, a) => (e[a.value] = a, e), {}), Q = [
|
|
58
49
|
{
|
|
59
|
-
label: "
|
|
50
|
+
label: "日期",
|
|
60
51
|
value: "date",
|
|
61
|
-
varDatePickerType: "date"
|
|
62
|
-
isRange:
|
|
52
|
+
varDatePickerType: "date",
|
|
53
|
+
isRange: !1
|
|
63
54
|
},
|
|
64
55
|
{
|
|
65
|
-
label: "
|
|
56
|
+
label: "年",
|
|
66
57
|
value: "year",
|
|
67
|
-
varDatePickerType: "year"
|
|
68
|
-
isRange:
|
|
58
|
+
varDatePickerType: "year",
|
|
59
|
+
isRange: !1
|
|
69
60
|
},
|
|
70
61
|
{
|
|
71
|
-
label: "
|
|
62
|
+
label: "月",
|
|
72
63
|
value: "month",
|
|
73
|
-
varDatePickerType: "month"
|
|
74
|
-
isRange:
|
|
64
|
+
varDatePickerType: "month",
|
|
65
|
+
isRange: !1
|
|
75
66
|
},
|
|
76
67
|
{
|
|
77
68
|
value: "dates",
|
|
78
|
-
label: "
|
|
79
|
-
varDatePickerType: "date"
|
|
80
|
-
isRange:
|
|
69
|
+
label: "多选日期",
|
|
70
|
+
varDatePickerType: "date",
|
|
71
|
+
isRange: !1
|
|
81
72
|
},
|
|
82
73
|
{
|
|
83
74
|
value: "week",
|
|
84
|
-
label: "
|
|
85
|
-
varDatePickerType: "date"
|
|
86
|
-
isRange:
|
|
75
|
+
label: "周",
|
|
76
|
+
varDatePickerType: "date",
|
|
77
|
+
isRange: !1
|
|
87
78
|
},
|
|
88
79
|
{
|
|
89
80
|
value: "datetime",
|
|
90
|
-
label: "
|
|
91
|
-
varDatePickerType: "date"
|
|
92
|
-
isRange:
|
|
93
|
-
hasTime:
|
|
81
|
+
label: "日期时间",
|
|
82
|
+
varDatePickerType: "date",
|
|
83
|
+
isRange: !1,
|
|
84
|
+
hasTime: !0
|
|
94
85
|
},
|
|
95
86
|
{
|
|
96
87
|
value: "datetimerange",
|
|
97
|
-
label: "
|
|
98
|
-
varDatePickerType: "date"
|
|
88
|
+
label: "日期时间范围",
|
|
89
|
+
varDatePickerType: "date",
|
|
99
90
|
/**
|
|
100
91
|
* 采用独立的时间选择器
|
|
101
92
|
*/
|
|
102
|
-
isRange:
|
|
103
|
-
hasTime:
|
|
93
|
+
isRange: !1,
|
|
94
|
+
hasTime: !0
|
|
104
95
|
},
|
|
105
96
|
{
|
|
106
97
|
value: "daterange",
|
|
107
|
-
label: "
|
|
108
|
-
varDatePickerType: "date"
|
|
109
|
-
isRange:
|
|
98
|
+
label: "日期范围",
|
|
99
|
+
varDatePickerType: "date",
|
|
100
|
+
isRange: !0
|
|
110
101
|
},
|
|
111
102
|
{
|
|
112
103
|
value: "monthrange",
|
|
113
|
-
label: "
|
|
114
|
-
varDatePickerType: "month"
|
|
115
|
-
isRange:
|
|
104
|
+
label: "月范围",
|
|
105
|
+
varDatePickerType: "month",
|
|
106
|
+
isRange: !0
|
|
116
107
|
}
|
|
117
|
-
]
|
|
118
|
-
const ElDatePickerTypeReflect = ElDatePickerTypeOptions.reduce((acc, cur) => {
|
|
119
|
-
acc[cur.value] = cur;
|
|
120
|
-
return acc;
|
|
121
|
-
}, {});
|
|
122
|
-
|
|
123
|
-
var _sfc_main = defineComponent({
|
|
108
|
+
], T = Q.reduce((e, a) => (e[a.value] = a, e), {}), W = w({
|
|
124
109
|
name: "VkfVarDatetimePicker",
|
|
125
110
|
components: {
|
|
126
|
-
VkfFormItem,
|
|
127
|
-
ElDatePicker,
|
|
128
|
-
DatePicker,
|
|
129
|
-
TimePicker,
|
|
130
|
-
Popup
|
|
131
|
-
ElTabPane,
|
|
132
|
-
ElTabs
|
|
111
|
+
VkfFormItem: M,
|
|
112
|
+
ElDatePicker: N,
|
|
113
|
+
DatePicker: j,
|
|
114
|
+
TimePicker: z,
|
|
115
|
+
Popup: $,
|
|
116
|
+
ElTabPane: L,
|
|
117
|
+
ElTabs: _
|
|
133
118
|
},
|
|
134
|
-
props,
|
|
135
|
-
emits,
|
|
136
|
-
setup(
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const hasTime = computed(() => {
|
|
149
|
-
return !!ElDatePickerTypeReflect[props2.type].hasTime;
|
|
150
|
-
});
|
|
151
|
-
const getDateFromModelValue = () => {
|
|
152
|
-
return props2.modelValue ? dayjs(props2.modelValue).format(varDatePickerFormat.value) : "";
|
|
153
|
-
};
|
|
154
|
-
const getTimeFromModelValue = () => {
|
|
155
|
-
return props2.modelValue ? dayjs(props2.modelValue).format(props2.useSeconds ? "HH:mm:ss" : "HH:mm") : "";
|
|
156
|
-
};
|
|
157
|
-
const tansformModelValueByDateValue = (dateValue) => {
|
|
158
|
-
if (!dateValue) return "";
|
|
159
|
-
const date = dayjs(dateValue, varDatePickerFormat.value);
|
|
160
|
-
if (!props2.modelValue) {
|
|
161
|
-
return date.format(props2.valueFormat);
|
|
162
|
-
}
|
|
163
|
-
return dayjs(props2.modelValue).year(date.year()).month(date.month()).date(date.date()).format(props2.valueFormat);
|
|
164
|
-
};
|
|
165
|
-
const tansformModelValueByTimeValue = (timeValue) => {
|
|
166
|
-
if (!timeValue) return "";
|
|
167
|
-
const time = dayjs(
|
|
168
|
-
timeValue,
|
|
169
|
-
props2.useSeconds ? "HH:mm:ss" : "HH:mm"
|
|
119
|
+
props: A,
|
|
120
|
+
emits: G,
|
|
121
|
+
setup(e, { emit: a }) {
|
|
122
|
+
const P = Y.createBindProps(e), { tr: D } = U(), p = n(() => T[e.type].varDatePickerType), c = n(() => K[p.value].format), f = n(() => !!T[e.type].isRange), s = n(() => !!T[e.type].hasTime), d = () => e.modelValue ? m(e.modelValue).format(c.value) : "", v = () => e.modelValue ? m(e.modelValue).format(e.useSeconds ? "HH:mm:ss" : "HH:mm") : "", k = (o) => {
|
|
123
|
+
if (!o)
|
|
124
|
+
return "";
|
|
125
|
+
const t = m(o, c.value);
|
|
126
|
+
return e.modelValue ? m(e.modelValue).year(t.year()).month(t.month()).date(t.date()).format(e.valueFormat) : t.format(e.valueFormat);
|
|
127
|
+
}, y = (o) => {
|
|
128
|
+
if (!o)
|
|
129
|
+
return "";
|
|
130
|
+
const t = m(
|
|
131
|
+
o,
|
|
132
|
+
e.useSeconds ? "HH:mm:ss" : "HH:mm"
|
|
170
133
|
);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
return dayjs(props2.modelValue).hour(time.hour()).minute(time.minute()).second(time.second()).format(props2.valueFormat);
|
|
175
|
-
};
|
|
176
|
-
const valueDate = computed({
|
|
134
|
+
return e.modelValue ? m(e.modelValue).hour(t.hour()).minute(t.minute()).second(t.second()).format(e.valueFormat) : t.format(e.valueFormat);
|
|
135
|
+
}, V = n({
|
|
177
136
|
get() {
|
|
178
|
-
return
|
|
137
|
+
return d();
|
|
179
138
|
},
|
|
180
|
-
set(
|
|
181
|
-
const
|
|
182
|
-
|
|
139
|
+
set(o) {
|
|
140
|
+
const t = k(o);
|
|
141
|
+
a("update:modelValue", t);
|
|
183
142
|
}
|
|
184
|
-
})
|
|
185
|
-
const valueTime = computed({
|
|
143
|
+
}), l = n({
|
|
186
144
|
get() {
|
|
187
|
-
return
|
|
145
|
+
return v();
|
|
188
146
|
},
|
|
189
|
-
set(
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
const readonly = useComputedReadonly(props2);
|
|
195
|
-
const popupShow = ref(false);
|
|
196
|
-
const currentTab = ref("date");
|
|
197
|
-
const inputBlur = (e) => {
|
|
198
|
-
const target = e.target;
|
|
199
|
-
target.blur();
|
|
200
|
-
};
|
|
201
|
-
const preInput = () => {
|
|
202
|
-
if (readonly.value) return;
|
|
203
|
-
if (props2.modelValue && hasTime.value) {
|
|
204
|
-
currentTab.value = "time";
|
|
147
|
+
set(o) {
|
|
148
|
+
const t = y(o);
|
|
149
|
+
a("update:modelValue", t);
|
|
205
150
|
}
|
|
206
|
-
|
|
207
|
-
};
|
|
151
|
+
}), E = O(e), b = F(!1), g = F("date");
|
|
208
152
|
return {
|
|
209
|
-
preInput
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
153
|
+
preInput: () => {
|
|
154
|
+
E.value || (e.modelValue && s.value && (g.value = "time"), b.value = !0);
|
|
155
|
+
},
|
|
156
|
+
inputBlur: (o) => {
|
|
157
|
+
o.target.blur();
|
|
158
|
+
},
|
|
159
|
+
popupShow: b,
|
|
160
|
+
formItemBindProps: P,
|
|
161
|
+
varDatePickerType: p,
|
|
162
|
+
isRange: f,
|
|
163
|
+
hasTime: s,
|
|
164
|
+
currentTab: g,
|
|
165
|
+
valueTime: l,
|
|
166
|
+
valueDate: V,
|
|
167
|
+
tr: D
|
|
220
168
|
};
|
|
221
169
|
}
|
|
222
170
|
});
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
createVNode(_component_TimePicker, {
|
|
293
|
-
modelValue: _ctx.valueTime,
|
|
294
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.valueTime = $event),
|
|
295
|
-
format: "24hr"
|
|
296
|
-
}, null, 8, ["modelValue"])
|
|
297
|
-
]),
|
|
298
|
-
_: 1
|
|
299
|
-
/* STABLE */
|
|
300
|
-
}, 8, ["label"])) : createCommentVNode("v-if", true)
|
|
301
|
-
]),
|
|
302
|
-
_: 1
|
|
303
|
-
/* STABLE */
|
|
304
|
-
}, 8, ["modelValue", "class"])
|
|
305
|
-
]),
|
|
306
|
-
_: 1
|
|
307
|
-
/* STABLE */
|
|
308
|
-
}, 8, ["show"])
|
|
309
|
-
]),
|
|
310
|
-
_: 1
|
|
311
|
-
/* STABLE */
|
|
312
|
-
},
|
|
313
|
-
16
|
|
314
|
-
/* FULL_PROPS */
|
|
315
|
-
);
|
|
171
|
+
function X(e, a, P, D, p, c) {
|
|
172
|
+
const f = r("ElDatePicker"), s = r("DatePicker"), d = r("ElTabPane"), v = r("TimePicker"), k = r("ElTabs"), y = r("Popup"), V = r("VkfFormItem");
|
|
173
|
+
return h(), R(V, B(H(e.formItemBindProps)), {
|
|
174
|
+
default: i(() => [
|
|
175
|
+
I("div", {
|
|
176
|
+
onClickCapture: a[0] || (a[0] = (...l) => e.preInput && e.preInput(...l))
|
|
177
|
+
}, [
|
|
178
|
+
u(f, {
|
|
179
|
+
"popper-class": "var-datetime-picker-el-popover",
|
|
180
|
+
"model-value": e.modelValue,
|
|
181
|
+
type: e.type,
|
|
182
|
+
readonly: !0,
|
|
183
|
+
"value-format": e.valueFormat,
|
|
184
|
+
onFocus: e.inputBlur
|
|
185
|
+
}, null, 8, ["model-value", "type", "value-format", "onFocus"])
|
|
186
|
+
], 32),
|
|
187
|
+
u(y, {
|
|
188
|
+
show: e.popupShow,
|
|
189
|
+
"onUpdate:show": a[4] || (a[4] = (l) => e.popupShow = l),
|
|
190
|
+
position: "bottom",
|
|
191
|
+
round: ""
|
|
192
|
+
}, {
|
|
193
|
+
default: i(() => [
|
|
194
|
+
u(k, {
|
|
195
|
+
modelValue: e.currentTab,
|
|
196
|
+
"onUpdate:modelValue": a[3] || (a[3] = (l) => e.currentTab = l),
|
|
197
|
+
class: S(["var-datetime-picker-el-tabs", {
|
|
198
|
+
"is-hidden": !e.hasTime
|
|
199
|
+
}])
|
|
200
|
+
}, {
|
|
201
|
+
default: i(() => [
|
|
202
|
+
u(d, {
|
|
203
|
+
label: e.valueDate || e.tr("el.datepicker.selectDate", "选择日期"),
|
|
204
|
+
name: "date"
|
|
205
|
+
}, {
|
|
206
|
+
default: i(() => [
|
|
207
|
+
u(s, {
|
|
208
|
+
modelValue: e.valueDate,
|
|
209
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => e.valueDate = l),
|
|
210
|
+
type: e.varDatePickerType,
|
|
211
|
+
range: e.isRange,
|
|
212
|
+
"allowed-dates": e.allowedDates
|
|
213
|
+
}, null, 8, ["modelValue", "type", "range", "allowed-dates"])
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}, 8, ["label"]),
|
|
217
|
+
e.hasTime ? (h(), R(d, {
|
|
218
|
+
key: 0,
|
|
219
|
+
label: e.valueTime || e.tr("el.datepicker.selectTime", "选择时间"),
|
|
220
|
+
name: "time"
|
|
221
|
+
}, {
|
|
222
|
+
default: i(() => [
|
|
223
|
+
u(v, {
|
|
224
|
+
modelValue: e.valueTime,
|
|
225
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => e.valueTime = l),
|
|
226
|
+
format: "24hr"
|
|
227
|
+
}, null, 8, ["modelValue"])
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["label"])) : C("", !0)
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
}, 8, ["modelValue", "class"])
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, ["show"])
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 16);
|
|
316
240
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
241
|
+
const de = /* @__PURE__ */ q(W, [["render", X]]), pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
320
242
|
__proto__: null
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
243
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
244
|
+
export {
|
|
245
|
+
de as VkfVarDatetimePicker,
|
|
246
|
+
pe as __VkfVarDatetimePicker,
|
|
247
|
+
de as default
|
|
325
248
|
};
|
|
326
|
-
|
|
327
|
-
export { VkfVarDatetimePicker, types as __VkfVarDatetimePicker, VkfVarDatetimePicker as default };
|
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { DatePickType } from 'element-plus';
|
|
1
|
+
import type { PropType } from 'vue';
|
|
3
2
|
export declare const props: {
|
|
4
|
-
modelValue:
|
|
3
|
+
modelValue: null;
|
|
5
4
|
readonly: BooleanConstructor;
|
|
6
5
|
type: {
|
|
7
|
-
type: PropType<
|
|
6
|
+
type: PropType<"year" | "years" | "month" | "months" | "date" | "dates" | "week" | "datetime" | "daterange" | "monthrange" | "yearrange">;
|
|
8
7
|
default: string;
|
|
9
8
|
};
|
|
10
9
|
allowedDates: {
|
|
11
10
|
type: PropType<(date: string) => boolean>;
|
|
12
|
-
default:
|
|
11
|
+
default: undefined;
|
|
13
12
|
};
|
|
14
13
|
useSeconds: BooleanConstructor;
|
|
15
14
|
valueFormat: {
|
|
16
15
|
type: StringConstructor;
|
|
17
16
|
default: string;
|
|
18
17
|
};
|
|
19
|
-
required:
|
|
20
|
-
readonly type: PropType<boolean>;
|
|
21
|
-
readonly required: false;
|
|
22
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
23
|
-
__epPropKey: true;
|
|
24
|
-
} & {
|
|
25
|
-
readonly default: undefined;
|
|
26
|
-
};
|
|
18
|
+
required: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
27
19
|
formItemSize: {
|
|
28
20
|
type: PropType<"default" | "small" | "large">;
|
|
29
21
|
default: "default" | "small" | "large";
|
|
30
22
|
};
|
|
31
23
|
formItemSlots: {
|
|
32
|
-
type: PropType<import("
|
|
33
|
-
default:
|
|
24
|
+
type: PropType<import("../../form-item/src/types").FormItemSlots>;
|
|
25
|
+
default: undefined;
|
|
34
26
|
};
|
|
35
27
|
elRef: {
|
|
36
28
|
type: PropType<any>;
|
|
@@ -42,67 +34,44 @@ export declare const props: {
|
|
|
42
34
|
};
|
|
43
35
|
formItemTip: {
|
|
44
36
|
type: StringConstructor;
|
|
45
|
-
default:
|
|
37
|
+
default: undefined;
|
|
46
38
|
};
|
|
47
|
-
formItemTipClass:
|
|
39
|
+
formItemTipClass: null;
|
|
48
40
|
labelTip: {
|
|
49
41
|
type: StringConstructor;
|
|
50
|
-
default:
|
|
42
|
+
default: undefined;
|
|
51
43
|
};
|
|
52
44
|
information: {
|
|
53
45
|
type: BooleanConstructor;
|
|
54
46
|
default: boolean;
|
|
55
47
|
};
|
|
56
|
-
prop:
|
|
57
|
-
defaultModelValue:
|
|
48
|
+
prop: null;
|
|
49
|
+
defaultModelValue: null;
|
|
58
50
|
label: StringConstructor;
|
|
59
51
|
labelWidth: {
|
|
60
|
-
readonly type: PropType<
|
|
61
|
-
readonly required: false;
|
|
62
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
63
|
-
__epPropKey: true;
|
|
64
|
-
} & {
|
|
65
|
-
readonly default: "";
|
|
66
|
-
};
|
|
67
|
-
labelPosition: {
|
|
68
|
-
readonly type: PropType<"" | "top" | "left" | "right">;
|
|
52
|
+
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
69
53
|
readonly required: false;
|
|
70
54
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
71
55
|
__epPropKey: true;
|
|
72
|
-
} & {
|
|
73
|
-
readonly default: "";
|
|
74
56
|
};
|
|
57
|
+
labelPosition: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
75
58
|
rules: {
|
|
76
|
-
readonly type: PropType<unknown
|
|
59
|
+
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | null)[], unknown, unknown>>;
|
|
77
60
|
readonly required: false;
|
|
78
61
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
79
62
|
__epPropKey: true;
|
|
80
63
|
};
|
|
81
64
|
error: StringConstructor;
|
|
82
65
|
validateStatus: {
|
|
83
|
-
readonly type: PropType<"" | "error" | "success" | "validating"
|
|
66
|
+
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
|
|
84
67
|
readonly required: false;
|
|
85
68
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
86
69
|
__epPropKey: true;
|
|
87
70
|
};
|
|
88
71
|
for: StringConstructor;
|
|
89
|
-
inlineMessage:
|
|
90
|
-
|
|
91
|
-
readonly required: false;
|
|
92
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
93
|
-
__epPropKey: true;
|
|
94
|
-
} & {
|
|
95
|
-
readonly default: "";
|
|
96
|
-
};
|
|
97
|
-
showMessage: {
|
|
98
|
-
readonly type: PropType<boolean>;
|
|
99
|
-
readonly required: false;
|
|
100
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
101
|
-
__epPropKey: true;
|
|
102
|
-
} & {
|
|
103
|
-
readonly default: true;
|
|
104
|
-
};
|
|
72
|
+
inlineMessage: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
73
|
+
showMessage: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
105
74
|
};
|
|
106
75
|
export declare const emits: {
|
|
107
|
-
'update:modelValue':
|
|
76
|
+
'update:modelValue': null;
|
|
108
77
|
};
|