@keyblade/pro-components 1.13.8-alpha.0 → 1.13.8-alpha.2
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,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 e from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-960e2e33"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as R, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as R, ref as m, computed as h, resolveComponent as y, createElementBlock as w, openBlock as N, normalizeClass as q, createVNode as n, mergeProps as c, withCtx as f, createTextVNode as A, toDisplayString as H, nextTick as D } from "vue";
|
|
2
|
+
import o from "dayjs";
|
|
3
3
|
import { range as p } from "./pro-date-range-picker.js";
|
|
4
|
-
const
|
|
4
|
+
const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
5
5
|
__name: "pro-date-range-picker",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {},
|
|
@@ -16,102 +16,111 @@ const M = "keyblade-pro-date-range-picker", w = /* @__PURE__ */ R({
|
|
|
16
16
|
datePickerProps: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:modelValue"],
|
|
19
|
-
setup(
|
|
20
|
-
const e =
|
|
19
|
+
setup(F, { emit: g }) {
|
|
20
|
+
const e = F, V = g, k = m(), P = m(), i = m(), s = h({
|
|
21
21
|
get: () => e.modelValue[e.startField],
|
|
22
22
|
set: (t) => {
|
|
23
|
-
|
|
23
|
+
V("update:modelValue", {
|
|
24
24
|
...e.modelValue,
|
|
25
25
|
[e.startField]: t
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
}),
|
|
28
|
+
}), b = h({
|
|
29
29
|
get: () => e.modelValue[e.endField],
|
|
30
30
|
set: (t) => {
|
|
31
|
-
|
|
31
|
+
V("update:modelValue", {
|
|
32
32
|
...e.modelValue,
|
|
33
33
|
[e.endField]: t
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
}), v = (t) =>
|
|
36
|
+
}), v = (t) => {
|
|
37
|
+
var l;
|
|
38
|
+
if (!e.modelValue[e.endField]) return !1;
|
|
39
|
+
let a = o(e.modelValue[e.endField]);
|
|
40
|
+
return e.intraday && !((l = e.datePickerProps) != null && l.showTime) && (a = a.add(1, "day")), o(t).isAfter(a);
|
|
41
|
+
}, S = (t) => {
|
|
42
|
+
var d;
|
|
43
|
+
return e.modelValue[e.startField] ? (e.intraday && ((d = e.datePickerProps) != null && d.showTime) && t.setDate(t.getDate() + 1), o(t).isBefore(o(e.modelValue[e.startField]))) : !1;
|
|
44
|
+
}, C = (t) => {
|
|
37
45
|
if (!e.modelValue[e.startField] || !t || !e.intraday) {
|
|
38
|
-
|
|
46
|
+
i.value = {};
|
|
39
47
|
return;
|
|
40
48
|
}
|
|
41
|
-
const a =
|
|
42
|
-
if (!a.isSame(
|
|
43
|
-
|
|
49
|
+
const a = o(e.modelValue[e.startField]), d = o(t);
|
|
50
|
+
if (!a.isSame(d, "day")) {
|
|
51
|
+
i.value = {};
|
|
44
52
|
return;
|
|
45
53
|
}
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
disabledHours: () => p(0,
|
|
49
|
-
disabledMinutes: (
|
|
50
|
-
disabledSeconds: (
|
|
54
|
+
const l = a.hour(), r = a.minute(), _ = a.second();
|
|
55
|
+
i.value = {
|
|
56
|
+
disabledHours: () => p(0, l),
|
|
57
|
+
disabledMinutes: (u) => u === l ? p(0, r) : [],
|
|
58
|
+
disabledSeconds: (u, B) => u === l && B === r ? p(0, _) : []
|
|
51
59
|
};
|
|
52
|
-
},
|
|
60
|
+
}, T = () => {
|
|
53
61
|
setTimeout(() => {
|
|
54
|
-
e.modelValue[e.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
const t = e.modelValue[e.endField], a = e.modelValue[e.startField];
|
|
63
|
+
o(a).isAfter(o(t)) && (s.value = t), t && !a && D(() => {
|
|
64
|
+
var l;
|
|
65
|
+
const d = (l = P.value) == null ? void 0 : l.$el.parentElement.querySelector("input");
|
|
66
|
+
d && d.click();
|
|
58
67
|
});
|
|
59
68
|
});
|
|
60
|
-
},
|
|
69
|
+
}, E = () => {
|
|
61
70
|
setTimeout(() => {
|
|
62
|
-
e.modelValue[e.endField] && !e.modelValue[e.startField] &&
|
|
71
|
+
e.modelValue[e.endField] && !e.modelValue[e.startField] && D(() => {
|
|
63
72
|
var a;
|
|
64
|
-
const t = (a =
|
|
73
|
+
const t = (a = k.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
|
|
65
74
|
t && t.click();
|
|
66
75
|
});
|
|
67
76
|
});
|
|
68
77
|
};
|
|
69
78
|
return (t, a) => {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
72
|
-
class:
|
|
79
|
+
const d = y("a-date-picker"), l = y("a-form-item");
|
|
80
|
+
return N(), w("div", {
|
|
81
|
+
class: q(I)
|
|
73
82
|
}, [
|
|
74
|
-
|
|
83
|
+
n(l, c(t.formItemProps, {
|
|
75
84
|
field: t.startField,
|
|
76
85
|
"hide-label": t.hideLabel
|
|
77
86
|
}), {
|
|
78
|
-
default:
|
|
79
|
-
|
|
87
|
+
default: f(() => [
|
|
88
|
+
n(d, c({
|
|
80
89
|
ref_key: "startDatePickerRef",
|
|
81
|
-
ref:
|
|
82
|
-
modelValue:
|
|
83
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
90
|
+
ref: k,
|
|
91
|
+
modelValue: s.value,
|
|
92
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r)
|
|
84
93
|
}, t.datePickerProps, {
|
|
85
94
|
placeholder: t.startPlaceholder,
|
|
86
|
-
"disabled-date": (
|
|
87
|
-
onChange:
|
|
95
|
+
"disabled-date": (r) => v(r),
|
|
96
|
+
onChange: T
|
|
88
97
|
}), null, 16, ["modelValue", "placeholder", "disabled-date"])
|
|
89
98
|
]),
|
|
90
99
|
_: 1
|
|
91
100
|
}, 16, ["field", "hide-label"]),
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
|
|
101
|
+
n(l, { "hide-label": "" }, {
|
|
102
|
+
default: f(() => [
|
|
103
|
+
A(H(t.separator), 1)
|
|
95
104
|
]),
|
|
96
105
|
_: 1
|
|
97
106
|
}),
|
|
98
|
-
|
|
107
|
+
n(l, {
|
|
99
108
|
field: t.endField,
|
|
100
109
|
"hide-label": "",
|
|
101
110
|
style: { "margin-right": "0px" }
|
|
102
111
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
|
|
112
|
+
default: f(() => [
|
|
113
|
+
n(d, c({
|
|
105
114
|
ref_key: "endDatePickerRef",
|
|
106
|
-
ref:
|
|
107
|
-
modelValue:
|
|
108
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
115
|
+
ref: P,
|
|
116
|
+
modelValue: b.value,
|
|
117
|
+
"onUpdate:modelValue": a[1] || (a[1] = (r) => b.value = r)
|
|
109
118
|
}, t.datePickerProps, {
|
|
110
119
|
placeholder: t.endPlaceholder,
|
|
111
|
-
"disabled-date": (
|
|
112
|
-
"disabled-time": () =>
|
|
120
|
+
"disabled-date": (r) => S(r),
|
|
121
|
+
"disabled-time": () => i.value,
|
|
113
122
|
onSelect: C,
|
|
114
|
-
onChange:
|
|
123
|
+
onChange: E
|
|
115
124
|
}), null, 16, ["modelValue", "placeholder", "disabled-date", "disabled-time"])
|
|
116
125
|
]),
|
|
117
126
|
_: 1
|
|
@@ -121,5 +130,5 @@ const M = "keyblade-pro-date-range-picker", w = /* @__PURE__ */ R({
|
|
|
121
130
|
}
|
|
122
131
|
});
|
|
123
132
|
export {
|
|
124
|
-
|
|
133
|
+
$ as default
|
|
125
134
|
};
|
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-960e2e33]{display:flex;align-items:center}.keyblade-pro-date-range-picker[data-v-960e2e33] .arco-form-item{margin-right:8px;margin-bottom:0}.keyblade-pro-date-range-picker[data-v-960e2e33] .arco-picker{background-color:var(--color-bg-1);border-color:var(--color-border-1)}
|
package/package.json
CHANGED