@keyblade/pro-components 1.13.8-alpha.9 → 1.14.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/es/components.d.ts +7 -0
- package/es/global-props.d.ts +20 -3
- package/es/global-props.js +6 -2
- package/es/index.d.ts +7 -0
- package/es/index.js +47 -28
- package/es/inerface.d.ts +5 -2
- package/es/pro-calendar/calendar.vue.d.ts +75 -0
- package/es/pro-calendar/calendar.vue.js +159 -0
- package/es/pro-calendar/calendar.vue3.js +5 -0
- package/es/pro-calendar/enum.d.ts +6 -0
- package/es/pro-calendar/enum.js +4 -0
- package/es/pro-calendar/header.vue.d.ts +35 -0
- package/es/pro-calendar/header.vue.js +146 -0
- package/es/pro-calendar/header.vue2.js +4 -0
- package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
- package/es/pro-calendar/hooks/useCellClassName.js +40 -0
- package/es/pro-calendar/index.d.ts +117 -0
- package/es/pro-calendar/index.js +12 -0
- package/es/pro-calendar/interface.d.ts +89 -0
- package/es/pro-calendar/month.d.ts +5 -0
- package/es/pro-calendar/month.js +53 -0
- package/es/pro-calendar/month.vue.d.ts +22 -0
- package/es/pro-calendar/month.vue.js +126 -0
- package/es/pro-calendar/month.vue2.js +4 -0
- package/es/pro-calendar/week.vue.d.ts +3 -0
- package/es/pro-calendar/week.vue.js +34 -0
- package/es/pro-calendar/week.vue2.js +4 -0
- package/es/pro-calendar/year.vue.d.ts +3 -0
- package/es/pro-calendar/year.vue.js +123 -0
- package/es/pro-calendar/year.vue2.js +4 -0
- package/es/pro-date-range-picker/index.d.ts +183 -13
- package/es/pro-date-range-picker/index.js +6 -7
- package/es/pro-date-range-picker/interface.d.ts +38 -0
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +173 -6
- 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 +124 -104
- package/es/pro-dates-picker/index.d.ts +49 -0
- package/es/pro-dates-picker/index.js +11 -0
- package/es/pro-dates-picker/index.vue.d.ts +29 -0
- package/es/pro-dates-picker/index.vue.js +135 -0
- package/es/pro-dates-picker/index.vue3.js +5 -0
- package/es/pro-dates-picker/interface.d.ts +38 -0
- package/es/pro-dates-picker/util.d.ts +12 -0
- package/es/pro-dates-picker/util.js +9 -0
- package/es/pro-find-password/enum.d.ts +8 -0
- package/es/pro-find-password/enum.js +4 -0
- package/es/pro-find-password/index.d.ts +11 -0
- package/es/pro-find-password/index.js +11 -0
- package/es/pro-find-password/index.vue.d.ts +4459 -0
- package/es/pro-find-password/index.vue.js +176 -0
- package/es/pro-find-password/index.vue3.js +5 -0
- package/es/pro-find-password/interface.d.ts +45 -0
- package/es/pro-find-password/reset-password.vue.d.ts +591 -0
- package/es/pro-find-password/reset-password.vue.js +179 -0
- package/es/pro-find-password/reset-password.vue2.js +4 -0
- package/es/pro-find-password/verify-user-name.vue.d.ts +795 -0
- package/es/pro-find-password/verify-user-name.vue.js +112 -0
- package/es/pro-find-password/verify-user-name.vue3.js +5 -0
- package/es/pro-footer-bar/index.d.ts +6 -3
- package/es/pro-footer-bar/index.js +6 -7
- package/es/pro-footer-bar/index.vue.d.ts +1 -1
- package/es/pro-footer-bar/index.vue.js +2 -2
- package/es/pro-footer-bar/index.vue2.js +24 -26
- package/es/pro-footer-bar/{inerface.d.ts → interface.d.ts} +1 -0
- package/es/pro-form-group/index.d.ts +7 -6
- package/es/pro-form-group/index.js +6 -8
- package/es/pro-form-group/index.vue.d.ts +2 -2
- package/es/pro-form-group/index.vue.js +1 -1
- package/es/pro-form-group/index.vue2.js +31 -32
- package/es/pro-image-upload/cropper.vue.js +2 -2
- package/es/pro-image-upload/cropper.vue2.js +200 -190
- package/es/pro-image-upload/image-upload.vue.d.ts +1124 -371
- package/es/pro-image-upload/image-upload.vue.js +178 -144
- package/es/pro-image-upload/index.d.ts +1727 -1001
- package/es/pro-image-upload/index.js +6 -8
- package/es/pro-keep-alive-router-view/index.d.ts +1 -0
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +17 -18
- package/es/pro-layout/hooks.d.ts +80 -1
- package/es/pro-layout/hooks.js +133 -84
- package/es/pro-layout/index.d.ts +9 -6
- package/es/pro-layout/index.js +6 -11
- package/es/pro-layout/pro-layout.vue.d.ts +4 -2
- package/es/pro-layout/pro-layout.vue.js +220 -208
- package/es/pro-loader/index.d.ts +43 -0
- package/es/pro-loader/index.js +11 -0
- package/es/pro-loader/index.vue.d.ts +28 -0
- package/es/pro-loader/index.vue.js +112 -0
- package/es/pro-loader/index.vue3.js +5 -0
- package/es/pro-loader/interface.d.ts +16 -0
- package/es/pro-login/enum.d.ts +6 -0
- package/es/pro-login/enum.js +4 -0
- package/es/pro-login/form-mobile.vue.d.ts +797 -0
- package/es/pro-login/form-mobile.vue.js +146 -0
- package/es/pro-login/form-mobile.vue2.js +4 -0
- package/es/pro-login/form-password.vue.d.ts +584 -0
- package/es/pro-login/form-password.vue.js +99 -0
- package/es/pro-login/form-password.vue2.js +4 -0
- package/es/pro-login/index.d.ts +11 -0
- package/es/pro-login/index.js +11 -0
- package/es/pro-login/index.vue.d.ts +4429 -0
- package/es/pro-login/index.vue.js +105 -0
- package/es/pro-login/index.vue3.js +5 -0
- package/es/pro-login/interface.d.ts +72 -0
- package/es/pro-login/regexp.d.ts +17 -0
- package/es/pro-login/regexp.js +28 -0
- package/es/pro-menu/index.d.ts +18 -80
- package/es/pro-menu/index.js +6 -7
- package/es/pro-menu/interface.d.ts +31 -0
- package/es/pro-menu/menu-item.vue.d.ts +27 -0
- package/es/pro-menu/menu-item.vue.js +35 -0
- package/es/pro-menu/menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu-item.vue.d.ts +9 -0
- package/es/pro-menu/pro-menu-item.vue.js +63 -0
- package/es/pro-menu/pro-menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu.vue.d.ts +9 -55
- package/es/pro-menu/pro-menu.vue.js +36 -119
- package/es/pro-menu/sub-menu.vue.d.ts +22 -0
- package/es/pro-menu/sub-menu.vue.js +55 -0
- package/es/pro-menu/sub-menu.vue2.js +4 -0
- package/es/pro-menu/util.d.ts +9 -0
- package/es/pro-menu/util.js +7 -0
- package/es/pro-page-container/constant.d.ts +2 -0
- package/es/pro-page-container/constant.js +9 -0
- package/es/pro-page-container/index.d.ts +7 -21
- package/es/pro-page-container/index.js +6 -8
- package/es/pro-page-container/interface.d.ts +12 -0
- package/es/pro-page-container/pro-page-container.vue.d.ts +4 -15
- package/es/pro-page-container/pro-page-container.vue.js +58 -38
- package/es/pro-page-header/constant.d.ts +2 -0
- package/es/pro-page-header/constant.js +13 -0
- package/es/pro-page-header/index.d.ts +12 -146
- package/es/pro-page-header/index.js +6 -8
- package/es/pro-page-header/interface.d.ts +21 -0
- package/es/pro-page-header/pro-page-header.vue.d.ts +18 -103
- package/es/pro-page-header/pro-page-header.vue.js +141 -124
- package/es/pro-reuse-tabs/index.d.ts +8 -6
- package/es/pro-reuse-tabs/index.js +6 -7
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +2 -2
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
- package/es/pro-table/index.d.ts +18 -18
- package/es/pro-table/index.js +6 -7
- package/es/pro-table/index.vue.d.ts +6 -6
- package/es/pro-table/index.vue.js +94 -39
- package/es/pro-table/interface.d.ts +73 -65
- package/es/pro-textarea/index.d.ts +7 -5
- package/es/pro-textarea/index.js +5 -6
- package/es/pro-textarea/index.vue.d.ts +1 -1
- package/es/pro-textarea/index.vue.js +1 -1
- package/es/pro-textarea/index.vue2.js +14 -16
- package/es/pro-textarea/{inerface.d.ts → interface.d.ts} +19 -18
- package/es/style.css +1 -1
- package/es/utils.d.ts +6 -0
- package/es/utils.js +7 -0
- package/package.json +5 -4
- package/es/pro-date-range-picker/inerface.d.ts +0 -26
- package/es/pro-page-container/inerface.d.ts +0 -12
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var j = Object.defineProperty, z = Object.defineProperties;
|
|
2
|
+
var G = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var B = Object.getOwnPropertySymbols;
|
|
4
|
+
var J = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var I = (r, d, e) => d in r ? j(r, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[d] = e, c = (r, d) => {
|
|
6
|
+
for (var e in d || (d = {}))
|
|
7
|
+
J.call(d, e) && I(r, e, d[e]);
|
|
8
|
+
if (B)
|
|
9
|
+
for (var e of B(d))
|
|
10
|
+
K.call(d, e) && I(r, e, d[e]);
|
|
11
|
+
return r;
|
|
12
|
+
}, f = (r, d) => z(r, G(d));
|
|
13
|
+
import { defineComponent as O, ref as s, computed as h, createElementBlock as Q, openBlock as W, normalizeClass as X, createVNode as u, unref as m, mergeProps as P, withCtx as y, createTextVNode as Y, toDisplayString as Z, nextTick as w } from "vue";
|
|
14
|
+
import { FormItem as F, DatePicker as N } from "@arco-design/web-vue";
|
|
15
|
+
import i from "dayjs";
|
|
16
|
+
import { conclude as q } from "vue-global-config";
|
|
17
|
+
import { globalProps as x } from "../global-props.js";
|
|
18
|
+
import { range as g } from "./pro-date-range-picker.js";
|
|
19
|
+
const ee = "keyblade-pro-date-range-picker", se = /* @__PURE__ */ O({
|
|
7
20
|
__name: "pro-date-range-picker",
|
|
8
21
|
props: {
|
|
9
22
|
modelValue: {},
|
|
@@ -16,132 +29,139 @@ const M = "keyblade-pro-date-range-picker", J = /* @__PURE__ */ N({
|
|
|
16
29
|
hideLabel: { type: Boolean, default: !0 },
|
|
17
30
|
formItemProps: {},
|
|
18
31
|
datePickerProps: {},
|
|
19
|
-
timePickerProps: {}
|
|
32
|
+
timePickerProps: {},
|
|
33
|
+
disabledStartDate: {},
|
|
34
|
+
disabledEndDate: {}
|
|
20
35
|
},
|
|
21
36
|
emits: ["update:modelValue"],
|
|
22
|
-
setup(
|
|
23
|
-
const e = S, k =
|
|
37
|
+
setup(r, { emit: d }) {
|
|
38
|
+
const e = r, S = d, b = s(), k = s(), v = s(), E = s(), C = s(), p = s(), V = h({
|
|
24
39
|
get: () => e.modelValue[e.startField],
|
|
25
40
|
set: (t) => {
|
|
26
|
-
|
|
27
|
-
...e.modelValue,
|
|
41
|
+
t ? b.value = "success" : b.value = void 0, S("update:modelValue", f(c({}, e.modelValue), {
|
|
28
42
|
[e.startField]: t
|
|
29
|
-
});
|
|
43
|
+
}));
|
|
30
44
|
}
|
|
31
|
-
}),
|
|
45
|
+
}), R = h({
|
|
32
46
|
get: () => e.modelValue[e.endField],
|
|
33
47
|
set: (t) => {
|
|
34
|
-
k("update:modelValue", {
|
|
35
|
-
...e.modelValue,
|
|
48
|
+
t ? k.value = "success" : k.value = void 0, S("update:modelValue", f(c({}, e.modelValue), {
|
|
36
49
|
[e.endField]: t
|
|
37
|
-
});
|
|
50
|
+
}));
|
|
38
51
|
}
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return e.
|
|
47
|
-
},
|
|
52
|
+
}), A = (t) => {
|
|
53
|
+
const a = () => {
|
|
54
|
+
var n;
|
|
55
|
+
if (!e.modelValue[e.endField]) return !1;
|
|
56
|
+
let l = i(e.modelValue[e.endField]);
|
|
57
|
+
return e.intraday && !((n = e.datePickerProps) != null && n.showTime) && (l = l.add(1, "day")), i(t).isAfter(l);
|
|
58
|
+
};
|
|
59
|
+
return e.disabledStartDate ? e.disabledStartDate({ current: t, enabled: a() }) : a();
|
|
60
|
+
}, H = (t) => {
|
|
61
|
+
const a = () => {
|
|
62
|
+
var o;
|
|
63
|
+
return e.modelValue[e.startField] ? (e.intraday && ((o = e.datePickerProps) != null && o.showTime) && t.setDate(t.getDate() + 1), i(t).isBefore(i(e.modelValue[e.startField]))) : !1;
|
|
64
|
+
};
|
|
65
|
+
return e.disabledEndDate ? e.disabledEndDate({ current: t, enabled: a() }) : a();
|
|
66
|
+
}, L = (t) => {
|
|
48
67
|
if (!e.modelValue[e.startField] || !t || !e.intraday) {
|
|
49
|
-
|
|
68
|
+
p.value = {};
|
|
50
69
|
return;
|
|
51
70
|
}
|
|
52
|
-
const a =
|
|
53
|
-
if (!a.isSame(
|
|
54
|
-
|
|
71
|
+
const a = i(e.modelValue[e.startField]), l = i(t);
|
|
72
|
+
if (!a.isSame(l, "day")) {
|
|
73
|
+
p.value = {};
|
|
55
74
|
return;
|
|
56
75
|
}
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
disabledHours: () =>
|
|
60
|
-
disabledMinutes: (
|
|
61
|
-
disabledSeconds: (
|
|
76
|
+
const o = a.hour(), n = a.minute(), _ = a.second();
|
|
77
|
+
p.value = {
|
|
78
|
+
disabledHours: () => g(0, o),
|
|
79
|
+
disabledMinutes: (D) => D === o ? g(0, n) : [],
|
|
80
|
+
disabledSeconds: (D, $) => D === o && $ === n ? g(0, _) : []
|
|
62
81
|
};
|
|
63
|
-
},
|
|
82
|
+
}, M = () => {
|
|
64
83
|
setTimeout(() => {
|
|
65
84
|
const t = e.modelValue[e.endField], a = e.modelValue[e.startField];
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
const
|
|
69
|
-
|
|
85
|
+
a && t && i(a).isAfter(i(t)) && (V.value = t), !t && a && w(() => {
|
|
86
|
+
var o;
|
|
87
|
+
const l = (o = C.value) == null ? void 0 : o.$el.parentElement.querySelector("input");
|
|
88
|
+
l && l.click();
|
|
70
89
|
});
|
|
71
90
|
});
|
|
72
|
-
},
|
|
91
|
+
}, U = () => {
|
|
73
92
|
setTimeout(() => {
|
|
74
|
-
e.modelValue[e.endField] && !e.modelValue[e.startField] &&
|
|
93
|
+
e.modelValue[e.endField] && !e.modelValue[e.startField] && w(() => {
|
|
75
94
|
var a;
|
|
76
|
-
const t = (a =
|
|
95
|
+
const t = (a = E.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
|
|
77
96
|
t && t.click();
|
|
78
97
|
});
|
|
79
98
|
});
|
|
80
|
-
},
|
|
99
|
+
}, T = h(() => {
|
|
81
100
|
var t, a;
|
|
82
|
-
return {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
};
|
|
101
|
+
return f(c({}, q([e.datePickerProps, (t = x.dateRangePicker) == null ? void 0 : t.datePickerProps, {}])), {
|
|
102
|
+
timePickerProps: q([e.timePickerProps, (a = x.dateRangePicker) == null ? void 0 : a.timePickerProps], {})
|
|
103
|
+
});
|
|
86
104
|
});
|
|
87
|
-
return (t, a) => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
105
|
+
return (t, a) => (W(), Q("div", {
|
|
106
|
+
class: X(ee),
|
|
107
|
+
ref_key: "dateRef",
|
|
108
|
+
ref: v
|
|
109
|
+
}, [
|
|
110
|
+
u(m(F), P(t.formItemProps, {
|
|
111
|
+
"validate-status": b.value,
|
|
112
|
+
field: t.startField,
|
|
113
|
+
"hide-label": t.hideLabel
|
|
114
|
+
}), {
|
|
115
|
+
default: y(() => [
|
|
116
|
+
u(m(N), P({
|
|
117
|
+
ref_key: "startDatePickerRef",
|
|
118
|
+
ref: E,
|
|
119
|
+
modelValue: V.value,
|
|
120
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => V.value = l)
|
|
121
|
+
}, T.value, {
|
|
122
|
+
"popup-container": v.value,
|
|
123
|
+
placeholder: t.startPlaceholder,
|
|
124
|
+
"disabled-date": (l) => A(l),
|
|
125
|
+
onChange: M
|
|
126
|
+
}), null, 16, ["modelValue", "popup-container", "placeholder", "disabled-date"])
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 16, ["validate-status", "field", "hide-label"]),
|
|
130
|
+
u(m(F), {
|
|
131
|
+
"hide-label": "",
|
|
132
|
+
style: { "max-height": "32px", top: "0px" }
|
|
133
|
+
}, {
|
|
134
|
+
default: y(() => [
|
|
135
|
+
Y(Z(t.separator), 1)
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
}),
|
|
139
|
+
u(m(F), P(t.formItemProps, {
|
|
140
|
+
"validate-status": k.value,
|
|
141
|
+
field: t.endField,
|
|
142
|
+
"hide-label": "",
|
|
143
|
+
style: { "margin-right": "0px" }
|
|
144
|
+
}), {
|
|
145
|
+
default: y(() => [
|
|
146
|
+
u(m(N), P({
|
|
147
|
+
ref_key: "endDatePickerRef",
|
|
148
|
+
ref: C,
|
|
149
|
+
modelValue: R.value,
|
|
150
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => R.value = l)
|
|
151
|
+
}, T.value, {
|
|
152
|
+
"popup-container": v.value,
|
|
153
|
+
placeholder: t.endPlaceholder,
|
|
154
|
+
"disabled-date": (l) => H(l),
|
|
155
|
+
"disabled-time": () => p.value,
|
|
156
|
+
onSelect: L,
|
|
157
|
+
onChange: U
|
|
158
|
+
}), null, 16, ["modelValue", "popup-container", "placeholder", "disabled-date", "disabled-time"])
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
}, 16, ["validate-status", "field"])
|
|
162
|
+
], 512));
|
|
143
163
|
}
|
|
144
164
|
});
|
|
145
165
|
export {
|
|
146
|
-
|
|
166
|
+
se as default
|
|
147
167
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
declare const ProDatesPicker: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface').IProDatesPickerProps> & Readonly<{
|
|
4
|
+
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
5
|
+
onClear?: ((ev: FocusEvent) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (value: string | string[]) => any;
|
|
8
|
+
clear: (ev: FocusEvent) => any;
|
|
9
|
+
}, import('vue').PublicProps, {
|
|
10
|
+
allowClear: boolean;
|
|
11
|
+
maxLength: number;
|
|
12
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
13
|
+
datePickerRef: HTMLDivElement;
|
|
14
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
15
|
+
P: {};
|
|
16
|
+
B: {};
|
|
17
|
+
D: {};
|
|
18
|
+
C: {};
|
|
19
|
+
M: {};
|
|
20
|
+
Defaults: {};
|
|
21
|
+
}, Readonly<import('./interface').IProDatesPickerProps> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
23
|
+
onClear?: ((ev: FocusEvent) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, {
|
|
25
|
+
allowClear: boolean;
|
|
26
|
+
maxLength: number;
|
|
27
|
+
}>;
|
|
28
|
+
__isFragment?: never;
|
|
29
|
+
__isTeleport?: never;
|
|
30
|
+
__isSuspense?: never;
|
|
31
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./interface').IProDatesPickerProps> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
33
|
+
onClear?: ((ev: FocusEvent) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
35
|
+
"update:modelValue": (value: string | string[]) => any;
|
|
36
|
+
clear: (ev: FocusEvent) => any;
|
|
37
|
+
}, string, {
|
|
38
|
+
allowClear: boolean;
|
|
39
|
+
maxLength: number;
|
|
40
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
41
|
+
$slots: Partial<Record<NonNullable<string | number>, (_: any) => any>>;
|
|
42
|
+
}) & {
|
|
43
|
+
install: (app: App) => void;
|
|
44
|
+
};
|
|
45
|
+
/** 导出类型 */
|
|
46
|
+
export * from './interface';
|
|
47
|
+
/** 导出组件 */
|
|
48
|
+
export { ProDatesPicker };
|
|
49
|
+
export default ProDatesPicker;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IProDatesPickerProps } from './interface.ts';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Partial<Record<NonNullable<string | number>, (_: any) => any>>;
|
|
5
|
+
refs: {
|
|
6
|
+
datePickerRef: HTMLDivElement;
|
|
7
|
+
};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<IProDatesPickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
|
+
"update:modelValue": (value: string | string[]) => any;
|
|
13
|
+
clear: (ev: FocusEvent) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<IProDatesPickerProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
16
|
+
onClear?: ((ev: FocusEvent) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
allowClear: boolean;
|
|
19
|
+
maxLength: number;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
|
+
datePickerRef: HTMLDivElement;
|
|
22
|
+
}, HTMLDivElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
var C = Object.getOwnPropertySymbols;
|
|
2
|
+
var N = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
3
|
+
var y = (s, k) => {
|
|
4
|
+
var m = {};
|
|
5
|
+
for (var r in s)
|
|
6
|
+
N.call(s, r) && k.indexOf(r) < 0 && (m[r] = s[r]);
|
|
7
|
+
if (s != null && C)
|
|
8
|
+
for (var r of C(s))
|
|
9
|
+
k.indexOf(r) < 0 && A.call(s, r) && (m[r] = s[r]);
|
|
10
|
+
return m;
|
|
11
|
+
};
|
|
12
|
+
import { defineComponent as j, ref as Y, useSlots as O, useAttrs as T, computed as x, onMounted as U, createElementBlock as W, openBlock as q, normalizeClass as F, createVNode as P, unref as u, withCtx as g, mergeProps as M, withModifiers as G, createSlots as H, createElementVNode as S, normalizeStyle as J, toDisplayString as K, renderList as Q, renderSlot as X, normalizeProps as Z, guardReactiveProps as ee } from "vue";
|
|
13
|
+
import { conclude as V } from "vue-global-config";
|
|
14
|
+
import { Popover as te, Input as re, DatePicker as oe } from "@arco-design/web-vue";
|
|
15
|
+
import { IconCalendar as le } from "@arco-design/web-vue/es/icon";
|
|
16
|
+
import { globalProps as $ } from "../global-props.js";
|
|
17
|
+
import d from "dayjs";
|
|
18
|
+
import { initSelected as ae, transDatesString as b } from "./util.js";
|
|
19
|
+
const ne = ["onClick"], se = "keyblade-pro-dates-picker", ge = /* @__PURE__ */ j({
|
|
20
|
+
__name: "index",
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: {},
|
|
23
|
+
defaultValue: {},
|
|
24
|
+
size: {},
|
|
25
|
+
allowClear: { type: Boolean, default: !0 },
|
|
26
|
+
disabled: { type: Boolean },
|
|
27
|
+
readonly: { type: Boolean },
|
|
28
|
+
error: { type: Boolean },
|
|
29
|
+
placeholder: {},
|
|
30
|
+
maxLength: { default: 100 },
|
|
31
|
+
showWordLimit: { type: Boolean },
|
|
32
|
+
wordLength: {},
|
|
33
|
+
wordSlice: {},
|
|
34
|
+
inputAttrs: {},
|
|
35
|
+
type: {},
|
|
36
|
+
prepend: {},
|
|
37
|
+
append: {},
|
|
38
|
+
datePickerProps: {}
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:modelValue", "clear"],
|
|
41
|
+
setup(s, { emit: k }) {
|
|
42
|
+
const m = {
|
|
43
|
+
placeholder: "请选择日期",
|
|
44
|
+
datePickerProps: {
|
|
45
|
+
hideTrigger: !0
|
|
46
|
+
}
|
|
47
|
+
}, r = k, c = s, h = Y(), _ = Y(null), f = Y(ae(c.modelValue)), w = O(), B = T(), D = Y(), I = x(() => {
|
|
48
|
+
const v = c, { datePickerProps: e } = v, a = y(v, ["datePickerProps"]), n = m, { datePickerProps: o } = n, i = y(n, ["datePickerProps"]);
|
|
49
|
+
return V([a, $.datesPicker || {}, i]);
|
|
50
|
+
}), L = x(() => {
|
|
51
|
+
var e;
|
|
52
|
+
return V([c.datePickerProps, ((e = $.datesPicker) == null ? void 0 : e.datePickerProps) || {}, m.datePickerProps]);
|
|
53
|
+
}), t = x({
|
|
54
|
+
get: () => c.modelValue,
|
|
55
|
+
set: (e) => {
|
|
56
|
+
typeof e == "string" ? r("update:modelValue", e || "") : r("update:modelValue", e || []);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
U(() => {
|
|
60
|
+
(c.modelValue === null || c.modelValue === void 0) && (t.value = []);
|
|
61
|
+
});
|
|
62
|
+
const R = (e) => {
|
|
63
|
+
var i, p, v;
|
|
64
|
+
const a = d(e).format("YYYY-MM-DD"), o = f.value.findIndex((n) => d(n).format("YYYY-MM-DD") === d(e).format("YYYY-MM-DD"));
|
|
65
|
+
if (o !== -1) {
|
|
66
|
+
if (f.value.splice(o, 1), typeof t.value == "string") {
|
|
67
|
+
const n = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
68
|
+
let l = (i = b(t.value)) == null ? void 0 : i.replace(new RegExp(`${n}, `, "g"), "");
|
|
69
|
+
l = l == null ? void 0 : l.replace(new RegExp(`${n}`, "g"), ""), l = l == null ? void 0 : l.replace(/^, |, $/g, "").replace(/,{2,}/g, ",").trim(), t.value = l || "";
|
|
70
|
+
} else if (t.value) {
|
|
71
|
+
const n = (p = t.value) == null ? void 0 : p.findIndex((l) => d(l).format("YYYY-MM-DD") === d(e).format("YYYY-MM-DD"));
|
|
72
|
+
n !== -1 && t.value.splice(n, 1);
|
|
73
|
+
}
|
|
74
|
+
D.value = e.getDate();
|
|
75
|
+
} else
|
|
76
|
+
f.value.length < c.maxLength && (f.value.push(e), typeof t.value == "string" ? t.value += t.value ? `, ${a}` : a : (v = t.value) == null || v.push(a)), D.value = void 0;
|
|
77
|
+
}, z = (e) => D.value === e.getDate() ? { backgroundColor: "transparent", color: "var(--color-text-1)" } : f.value.some((o) => d(o).format("YYYY-MM-DD") === d(e).format("YYYY-MM-DD")) ? { backgroundColor: "rgb(var(--primary-6))", color: "var(--color-white)" } : {}, E = (e) => {
|
|
78
|
+
f.value = [], t.value = typeof t.value == "string" ? "" : [], r("clear", e);
|
|
79
|
+
};
|
|
80
|
+
return (e, a) => (q(), W("div", {
|
|
81
|
+
class: F(se),
|
|
82
|
+
ref_key: "datePickerRef",
|
|
83
|
+
ref: h
|
|
84
|
+
}, [
|
|
85
|
+
P(u(te), {
|
|
86
|
+
position: "bl",
|
|
87
|
+
"popup-container": h.value,
|
|
88
|
+
trigger: "click"
|
|
89
|
+
}, {
|
|
90
|
+
content: g(() => [
|
|
91
|
+
P(u(oe), M(L.value, {
|
|
92
|
+
pickerValue: _.value,
|
|
93
|
+
"onUpdate:pickerValue": a[0] || (a[0] = (o) => _.value = o),
|
|
94
|
+
style: { width: "268px" }
|
|
95
|
+
}), H({
|
|
96
|
+
cell: g(({ date: o }) => [
|
|
97
|
+
S("div", {
|
|
98
|
+
class: "arco-picker-date",
|
|
99
|
+
onClick: (i) => R(o)
|
|
100
|
+
}, [
|
|
101
|
+
S("div", {
|
|
102
|
+
style: J(z(o)),
|
|
103
|
+
class: "arco-picker-date-value"
|
|
104
|
+
}, K(o.getDate()), 5)
|
|
105
|
+
], 8, ne)
|
|
106
|
+
]),
|
|
107
|
+
_: 2
|
|
108
|
+
}, [
|
|
109
|
+
Q(u(w), (o, i) => ({
|
|
110
|
+
name: i,
|
|
111
|
+
fn: g((p) => [
|
|
112
|
+
X(e.$slots, i, Z(ee(p != null ? p : {})))
|
|
113
|
+
])
|
|
114
|
+
}))
|
|
115
|
+
]), 1040, ["pickerValue"])
|
|
116
|
+
]),
|
|
117
|
+
default: g(() => [
|
|
118
|
+
P(u(re), M(M(I.value, u(B)), {
|
|
119
|
+
"model-value": u(b)(t.value),
|
|
120
|
+
onClear: G(E, ["stop"])
|
|
121
|
+
}), {
|
|
122
|
+
suffix: g(() => [
|
|
123
|
+
P(u(le))
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}, 16, ["model-value"])
|
|
127
|
+
]),
|
|
128
|
+
_: 3
|
|
129
|
+
}, 8, ["popup-container"])
|
|
130
|
+
], 512));
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
export {
|
|
134
|
+
ge as default
|
|
135
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RangePickerProps } from '@arco-design/web-vue/es/date-picker/interface';
|
|
2
|
+
export interface IProDatesPickerProps {
|
|
3
|
+
/** 绑定值 */
|
|
4
|
+
modelValue?: string | Array<string>;
|
|
5
|
+
/** 默认值 */
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
/** 输入框大小 */
|
|
8
|
+
size?: string;
|
|
9
|
+
/** 是否允许清空输入框 */
|
|
10
|
+
allowClear?: boolean;
|
|
11
|
+
/** 是否禁用 */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** 是否为只读状态 */
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
/** 是否为错误状态 */
|
|
16
|
+
error?: boolean;
|
|
17
|
+
/** 提示文字 */
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
/** 最大日期个数 */
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
/** 是否显示字数统计 */
|
|
22
|
+
showWordLimit?: boolean;
|
|
23
|
+
/** 自定义字数计算方法 */
|
|
24
|
+
wordLength?: (value: string) => number;
|
|
25
|
+
/** 超出最大长度时的截取方法 */
|
|
26
|
+
wordSlice?: (value: string, maxLength: number) => string;
|
|
27
|
+
/** 原生 input 元素的额外属性 */
|
|
28
|
+
inputAttrs?: Record<string, any>;
|
|
29
|
+
/** 输入框类型 */
|
|
30
|
+
type?: string;
|
|
31
|
+
/** 前置标签 */
|
|
32
|
+
prepend?: string;
|
|
33
|
+
/** 后置标签 */
|
|
34
|
+
append?: string;
|
|
35
|
+
/** 日期选择器配置 */
|
|
36
|
+
datePickerProps?: Partial<RangePickerProps>;
|
|
37
|
+
}
|
|
38
|
+
export type ProDatesPickerProps = Partial<IProDatesPickerProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 转换成显示字符串
|
|
3
|
+
* @param value
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export declare const transDatesString: (value?: string | Array<string>) => string;
|
|
7
|
+
/**
|
|
8
|
+
* 初始化
|
|
9
|
+
* @param value
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const initSelected: (value?: string | Array<string>) => Date[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import n from "dayjs";
|
|
2
|
+
const i = (t) => {
|
|
3
|
+
const r = n(t);
|
|
4
|
+
return r.isValid() ? r.format("YYYY-MM-DD") : "";
|
|
5
|
+
}, o = (t) => t ? typeof t == "string" ? t.replace(/,(?=\S)/g, ", ") : t.map((e) => i(e)).filter(Boolean).join(", ") : "", a = (t) => t ? typeof t == "string" ? t.split(",").map((r) => new Date(r)) : t.map((r) => new Date(r)) : [];
|
|
6
|
+
export {
|
|
7
|
+
a as initSelected,
|
|
8
|
+
o as transDatesString
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as _ProFindPassword } from './index.vue';
|
|
3
|
+
type ProFindPasswordType = typeof _ProFindPassword & {
|
|
4
|
+
install: (app: App) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const ProFindPassword: ProFindPasswordType;
|
|
7
|
+
/** 导出类型 */
|
|
8
|
+
export * from './interface';
|
|
9
|
+
/** 导出组件 */
|
|
10
|
+
export { ProFindPassword };
|
|
11
|
+
export default ProFindPassword;
|