@vunk/form 1.1.79 → 1.1.81
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/button/index.mjs +1 -1
- package/components/cascader/index.mjs +1 -1
- package/components/checkbox/index.mjs +1 -1
- package/components/color-picker/index.mjs +1 -1
- package/components/color-picker/src/index.vue.d.ts +1 -1
- package/components/date-picker/index.d.ts +1 -0
- package/components/date-picker/index.mjs +22 -5
- package/components/date-picker/src/ctx.d.ts +2 -0
- package/components/date-picker/src/index.vue.d.ts +2 -2
- package/components/date-picker-range/index.css +18 -0
- package/components/date-picker-range/index.d.ts +4 -0
- package/components/date-picker-range/index.mjs +164 -0
- package/components/date-picker-range/src/ctx.d.ts +177 -0
- package/components/date-picker-range/src/index.vue.d.ts +398 -0
- package/components/date-picker-range/src/types.d.ts +12 -0
- package/components/download-plus/index.mjs +1 -1
- package/components/esri-input-geojson/index.mjs +4 -4
- package/components/esri-input-geojson/src/ctx.d.ts +1 -1
- package/components/esri-input-geojson/src/index.vue.d.ts +1 -1
- package/components/form/index.mjs +8 -10
- package/components/form-item/index.mjs +1 -1
- package/components/form-item-renderer/index.mjs +1 -1
- package/components/form-item-renderer-template/index.mjs +1 -1
- package/components/geoinput/index.mjs +1 -1
- package/components/geoinput-read/index.mjs +3 -3
- package/components/geoinput-read/src/core.vue.d.ts +1 -1
- package/components/geoinput-read/src/ctx.d.ts +1 -1
- package/components/geoinput-update/index.mjs +2 -2
- package/components/geoinput-update/src/ctx.d.ts +1 -1
- package/components/geoinput-update/src/index.vue.d.ts +1 -1
- package/components/input/index.mjs +1 -1
- package/components/input/src/ctx.d.ts +1 -1
- package/components/input/src/index.vue.d.ts +1 -1
- package/components/input-link/index.mjs +1 -1
- package/components/input-number/index.mjs +1 -1
- package/components/input-number/src/ctx.d.ts +1 -1
- package/components/input-number/src/index.vue.d.ts +1 -1
- package/components/radio/index.mjs +1 -1
- package/components/select/index.mjs +1 -1
- package/components/select/src/index.vue.d.ts +1 -1
- package/components/slider/index.mjs +1 -1
- package/components/switch/index.mjs +1 -1
- package/components/switch/src/index.vue.d.ts +1 -1
- package/components/templates-default/index.mjs +1 -1
- package/components/templates-element-plus/index.mjs +2 -2
- package/components/templates-esri/index.mjs +2 -2
- package/components/templates-layout/index.mjs +1 -1
- package/components/templates-mapbox/index.mjs +1 -1
- package/components/templates-variant/index.d.ts +4 -0
- package/components/templates-variant/index.mjs +64 -0
- package/components/templates-variant/src/ctx.d.ts +11 -0
- package/components/templates-variant/src/index.vue.d.ts +20 -0
- package/components/templates-variant/src/types.d.ts +2 -0
- package/components/upload/index.mjs +2 -2
- package/components/upload-plus/index.mjs +1 -1
- package/components/van-cascader/index.mjs +1 -1
- package/components/var-datetime-picker/index.mjs +1 -1
- package/components/vditor/index.mjs +1 -1
- package/index.css +19 -0
- package/package.json +12 -1
- package/shared/const/index.d.ts +1 -1
- package/shared/element-plus/ctx.d.ts +5 -5
- package/shared/types/source/index.d.ts +2 -1
|
@@ -93,7 +93,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
93
93
|
/* FULL_PROPS */
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
var VkfButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "
|
|
96
|
+
var VkfButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/button/src/index.vue"]]);
|
|
97
97
|
|
|
98
98
|
var types = /*#__PURE__*/Object.freeze({
|
|
99
99
|
__proto__: null
|
|
@@ -109,7 +109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
109
109
|
/* FULL_PROPS */
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
|
-
var VkfCascader = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "
|
|
112
|
+
var VkfCascader = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/cascader/src/index.vue"]]);
|
|
113
113
|
|
|
114
114
|
var types = /*#__PURE__*/Object.freeze({
|
|
115
115
|
__proto__: null
|
|
@@ -133,7 +133,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
133
133
|
/* FULL_PROPS */
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
|
-
var VkfCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "
|
|
136
|
+
var VkfCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/checkbox/src/index.vue"]]);
|
|
137
137
|
|
|
138
138
|
var types = /*#__PURE__*/Object.freeze({
|
|
139
139
|
__proto__: null
|
|
@@ -61,7 +61,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
61
61
|
/* FULL_PROPS */
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
var VkfColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "
|
|
64
|
+
var VkfColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/color-picker/src/index.vue"]]);
|
|
65
65
|
|
|
66
66
|
var types = /*#__PURE__*/Object.freeze({
|
|
67
67
|
__proto__: null
|
|
@@ -80,8 +80,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
80
|
teleported: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
81
81
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
82
82
|
modelValue: string;
|
|
83
|
-
ariaLabel: string;
|
|
84
83
|
tabindex: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
84
|
+
ariaLabel: string;
|
|
85
85
|
showAlpha: boolean;
|
|
86
86
|
colorFormat: string;
|
|
87
87
|
predefine: string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
|
|
2
2
|
import { datePickerProps, datePickerEmits as datePickerEmits$1, createDatePickerBindProps, createDatePickerOnEmits } from '@vunk/form/shared/element-plus';
|
|
3
|
+
import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
|
|
3
4
|
import { defineComponent, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createSlots, renderList, resolveDynamicComponent } from 'vue';
|
|
4
5
|
import { ElDatePicker } from 'element-plus';
|
|
5
6
|
import { useComputedReadonly } from '@vunk/form/composables';
|
|
@@ -13,9 +14,19 @@ const props = {
|
|
|
13
14
|
default: void 0
|
|
14
15
|
}
|
|
15
16
|
};
|
|
17
|
+
const createBindProps = bindPropsFactory(props);
|
|
16
18
|
const emits = {
|
|
17
19
|
...datePickerEmits$1
|
|
18
20
|
};
|
|
21
|
+
const createOnEmits = onEmitsFactory(emits);
|
|
22
|
+
|
|
23
|
+
var ctx = /*#__PURE__*/Object.freeze({
|
|
24
|
+
__proto__: null,
|
|
25
|
+
createBindProps: createBindProps,
|
|
26
|
+
createOnEmits: createOnEmits,
|
|
27
|
+
emits: emits,
|
|
28
|
+
props: props
|
|
29
|
+
});
|
|
19
30
|
|
|
20
31
|
var _sfc_main = defineComponent({
|
|
21
32
|
name: "VkfDatePicker",
|
|
@@ -23,8 +34,8 @@ var _sfc_main = defineComponent({
|
|
|
23
34
|
VkfFormItem,
|
|
24
35
|
ElDatePicker
|
|
25
36
|
},
|
|
26
|
-
emits,
|
|
27
37
|
props,
|
|
38
|
+
emits,
|
|
28
39
|
setup(props2, { emit }) {
|
|
29
40
|
const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
|
|
30
41
|
const datePickerBindProps = createDatePickerBindProps(props2, [
|
|
@@ -51,7 +62,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
51
62
|
normalizeProps(guardReactiveProps(_ctx.formItemBindProps)),
|
|
52
63
|
{
|
|
53
64
|
default: withCtx(() => [
|
|
54
|
-
createVNode(_component_ElDatePicker, mergeProps(_ctx.datePickerBindProps, {
|
|
65
|
+
createVNode(_component_ElDatePicker, mergeProps(_ctx.datePickerBindProps, {
|
|
66
|
+
type: _ctx.type,
|
|
67
|
+
readonly: _ctx.readonly
|
|
68
|
+
}, toHandlers(_ctx.datePickerOnEmits)), createSlots({
|
|
55
69
|
_: 2
|
|
56
70
|
/* DYNAMIC */
|
|
57
71
|
}, [
|
|
@@ -72,7 +86,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
86
|
/* FULL_PROPS */
|
|
73
87
|
);
|
|
74
88
|
}
|
|
75
|
-
var VkfDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "
|
|
89
|
+
var VkfDatePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/date-picker/src/index.vue"]]);
|
|
76
90
|
|
|
77
91
|
const datePickerEmits = {
|
|
78
92
|
"update:modelValue": null,
|
|
@@ -90,7 +104,10 @@ var types = /*#__PURE__*/Object.freeze({
|
|
|
90
104
|
});
|
|
91
105
|
|
|
92
106
|
VkfDatePicker.install = (app) => {
|
|
93
|
-
app.component(
|
|
107
|
+
app.component(
|
|
108
|
+
VkfDatePicker.name || "VkfDatePicker",
|
|
109
|
+
VkfDatePicker
|
|
110
|
+
);
|
|
94
111
|
};
|
|
95
112
|
|
|
96
|
-
export { VkfDatePicker, types as __VkfDatePicker, VkfDatePicker as default };
|
|
113
|
+
export { VkfDatePicker, ctx as _VkfDatePickerCtx, types as __VkfDatePicker, VkfDatePicker as default };
|
|
@@ -144,6 +144,7 @@ export declare const props: {
|
|
|
144
144
|
};
|
|
145
145
|
isRange: BooleanConstructor;
|
|
146
146
|
};
|
|
147
|
+
export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"size", keyof T2> | Extract<"disabled", keyof T2> | Extract<"type", keyof T2> | Extract<"required", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"labelPosition", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"name", keyof T2> | Extract<"id", keyof T2> | Extract<"emptyValues", keyof T2> | Extract<"valueOnClear", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"clearable", keyof T2> | Extract<"popperClass", keyof T2> | Extract<"validateEvent", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"popperOptions", keyof T2> | Extract<"tabindex", keyof T2> | Extract<"ariaLabel", keyof T2> | Extract<"disabledDate", keyof T2> | Extract<"cellClassName", keyof T2> | Extract<"shortcuts", keyof T2> | Extract<"arrowControl", keyof T2> | Extract<"unlinkPanels", keyof T2> | Extract<"disabledHours", keyof T2> | Extract<"disabledMinutes", keyof T2> | Extract<"disabledSeconds", keyof T2> | Extract<"format", keyof T2> | Extract<"valueFormat", keyof T2> | Extract<"dateFormat", keyof T2> | Extract<"timeFormat", keyof T2> | Extract<"clearIcon", keyof T2> | Extract<"editable", keyof T2> | Extract<"prefixIcon", keyof T2> | Extract<"rangeSeparator", keyof T2> | Extract<"startPlaceholder", keyof T2> | Extract<"endPlaceholder", keyof T2> | Extract<"defaultValue", keyof T2> | Extract<"defaultTime", keyof T2> | Extract<"isRange", keyof T2> | Extract<"datePickerSlots", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"size" | "disabled" | "type" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "labelPosition" | "label" | "labelWidth" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "name" | "id" | "emptyValues" | "valueOnClear" | "placeholder" | "clearable" | "popperClass" | "validateEvent" | "modelValue" | "popperOptions" | "tabindex" | "ariaLabel" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "format" | "valueFormat" | "dateFormat" | "timeFormat" | "clearIcon" | "editable" | "prefixIcon" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "datePickerSlots", keyof T2>, KE> : Extract<"size" | "disabled" | "type" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "labelPosition" | "label" | "labelWidth" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "name" | "id" | "emptyValues" | "valueOnClear" | "placeholder" | "clearable" | "popperClass" | "validateEvent" | "modelValue" | "popperOptions" | "tabindex" | "ariaLabel" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "format" | "valueFormat" | "dateFormat" | "timeFormat" | "clearIcon" | "editable" | "prefixIcon" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "datePickerSlots", keyof T2>]: { [k in Extract<"size" | "disabled" | "type" | "required" | "formItemSize" | "formItemSlots" | "elRef" | "inline" | "readonly" | "labelPosition" | "label" | "labelWidth" | "prop" | "rules" | "error" | "validateStatus" | "for" | "inlineMessage" | "showMessage" | "name" | "id" | "emptyValues" | "valueOnClear" | "placeholder" | "clearable" | "popperClass" | "validateEvent" | "modelValue" | "popperOptions" | "tabindex" | "ariaLabel" | "disabledDate" | "cellClassName" | "shortcuts" | "arrowControl" | "unlinkPanels" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "format" | "valueFormat" | "dateFormat" | "timeFormat" | "clearIcon" | "editable" | "prefixIcon" | "rangeSeparator" | "startPlaceholder" | "endPlaceholder" | "defaultValue" | "defaultTime" | "isRange" | "datePickerSlots", keyof T2>]: T2[k]; }[P]; }>;
|
|
147
148
|
export declare const emits: {
|
|
148
149
|
'update:modelValue': any;
|
|
149
150
|
change: any;
|
|
@@ -154,3 +155,4 @@ export declare const emits: {
|
|
|
154
155
|
'visible-change': any;
|
|
155
156
|
keydown: any;
|
|
156
157
|
};
|
|
158
|
+
export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("update:modelValue" | "change" | "focus" | "blur" | "calendar-change" | "panel-change" | "visible-change" | "keydown")[]>(emit: T2, excludes?: EX) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue" | "change" | "focus" | "blur" | "calendar-change" | "panel-change" | "visible-change" | "keydown", KE> : "update:modelValue" | "change" | "focus" | "blur" | "calendar-change" | "panel-change" | "visible-change" | "keydown"]: { [k in "update:modelValue" | "change" | "focus" | "blur" | "calendar-change" | "panel-change" | "visible-change" | "keydown"]: (...e: import("@vunk/core").RestParameters<T2>) => void; }[P]; };
|
|
@@ -156,12 +156,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
156
156
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
157
157
|
modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType))[], unknown, unknown>;
|
|
158
158
|
popperOptions: {};
|
|
159
|
+
tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>;
|
|
159
160
|
ariaLabel: string;
|
|
160
161
|
disabledDate: Function;
|
|
161
162
|
cellClassName: Function;
|
|
162
163
|
shortcuts: unknown[];
|
|
163
164
|
arrowControl: boolean;
|
|
164
|
-
tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>;
|
|
165
165
|
unlinkPanels: boolean;
|
|
166
166
|
disabledHours: import("element-plus/es/components/time-picker/src/props/shared").GetDisabledHours;
|
|
167
167
|
disabledMinutes: import("element-plus/es/components/time-picker/src/props/shared").GetDisabledMinutes;
|
|
@@ -363,9 +363,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
363
363
|
validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
364
364
|
modelValue: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType) | ((new (...args: any[]) => import("element-plus").ModelValueType & {}) | (() => import("element-plus").ModelValueType))[], unknown, unknown>;
|
|
365
365
|
popperOptions: {};
|
|
366
|
+
tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>;
|
|
366
367
|
shortcuts: unknown[];
|
|
367
368
|
arrowControl: boolean;
|
|
368
|
-
tabindex: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>;
|
|
369
369
|
unlinkPanels: boolean;
|
|
370
370
|
editable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
371
371
|
prefixIcon: "";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.vkf-date-picker-range-select{
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
margin-bottom: 8px;
|
|
5
|
+
}
|
|
6
|
+
.vkf-date-picker-range-select-item{
|
|
7
|
+
padding: 4px;
|
|
8
|
+
border: var(--el-border);
|
|
9
|
+
border-radius: var(--el-border-radius-base);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
.vkf-date-picker-range-select-item:hover{
|
|
13
|
+
background-color: var(--el-color-primary-light-9);
|
|
14
|
+
color: var(--el-color-primary);
|
|
15
|
+
}
|
|
16
|
+
.vkf-date-picker-range-select-item + .vkf-date-picker-range-select-item{
|
|
17
|
+
margin-left: 8px;
|
|
18
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { _VkfDatePickerCtx, VkfDatePicker } from '@vunk/form/components/date-picker';
|
|
2
|
+
import { pickObject } from '@vunk/core/shared/utils-object';
|
|
3
|
+
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, Fragment, withDirectives, createElementVNode, renderList, toDisplayString, vShow, createVNode, mergeProps, toHandlers } from 'vue';
|
|
4
|
+
import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
|
|
5
|
+
|
|
6
|
+
const props = {
|
|
7
|
+
...pickObject(
|
|
8
|
+
_VkfDatePickerCtx.props,
|
|
9
|
+
{
|
|
10
|
+
excludes: [
|
|
11
|
+
"modelValue",
|
|
12
|
+
"prop"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
),
|
|
16
|
+
type: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "daterange"
|
|
19
|
+
},
|
|
20
|
+
endPlaceholder: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "\u7ED3\u675F\u65F6\u95F4"
|
|
23
|
+
},
|
|
24
|
+
startPlaceholder: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "\u5F00\u59CB\u65F6\u95F4"
|
|
27
|
+
},
|
|
28
|
+
startValue: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
endValue: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
startProp: {
|
|
37
|
+
type: String
|
|
38
|
+
},
|
|
39
|
+
endProp: {
|
|
40
|
+
type: String
|
|
41
|
+
},
|
|
42
|
+
valueFormat: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "YYYY-MM-DD"
|
|
45
|
+
},
|
|
46
|
+
selectOptions: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: () => []
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const emits = {
|
|
52
|
+
...pickObject(
|
|
53
|
+
_VkfDatePickerCtx.emits,
|
|
54
|
+
{
|
|
55
|
+
excludes: ["update:modelValue"]
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
"update:startValue": null,
|
|
59
|
+
"update:endValue": null
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var _sfc_main = defineComponent({
|
|
63
|
+
name: "VkfDatePickerRange",
|
|
64
|
+
components: {
|
|
65
|
+
VkfDatePicker
|
|
66
|
+
},
|
|
67
|
+
props,
|
|
68
|
+
emits,
|
|
69
|
+
setup(props2, { emit }) {
|
|
70
|
+
const coreProps = _VkfDatePickerCtx.createBindProps(props2);
|
|
71
|
+
const coreEmits = _VkfDatePickerCtx.createOnEmits(emit, ["update:modelValue"]);
|
|
72
|
+
const modelValue = computed({
|
|
73
|
+
get: () => [props2.startValue, props2.endValue],
|
|
74
|
+
set: (val) => {
|
|
75
|
+
emit("update:startValue", val?.[0]);
|
|
76
|
+
emit("update:endValue", val?.[1]);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const prop = computed(() => {
|
|
80
|
+
const pArr = [];
|
|
81
|
+
props2.startProp && pArr.push(props2.startProp);
|
|
82
|
+
props2.endProp && pArr.push(props2.endProp);
|
|
83
|
+
return pArr.join(",");
|
|
84
|
+
});
|
|
85
|
+
const rulesProp = computed(() => {
|
|
86
|
+
const rules = props2.rules ? Array.isArray(props2.rules) ? props2.rules : [props2.rules] : [];
|
|
87
|
+
if (!rules.length && props2.required) {
|
|
88
|
+
rules.push({ required: true });
|
|
89
|
+
}
|
|
90
|
+
rules.forEach((rule) => {
|
|
91
|
+
if (rule.required) {
|
|
92
|
+
rule.validator = () => {
|
|
93
|
+
if (props2.startValue && props2.endValue) {
|
|
94
|
+
return true;
|
|
95
|
+
} else {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return rules;
|
|
102
|
+
});
|
|
103
|
+
return {
|
|
104
|
+
coreProps,
|
|
105
|
+
coreEmits,
|
|
106
|
+
modelValue,
|
|
107
|
+
rulesProp,
|
|
108
|
+
prop
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const _hoisted_1 = { class: "vkf-date-picker-range-select" };
|
|
114
|
+
const _hoisted_2 = ["onClick"];
|
|
115
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
116
|
+
const _component_VkfDatePicker = resolveComponent("VkfDatePicker");
|
|
117
|
+
return openBlock(), createElementBlock(
|
|
118
|
+
Fragment,
|
|
119
|
+
null,
|
|
120
|
+
[
|
|
121
|
+
withDirectives(createElementVNode(
|
|
122
|
+
"div",
|
|
123
|
+
_hoisted_1,
|
|
124
|
+
[
|
|
125
|
+
(openBlock(true), createElementBlock(
|
|
126
|
+
Fragment,
|
|
127
|
+
null,
|
|
128
|
+
renderList(_ctx.selectOptions, (item) => {
|
|
129
|
+
return openBlock(), createElementBlock("div", {
|
|
130
|
+
key: item.label,
|
|
131
|
+
class: "vkf-date-picker-range-select-item",
|
|
132
|
+
onClick: ($event) => _ctx.modelValue = item.value
|
|
133
|
+
}, toDisplayString(item.label), 9, _hoisted_2);
|
|
134
|
+
}),
|
|
135
|
+
128
|
|
136
|
+
/* KEYED_FRAGMENT */
|
|
137
|
+
))
|
|
138
|
+
],
|
|
139
|
+
512
|
|
140
|
+
/* NEED_PATCH */
|
|
141
|
+
), [
|
|
142
|
+
[vShow, _ctx.selectOptions.length]
|
|
143
|
+
]),
|
|
144
|
+
createVNode(_component_VkfDatePicker, mergeProps({
|
|
145
|
+
modelValue: _ctx.modelValue,
|
|
146
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.modelValue = $event),
|
|
147
|
+
prop: _ctx.prop
|
|
148
|
+
}, _ctx.coreProps, { rules: _ctx.rulesProp }, toHandlers(_ctx.coreEmits)), null, 16, ["modelValue", "prop", "rules"])
|
|
149
|
+
],
|
|
150
|
+
64
|
|
151
|
+
/* STABLE_FRAGMENT */
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
var VkfDatePickerRange = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/private-vunk-form/private-vunk-form/packages/components/date-picker-range/src/index.vue"]]);
|
|
155
|
+
|
|
156
|
+
var types = /*#__PURE__*/Object.freeze({
|
|
157
|
+
__proto__: null
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
VkfDatePickerRange.install = (app) => {
|
|
161
|
+
app.component(VkfDatePickerRange.name || "VkfDatePickerRange", VkfDatePickerRange);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export { VkfDatePickerRange, types as __VkfDatePickerRange, VkfDatePickerRange as default };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { SelectMedia } from './types';
|
|
3
|
+
export declare const props: {
|
|
4
|
+
type: {
|
|
5
|
+
type: PropType<"datetimerange" | "daterange" | "monthrange">;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
endPlaceholder: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
startPlaceholder: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
startValue: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
endValue: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
startProp: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
endProp: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
valueFormat: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
selectOptions: {
|
|
35
|
+
type: PropType<SelectMedia[]>;
|
|
36
|
+
default: () => any[];
|
|
37
|
+
};
|
|
38
|
+
size: {
|
|
39
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
40
|
+
readonly required: false;
|
|
41
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
42
|
+
__epPropKey: true;
|
|
43
|
+
};
|
|
44
|
+
disabled: BooleanConstructor;
|
|
45
|
+
required: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
46
|
+
formItemSize: {
|
|
47
|
+
type: PropType<"default" | "small" | "large">;
|
|
48
|
+
default: "default" | "small" | "large";
|
|
49
|
+
};
|
|
50
|
+
formItemSlots: {
|
|
51
|
+
type: PropType<import("@vunk/form/components/form-item/src/types").FormItemSlots>;
|
|
52
|
+
default: any;
|
|
53
|
+
};
|
|
54
|
+
elRef: {
|
|
55
|
+
type: PropType<any>;
|
|
56
|
+
required: boolean;
|
|
57
|
+
};
|
|
58
|
+
inline: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
readonly: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: any;
|
|
65
|
+
};
|
|
66
|
+
labelPosition: {
|
|
67
|
+
type: PropType<"right">;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
label: StringConstructor;
|
|
71
|
+
labelWidth: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
72
|
+
rules: {
|
|
73
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils").Arrayable<import("element-plus").FormItemRule>))[], unknown, unknown>>;
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
|
+
__epPropKey: true;
|
|
77
|
+
};
|
|
78
|
+
error: StringConstructor;
|
|
79
|
+
validateStatus: {
|
|
80
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
81
|
+
readonly required: false;
|
|
82
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
83
|
+
__epPropKey: true;
|
|
84
|
+
};
|
|
85
|
+
for: StringConstructor;
|
|
86
|
+
inlineMessage: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, BooleanConstructor], unknown, unknown, "", boolean>;
|
|
87
|
+
showMessage: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
88
|
+
name: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown, "", boolean>;
|
|
89
|
+
id: {
|
|
90
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>) | ((new (...args: any[]) => import("element-plus").SingleOrRange<string> & {}) | (() => import("element-plus").SingleOrRange<string>))[], unknown, unknown>>;
|
|
91
|
+
readonly required: false;
|
|
92
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
93
|
+
__epPropKey: true;
|
|
94
|
+
};
|
|
95
|
+
emptyValues: ArrayConstructor;
|
|
96
|
+
valueOnClear: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor, BooleanConstructor, FunctionConstructor], unknown, unknown, undefined, boolean>;
|
|
97
|
+
placeholder: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
98
|
+
clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
99
|
+
popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
100
|
+
validateEvent: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
101
|
+
popperOptions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | ((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>))[], unknown, unknown, () => {}, boolean>;
|
|
102
|
+
tabindex: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown, 0, boolean>;
|
|
103
|
+
ariaLabel: StringConstructor;
|
|
104
|
+
disabledDate: {
|
|
105
|
+
readonly type: import("vue").PropType<Function>;
|
|
106
|
+
readonly required: false;
|
|
107
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
|
+
__epPropKey: true;
|
|
109
|
+
};
|
|
110
|
+
cellClassName: {
|
|
111
|
+
readonly type: import("vue").PropType<Function>;
|
|
112
|
+
readonly required: false;
|
|
113
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
114
|
+
__epPropKey: true;
|
|
115
|
+
};
|
|
116
|
+
shortcuts: import("element-plus/es/utils").EpPropFinalized<ArrayConstructor, unknown, unknown, () => never[], boolean>;
|
|
117
|
+
arrowControl: BooleanConstructor;
|
|
118
|
+
unlinkPanels: BooleanConstructor;
|
|
119
|
+
disabledHours: {
|
|
120
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledHours>;
|
|
121
|
+
readonly required: false;
|
|
122
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
123
|
+
__epPropKey: true;
|
|
124
|
+
};
|
|
125
|
+
disabledMinutes: {
|
|
126
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledMinutes>;
|
|
127
|
+
readonly required: false;
|
|
128
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
129
|
+
__epPropKey: true;
|
|
130
|
+
};
|
|
131
|
+
disabledSeconds: {
|
|
132
|
+
readonly type: import("vue").PropType<import("element-plus/es/components/time-picker/src/props/shared").GetDisabledSeconds>;
|
|
133
|
+
readonly required: false;
|
|
134
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
135
|
+
__epPropKey: true;
|
|
136
|
+
};
|
|
137
|
+
format: StringConstructor;
|
|
138
|
+
dateFormat: StringConstructor;
|
|
139
|
+
timeFormat: StringConstructor;
|
|
140
|
+
clearIcon: {
|
|
141
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
142
|
+
readonly required: false;
|
|
143
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
144
|
+
__epPropKey: true;
|
|
145
|
+
};
|
|
146
|
+
editable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
147
|
+
prefixIcon: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "", boolean>;
|
|
148
|
+
rangeSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "-", boolean>;
|
|
149
|
+
defaultValue: {
|
|
150
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
151
|
+
readonly required: false;
|
|
152
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
153
|
+
__epPropKey: true;
|
|
154
|
+
};
|
|
155
|
+
defaultTime: {
|
|
156
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>) | ((new (...args: any[]) => Date | [Date, Date]) | (() => import("element-plus").SingleOrRange<Date>))[], unknown, unknown>>;
|
|
157
|
+
readonly required: false;
|
|
158
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
159
|
+
__epPropKey: true;
|
|
160
|
+
};
|
|
161
|
+
isRange: BooleanConstructor;
|
|
162
|
+
datePickerSlots: {
|
|
163
|
+
type: PropType<import("@vunk/form/components/date-picker/src/types").DatePickerSlots>;
|
|
164
|
+
default: any;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
export declare const emits: {
|
|
168
|
+
'update:startValue': any;
|
|
169
|
+
'update:endValue': any;
|
|
170
|
+
change: any;
|
|
171
|
+
focus: any;
|
|
172
|
+
blur: any;
|
|
173
|
+
"calendar-change": any;
|
|
174
|
+
"panel-change": any;
|
|
175
|
+
"visible-change": any;
|
|
176
|
+
keydown: any;
|
|
177
|
+
};
|