@keyblade/pro-components 1.13.0 → 1.13.1
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/es/pro-date-range-picker/index.d.ts +12 -0
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +5 -0
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +2 -2
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +54 -53
- package/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,9 @@ declare const ProDateRangePicker: {
|
|
|
7
7
|
startPlaceholder?: string;
|
|
8
8
|
endPlaceholder?: string;
|
|
9
9
|
separator?: string;
|
|
10
|
+
hideLabel?: boolean;
|
|
11
|
+
formItemProps?: FormItemProps;
|
|
12
|
+
datePickerProps?: DatePickerProps;
|
|
10
13
|
}> & Readonly<{
|
|
11
14
|
"onUpdate:modelValue"?: ((value: import('./type').IModelValue) => any) | undefined;
|
|
12
15
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -17,6 +20,7 @@ declare const ProDateRangePicker: {
|
|
|
17
20
|
startPlaceholder: string;
|
|
18
21
|
endPlaceholder: string;
|
|
19
22
|
separator: string;
|
|
23
|
+
hideLabel: boolean;
|
|
20
24
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
21
25
|
startDatePickerRef: unknown;
|
|
22
26
|
endDatePickerRef: unknown;
|
|
@@ -34,6 +38,9 @@ declare const ProDateRangePicker: {
|
|
|
34
38
|
startPlaceholder?: string;
|
|
35
39
|
endPlaceholder?: string;
|
|
36
40
|
separator?: string;
|
|
41
|
+
hideLabel?: boolean;
|
|
42
|
+
formItemProps?: FormItemProps;
|
|
43
|
+
datePickerProps?: DatePickerProps;
|
|
37
44
|
}> & Readonly<{
|
|
38
45
|
"onUpdate:modelValue"?: ((value: import('./type').IModelValue) => any) | undefined;
|
|
39
46
|
}>, {}, {}, {}, {}, {
|
|
@@ -42,6 +49,7 @@ declare const ProDateRangePicker: {
|
|
|
42
49
|
startPlaceholder: string;
|
|
43
50
|
endPlaceholder: string;
|
|
44
51
|
separator: string;
|
|
52
|
+
hideLabel: boolean;
|
|
45
53
|
}>;
|
|
46
54
|
__isFragment?: never;
|
|
47
55
|
__isTeleport?: never;
|
|
@@ -53,6 +61,9 @@ declare const ProDateRangePicker: {
|
|
|
53
61
|
startPlaceholder?: string;
|
|
54
62
|
endPlaceholder?: string;
|
|
55
63
|
separator?: string;
|
|
64
|
+
hideLabel?: boolean;
|
|
65
|
+
formItemProps?: FormItemProps;
|
|
66
|
+
datePickerProps?: DatePickerProps;
|
|
56
67
|
}> & Readonly<{
|
|
57
68
|
"onUpdate:modelValue"?: ((value: import('./type').IModelValue) => any) | undefined;
|
|
58
69
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
@@ -63,6 +74,7 @@ declare const ProDateRangePicker: {
|
|
|
63
74
|
startPlaceholder: string;
|
|
64
75
|
endPlaceholder: string;
|
|
65
76
|
separator: string;
|
|
77
|
+
hideLabel: boolean;
|
|
66
78
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
67
79
|
install: (app: App) => void;
|
|
68
80
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IModelValue } from './type.ts';
|
|
2
|
+
import { DatePickerProps, FormItemProps } from '@arco-design/web-vue';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
modelValue: IModelValue;
|
|
4
5
|
startField?: string;
|
|
@@ -6,6 +7,9 @@ type __VLS_Props = {
|
|
|
6
7
|
startPlaceholder?: string;
|
|
7
8
|
endPlaceholder?: string;
|
|
8
9
|
separator?: string;
|
|
10
|
+
hideLabel?: boolean;
|
|
11
|
+
formItemProps?: FormItemProps;
|
|
12
|
+
datePickerProps?: DatePickerProps;
|
|
9
13
|
};
|
|
10
14
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
15
|
"update:modelValue": (value: IModelValue) => any;
|
|
@@ -17,6 +21,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
17
21
|
startPlaceholder: string;
|
|
18
22
|
endPlaceholder: string;
|
|
19
23
|
separator: string;
|
|
24
|
+
hideLabel: boolean;
|
|
20
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
26
|
startDatePickerRef: unknown;
|
|
22
27
|
endDatePickerRef: unknown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./pro-date-range-picker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const _ = /* @__PURE__ */
|
|
3
|
+
import a from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ae94924a"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as v, ref as V, computed as k, resolveComponent as h, createElementBlock as _, openBlock as E, normalizeClass as S, createVNode as d, mergeProps as i, withCtx as n, createTextVNode as B, toDisplayString as R, nextTick as P } from "vue";
|
|
2
2
|
import r from "dayjs";
|
|
3
|
-
const
|
|
3
|
+
const T = "keyblade-pro-date-range-picker", I = /* @__PURE__ */ v({
|
|
4
4
|
__name: "pro-date-range-picker",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {},
|
|
@@ -8,92 +8,93 @@ const N = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ C({
|
|
|
8
8
|
endField: { default: "endDate" },
|
|
9
9
|
startPlaceholder: { default: "开始日期" },
|
|
10
10
|
endPlaceholder: { default: "结束日期" },
|
|
11
|
-
separator: { default: "至" }
|
|
11
|
+
separator: { default: "至" },
|
|
12
|
+
hideLabel: { type: Boolean, default: !0 },
|
|
13
|
+
formItemProps: {},
|
|
14
|
+
datePickerProps: {}
|
|
12
15
|
},
|
|
13
16
|
emits: ["update:modelValue"],
|
|
14
|
-
setup(
|
|
15
|
-
const e =
|
|
16
|
-
const { class: t, ...l } = F;
|
|
17
|
-
return l;
|
|
18
|
-
}), i = g, u = V(), m = V(), c = n({
|
|
17
|
+
setup(F, { emit: g }) {
|
|
18
|
+
const e = F, s = g, u = V(), m = V(), p = k({
|
|
19
19
|
get: () => e.modelValue[e.startField],
|
|
20
|
-
set: (
|
|
21
|
-
|
|
20
|
+
set: (l) => {
|
|
21
|
+
s("update:modelValue", {
|
|
22
22
|
...e.modelValue,
|
|
23
|
-
[e.startField]:
|
|
23
|
+
[e.startField]: l
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
26
|
+
}), f = k({
|
|
27
27
|
get: () => e.modelValue[e.endField],
|
|
28
|
-
set: (
|
|
29
|
-
|
|
28
|
+
set: (l) => {
|
|
29
|
+
s("update:modelValue", {
|
|
30
30
|
...e.modelValue,
|
|
31
|
-
[e.endField]:
|
|
31
|
+
[e.endField]: l
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
}), b = (
|
|
34
|
+
}), b = (l) => e.modelValue[e.endField] ? r(l).isAfter(r(e.modelValue[e.endField])) : !1, D = (l) => e.modelValue[e.startField] ? r(l).isBefore(r(e.modelValue[e.startField])) : !1, y = () => {
|
|
35
35
|
setTimeout(() => {
|
|
36
|
-
e.modelValue[e.startField] && !e.modelValue[e.endField] &&
|
|
37
|
-
var
|
|
38
|
-
const
|
|
39
|
-
|
|
36
|
+
e.modelValue[e.startField] && !e.modelValue[e.endField] && P(() => {
|
|
37
|
+
var t;
|
|
38
|
+
const l = (t = m.value) == null ? void 0 : t.$el.parentElement.querySelector("input");
|
|
39
|
+
l && l.click();
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
},
|
|
42
|
+
}, C = () => {
|
|
43
43
|
setTimeout(() => {
|
|
44
|
-
e.modelValue[e.endField] && !e.modelValue[e.startField] &&
|
|
45
|
-
var
|
|
46
|
-
const
|
|
47
|
-
|
|
44
|
+
e.modelValue[e.endField] && !e.modelValue[e.startField] && P(() => {
|
|
45
|
+
var t;
|
|
46
|
+
const l = (t = u.value) == null ? void 0 : t.$el.parentElement.querySelector("input");
|
|
47
|
+
l && l.click();
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
return (
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
class: T
|
|
51
|
+
return (l, t) => {
|
|
52
|
+
const c = h("a-date-picker"), o = h("a-form-item");
|
|
53
|
+
return E(), _("div", {
|
|
54
|
+
class: S(T)
|
|
55
55
|
}, [
|
|
56
|
-
d(o, {
|
|
57
|
-
field:
|
|
56
|
+
d(o, i(l.formItemProps, {
|
|
57
|
+
field: l.startField,
|
|
58
58
|
style: { "margin-right": "8px" },
|
|
59
|
-
"hide-label":
|
|
60
|
-
}, {
|
|
61
|
-
default:
|
|
62
|
-
d(
|
|
59
|
+
"hide-label": l.hideLabel
|
|
60
|
+
}), {
|
|
61
|
+
default: n(() => [
|
|
62
|
+
d(c, i({
|
|
63
63
|
ref_key: "startDatePickerRef",
|
|
64
64
|
ref: u,
|
|
65
|
-
modelValue:
|
|
66
|
-
"onUpdate:modelValue":
|
|
67
|
-
|
|
65
|
+
modelValue: p.value,
|
|
66
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => p.value = a)
|
|
67
|
+
}, l.datePickerProps, {
|
|
68
|
+
placeholder: l.startPlaceholder,
|
|
68
69
|
"disabled-date": (a) => b(a),
|
|
69
|
-
onChange:
|
|
70
|
-
}, null,
|
|
70
|
+
onChange: y
|
|
71
|
+
}), null, 16, ["modelValue", "placeholder", "disabled-date"])
|
|
71
72
|
]),
|
|
72
73
|
_: 1
|
|
73
|
-
},
|
|
74
|
+
}, 16, ["field", "hide-label"]),
|
|
74
75
|
d(o, {
|
|
75
76
|
"hide-label": "",
|
|
76
77
|
style: { "margin-right": "8px" }
|
|
77
78
|
}, {
|
|
78
|
-
default:
|
|
79
|
-
|
|
79
|
+
default: n(() => [
|
|
80
|
+
B(R(l.separator), 1)
|
|
80
81
|
]),
|
|
81
82
|
_: 1
|
|
82
83
|
}),
|
|
83
84
|
d(o, {
|
|
84
|
-
field:
|
|
85
|
+
field: l.endField,
|
|
85
86
|
"hide-label": ""
|
|
86
87
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
d(
|
|
88
|
+
default: n(() => [
|
|
89
|
+
d(c, i({
|
|
89
90
|
ref_key: "endDatePickerRef",
|
|
90
91
|
ref: m,
|
|
91
|
-
modelValue:
|
|
92
|
-
"onUpdate:modelValue":
|
|
93
|
-
},
|
|
94
|
-
placeholder:
|
|
95
|
-
"disabled-date": (a) =>
|
|
96
|
-
onChange:
|
|
92
|
+
modelValue: f.value,
|
|
93
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => f.value = a)
|
|
94
|
+
}, l.datePickerProps, {
|
|
95
|
+
placeholder: l.endPlaceholder,
|
|
96
|
+
"disabled-date": (a) => D(a),
|
|
97
|
+
onChange: C
|
|
97
98
|
}), null, 16, ["modelValue", "placeholder", "disabled-date"])
|
|
98
99
|
]),
|
|
99
100
|
_: 1
|
|
@@ -103,5 +104,5 @@ const N = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ C({
|
|
|
103
104
|
}
|
|
104
105
|
});
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
+
I as default
|
|
107
108
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-
|
|
1
|
+
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-ae94924a]{display:flex;align-items:center}
|