@das-fed/ui 6.4.0-hot.7 → 6.4.0-hot.8
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/esm-map.json +7 -4
- package/package.json +5 -6
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +16 -1
- package/packages/business-components/device-panel/index.js +22265 -16373
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/components/drag-resize/index.vue.d.ts +129 -0
- package/packages/business-components/device-panel/src/components/drag-resize/type.d.ts +83 -0
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/echarts/index.d.ts +199 -0
- package/packages/business-components/echarts/index.js +6959 -6863
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/echarts/src/Index.vue.d.ts +24 -0
- package/packages/business-components/echarts/src/type.d.ts +19 -0
- package/packages/business-components/echarts/style.css +1 -0
- package/packages/business-components/import-button/hooks/file.d.ts +1 -1
- package/packages/business-components/import-button/index.d.ts +3 -0
- package/packages/business-components/import-button/index.js +33 -32
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/import-button/src/App.vue.d.ts +1 -0
- package/packages/business-components/import-button/style.css +1 -1
- package/packages/business-components/model-table-dialog/index.js +156 -135
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/style.css +1 -1
- package/packages/business-components/model-table-dialog/style.css.gz +0 -0
- package/packages/business-components/process-form/App.vue.d.ts +6 -0
- package/packages/business-components/process-form/api-service/formPreView.d.ts +16 -0
- package/packages/business-components/process-form/apis.d.ts +4 -0
- package/packages/business-components/process-form/index.d.ts +12 -0
- package/packages/business-components/process-form/index.js +1414 -1000
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +16 -1
- package/packages/business-components/process-form/src/hooks/useSelector.d.ts +3 -1
- package/packages/business-components/process-form/src/widgets/base/radio.vue.d.ts +6 -2
- package/packages/business-components/process-form/src/widgets/store.d.ts +2 -0
- package/packages/business-components/process-form/style.css +1 -1
- package/packages/business-components/process-form/type.d.ts +2 -0
- package/packages/business-components/urgent-panel/index.d.ts +2 -1
- package/packages/business-components/urgent-panel/index.js +1505 -1586
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/src/components/drag-resize/index.vue.d.ts +129 -0
- package/packages/business-components/urgent-panel/src/components/drag-resize/type.d.ts +83 -0
- package/packages/business-components/urgent-panel/style.css +1 -1
- package/packages/business-components/urgent-panel/style.css.gz +0 -0
- package/packages/components/calendar/index.js +219 -220
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/form/index.d.ts +35 -1
- package/packages/components/form/index.js +76 -40
- package/packages/components/form/index.js.gz +0 -0
- package/packages/components/form/src/Index.vue.d.ts +3 -0
- package/packages/components/form/src/type.d.ts +3 -0
- package/packages/components/form/src/utils/flat-form-item.d.ts +1 -0
- package/packages/components/form/style.css +1 -1
- package/packages/components/image-viewer/index.js +362 -329
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/src/hooks/use-handler-url-name.d.ts +3 -0
- package/packages/components/image-viewer/src/hooks/use-imageViewer.d.ts +4 -2
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/menu-aside/index.d.ts +1 -0
- package/packages/components/menu-aside/index.js +55 -52
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-aside/src/Index.vue.d.ts +1 -0
- package/packages/components/menu-aside/style.css +1 -1
- package/packages/components/menu-aside/style.css.gz +0 -0
- package/packages/components/table/index.d.ts +35 -1
- package/packages/components/table/index.js +575 -571
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +3 -0
- package/packages/components/table/src/type.d.ts +3 -0
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/table/theme/index.d.ts +2 -0
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/calendar/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import { t as
|
|
2
|
+
import { withInstall as X } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { defineComponent as G, ref as H, computed as D, watch as ee, nextTick as x, openBlock as u, createElementBlock as m, normalizeClass as A, Fragment as P, renderList as Z, createElementVNode as b, toDisplayString as j, renderSlot as M, createCommentVNode as C, normalizeStyle as te, onMounted as ae, onBeforeUnmount as ne, createVNode as se, createSlots as K, withCtx as R, normalizeProps as V, mergeProps as F, guardReactiveProps as E, createBlock as re } from "vue";
|
|
4
|
+
import { t as J, setI18nRule as le } from "@das-fed/web/packages/i18n/index";
|
|
5
5
|
import z from "dayjs";
|
|
6
|
-
import
|
|
7
|
-
import { SizeWatcher as
|
|
8
|
-
import { setThemeRule as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
6
|
+
import oe from "dayjs/plugin/localeData";
|
|
7
|
+
import { SizeWatcher as de } from "@das-fed/utils/size-watcher";
|
|
8
|
+
import { setThemeRule as ce } from "@das-fed/web/packages/theme/index";
|
|
9
|
+
const he = (l, i) => {
|
|
10
|
+
const o = l.endOf("month"), c = i.startOf("month"), n = o.isSame(c, "week") ? c.add(1, "week") : c;
|
|
11
11
|
return [
|
|
12
|
-
[
|
|
13
|
-
[
|
|
12
|
+
[l, o],
|
|
13
|
+
[n.startOf("week"), i]
|
|
14
14
|
];
|
|
15
|
-
},
|
|
16
|
-
const
|
|
15
|
+
}, ie = (l, i) => {
|
|
16
|
+
const o = l.endOf("month"), c = l.add(1, "month").startOf("month"), r = o.isSame(
|
|
17
17
|
c,
|
|
18
18
|
"week"
|
|
19
|
-
) ? c.add(1, "week") : c,
|
|
19
|
+
) ? c.add(1, "week") : c, n = r.endOf("month"), p = i.startOf("month"), N = n.isSame(p, "week") ? p.add(1, "week") : p;
|
|
20
20
|
return [
|
|
21
|
-
[
|
|
22
|
-
[r.startOf("week"),
|
|
23
|
-
[N.startOf("week"),
|
|
21
|
+
[l, o],
|
|
22
|
+
[r.startOf("week"), n],
|
|
23
|
+
[N.startOf("week"), i]
|
|
24
24
|
];
|
|
25
|
-
},
|
|
26
|
-
const
|
|
27
|
-
return r ===
|
|
28
|
-
}, $ = (
|
|
29
|
-
const
|
|
30
|
-
return $(
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
return $(
|
|
34
|
-
},
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
}),
|
|
25
|
+
}, U = (l, i) => {
|
|
26
|
+
const o = l.startOf("week"), c = i.endOf("week"), r = o.get("month"), n = c.get("month");
|
|
27
|
+
return r === n ? [[o, c]] : (r + 1) % 12 === n ? he(o, c) : r + 2 === n || (r + 1) % 11 === n ? ie(o, c) : [];
|
|
28
|
+
}, $ = (l) => Array.from(Array.from({ length: l }).keys()), ue = (l, i) => {
|
|
29
|
+
const o = l.subtract(1, "month").endOf("month").date();
|
|
30
|
+
return $(i).map((c, r) => o - (i - r - 1));
|
|
31
|
+
}, ye = (l) => {
|
|
32
|
+
const i = l.daysInMonth();
|
|
33
|
+
return $(i).map((o, c) => c + 1);
|
|
34
|
+
}, me = (l) => $(l.length / 7).map((i) => {
|
|
35
|
+
const o = i * 7;
|
|
36
|
+
return l.slice(o, o + 7);
|
|
37
|
+
}), pe = { key: 0 }, fe = { class: "das-calendar-header-box" }, ge = { class: "das-calendar-header-week-line" }, ke = ["onClick"], De = {
|
|
38
38
|
name: "calendar-table"
|
|
39
|
-
},
|
|
40
|
-
...
|
|
39
|
+
}, q = /* @__PURE__ */ G({
|
|
40
|
+
...De,
|
|
41
41
|
props: {
|
|
42
42
|
selectedDay: {},
|
|
43
43
|
date: {},
|
|
@@ -52,118 +52,117 @@ const ce = (o, h) => {
|
|
|
52
52
|
cellHeight: {}
|
|
53
53
|
},
|
|
54
54
|
emits: ["pick"],
|
|
55
|
-
setup(
|
|
56
|
-
const c =
|
|
57
|
-
const e =
|
|
58
|
-
return e === 0 ?
|
|
59
|
-
}),
|
|
55
|
+
setup(l, { expose: i, emit: o }) {
|
|
56
|
+
const c = o, r = z(), n = l, p = H("128px"), N = H(), Y = 60, W = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], S = D(() => !!n.range && !!n.range.length), L = D(() => {
|
|
57
|
+
const e = n.firstDayOfWeek, a = n.showZhou ? "das-calendar-weeks-zhou-" : "das-calendar-weeks-";
|
|
58
|
+
return e === 0 ? W.map((s) => J(`${a}${s}`)) : W.slice(e).concat(W.slice(0, e)).map((s) => J(`${a}${s}`));
|
|
59
|
+
}), w = D(() => {
|
|
60
60
|
let e = [];
|
|
61
61
|
if (S.value) {
|
|
62
|
-
const [a,
|
|
63
|
-
let
|
|
64
|
-
a.isSame(
|
|
65
|
-
text: a.date() +
|
|
62
|
+
const [a, s] = n.range;
|
|
63
|
+
let h = [];
|
|
64
|
+
a.isSame(s, "month") ? h = $(s.date() - a.date() + 1).map((v) => ({
|
|
65
|
+
text: a.date() + v,
|
|
66
66
|
type: "current"
|
|
67
|
-
})) :
|
|
68
|
-
text: a.date() +
|
|
67
|
+
})) : h = $(a.endOf("month").date() - a.date() + 1).map((v) => ({
|
|
68
|
+
text: a.date() + v,
|
|
69
69
|
type: "current"
|
|
70
70
|
}));
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
text:
|
|
71
|
+
let g = h.length % 7;
|
|
72
|
+
g = g === 0 ? 0 : 7 - g;
|
|
73
|
+
const k = $(g).map((v, B) => ({
|
|
74
|
+
text: B + 1,
|
|
75
75
|
type: "next"
|
|
76
76
|
}));
|
|
77
|
-
e =
|
|
77
|
+
e = h.concat(k);
|
|
78
78
|
} else {
|
|
79
|
-
const a =
|
|
80
|
-
|
|
81
|
-
(a -
|
|
82
|
-
).map((
|
|
83
|
-
text:
|
|
79
|
+
const a = n.date.startOf("month").day(), s = ue(
|
|
80
|
+
n.date,
|
|
81
|
+
(a - n.firstDayOfWeek + 7) % 7
|
|
82
|
+
).map((v) => ({
|
|
83
|
+
text: v,
|
|
84
84
|
type: "prev"
|
|
85
|
-
})),
|
|
86
|
-
text:
|
|
85
|
+
})), h = ye(n.date).map((v) => ({
|
|
86
|
+
text: v,
|
|
87
87
|
type: "current"
|
|
88
88
|
}));
|
|
89
|
-
e = [...
|
|
90
|
-
const
|
|
91
|
-
text:
|
|
89
|
+
e = [...s, ...h];
|
|
90
|
+
const g = 7 - (e.length % 7 || 7), k = $(g).map((v, B) => ({
|
|
91
|
+
text: B + 1,
|
|
92
92
|
type: "next"
|
|
93
93
|
}));
|
|
94
|
-
if (e = e.concat(
|
|
95
|
-
const
|
|
96
|
-
text:
|
|
94
|
+
if (e = e.concat(k), n.calendartType == "simple" && e.length / 7 < 6) {
|
|
95
|
+
const v = k.length ? k[k.length - 1].text : 0, B = $(7).map((Oe, Q) => ({
|
|
96
|
+
text: v + Q + 1,
|
|
97
97
|
type: "next"
|
|
98
98
|
}));
|
|
99
|
-
e = e.concat(
|
|
99
|
+
e = e.concat(B);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
return
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
()
|
|
102
|
+
return me(e);
|
|
103
|
+
}), T = () => {
|
|
104
|
+
var s;
|
|
105
|
+
const e = (s = n.parent) == null ? void 0 : s.offsetHeight;
|
|
106
|
+
let a = Number(e) - Y - 1;
|
|
107
|
+
p.value = a / w.value.length - 1 + "px";
|
|
108
|
+
};
|
|
109
|
+
ee(
|
|
110
|
+
() => w.value,
|
|
106
111
|
(e) => {
|
|
107
|
-
if (
|
|
108
|
-
|
|
112
|
+
if (n.cellHeight) {
|
|
113
|
+
p.value = `${n.cellHeight}px`;
|
|
109
114
|
return;
|
|
110
115
|
}
|
|
111
|
-
e && e.length ?
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
let n = Number(a) - H - 1;
|
|
115
|
-
m.value = n / e.length - 1 + "px";
|
|
116
|
-
}) : m.value = "128px";
|
|
116
|
+
e && e.length ? x(() => {
|
|
117
|
+
T();
|
|
118
|
+
}) : p.value = "128px";
|
|
117
119
|
},
|
|
118
120
|
{ immediate: !0 }
|
|
119
121
|
);
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
|
|
122
|
+
const O = () => {
|
|
123
|
+
if (n.cellHeight) {
|
|
124
|
+
p.value = `${n.cellHeight}px`;
|
|
123
125
|
return;
|
|
124
126
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const e = (n = s.parent) == null ? void 0 : n.offsetHeight;
|
|
128
|
-
let a = Number(e) - H;
|
|
129
|
-
m.value = a / D.value.length - 1 * D.value.length + "px";
|
|
127
|
+
x(() => {
|
|
128
|
+
T();
|
|
130
129
|
});
|
|
131
|
-
},
|
|
130
|
+
}, f = (e, a) => {
|
|
132
131
|
switch (a) {
|
|
133
132
|
case "prev":
|
|
134
|
-
return
|
|
133
|
+
return n.date.startOf("month").subtract(1, "month").date(e);
|
|
135
134
|
case "next":
|
|
136
|
-
return
|
|
135
|
+
return n.date.startOf("month").add(1, "month").date(e);
|
|
137
136
|
case "current":
|
|
138
|
-
return
|
|
137
|
+
return n.date.date(e);
|
|
139
138
|
}
|
|
140
|
-
},
|
|
141
|
-
const
|
|
142
|
-
return
|
|
143
|
-
},
|
|
144
|
-
const
|
|
145
|
-
c("pick",
|
|
146
|
-
},
|
|
147
|
-
const a =
|
|
139
|
+
}, _ = ({ text: e, type: a }) => {
|
|
140
|
+
const s = [a], h = f(e, a);
|
|
141
|
+
return h.isSame(n.selectedDay, "day") && s.push("is-selected"), h.isSame(r, "day") && s.push("is-today"), s;
|
|
142
|
+
}, I = ({ text: e, type: a }) => {
|
|
143
|
+
const s = f(e, a);
|
|
144
|
+
c("pick", s);
|
|
145
|
+
}, t = (e) => {
|
|
146
|
+
const a = w.value[0];
|
|
148
147
|
if (a) {
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const { text:
|
|
152
|
-
return
|
|
148
|
+
const s = a[e];
|
|
149
|
+
if (s) {
|
|
150
|
+
const { text: h, type: g } = s;
|
|
151
|
+
return f(h, g).format("MM/DD");
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
return "";
|
|
156
|
-
},
|
|
157
|
-
const a =
|
|
155
|
+
}, y = (e) => {
|
|
156
|
+
const a = w.value[0];
|
|
158
157
|
if (a) {
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
const { text:
|
|
158
|
+
const s = a[e];
|
|
159
|
+
if (s) {
|
|
160
|
+
const { text: h, type: g } = s, k = f(h, g);
|
|
162
161
|
return {
|
|
163
|
-
isSelected:
|
|
164
|
-
type: `${
|
|
165
|
-
day:
|
|
166
|
-
date:
|
|
162
|
+
isSelected: k.isSame(n.selectedDay),
|
|
163
|
+
type: `${g}-month`,
|
|
164
|
+
day: k.format("YYYY-MM-DD"),
|
|
165
|
+
date: k.toDate()
|
|
167
166
|
};
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -173,95 +172,95 @@ const ce = (o, h) => {
|
|
|
173
172
|
day: null,
|
|
174
173
|
date: null
|
|
175
174
|
};
|
|
176
|
-
},
|
|
177
|
-
const
|
|
175
|
+
}, d = ({ text: e, type: a }) => {
|
|
176
|
+
const s = f(e, a);
|
|
178
177
|
return {
|
|
179
|
-
isSelected:
|
|
178
|
+
isSelected: s.isSame(n.selectedDay),
|
|
180
179
|
type: `${a}-month`,
|
|
181
|
-
day:
|
|
182
|
-
date:
|
|
180
|
+
day: s.format("YYYY-MM-DD"),
|
|
181
|
+
date: s.toDate()
|
|
183
182
|
};
|
|
184
183
|
};
|
|
185
|
-
return
|
|
186
|
-
getHeight:
|
|
187
|
-
}), (e, a) =>
|
|
184
|
+
return i({
|
|
185
|
+
getHeight: O
|
|
186
|
+
}), (e, a) => w.value.length ? (u(), m("table", {
|
|
188
187
|
key: 0,
|
|
189
|
-
class:
|
|
188
|
+
class: A(["das-calendar-table", { "is-range": S.value, "is-week": e.calendartType == "week", simple: e.calendartType == "simple" }]),
|
|
190
189
|
cellspacing: "0",
|
|
191
190
|
cellpadding: "0",
|
|
192
191
|
ref_key: "tableRef",
|
|
193
192
|
ref: N
|
|
194
193
|
}, [
|
|
195
|
-
e.hideHeader ? C("", !0) : (
|
|
196
|
-
(
|
|
194
|
+
e.hideHeader ? C("", !0) : (u(), m("thead", pe, [
|
|
195
|
+
(u(!0), m(P, null, Z(L.value, (s, h) => (u(), m("th", {
|
|
197
196
|
class: "das-calendar-table-header",
|
|
198
|
-
key:
|
|
197
|
+
key: s
|
|
199
198
|
}, [
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
class:
|
|
204
|
-
},
|
|
199
|
+
b("div", fe, [
|
|
200
|
+
b("div", ge, [
|
|
201
|
+
b("div", {
|
|
202
|
+
class: A(["das-calendar-header-week", { highlight: e.highlightWeek }])
|
|
203
|
+
}, j(s), 3),
|
|
205
204
|
e.calendartType == "week" ? M(e.$slots, "week-type", {
|
|
206
205
|
key: 0,
|
|
207
|
-
data:
|
|
206
|
+
data: y(h)
|
|
208
207
|
}) : C("", !0)
|
|
209
208
|
]),
|
|
210
|
-
e.calendartType == "week" ? (
|
|
209
|
+
e.calendartType == "week" ? (u(), m("div", {
|
|
211
210
|
key: 0,
|
|
212
|
-
class:
|
|
213
|
-
},
|
|
211
|
+
class: A(["das-calendar-header-day", { highlight: e.highlightDay }])
|
|
212
|
+
}, j(t(h)), 3)) : C("", !0)
|
|
214
213
|
])
|
|
215
214
|
]))), 128))
|
|
216
215
|
])),
|
|
217
|
-
|
|
218
|
-
(
|
|
219
|
-
key:
|
|
220
|
-
class:
|
|
216
|
+
b("tbody", null, [
|
|
217
|
+
(u(!0), m(P, null, Z(w.value, (s, h) => (u(), m("tr", {
|
|
218
|
+
key: h,
|
|
219
|
+
class: A({
|
|
221
220
|
"das-calendar-table-row": !0,
|
|
222
|
-
"hide-border":
|
|
221
|
+
"hide-border": h === 0 && e.hideHeader
|
|
223
222
|
})
|
|
224
223
|
}, [
|
|
225
|
-
(
|
|
226
|
-
key:
|
|
227
|
-
class:
|
|
228
|
-
onClick: (
|
|
224
|
+
(u(!0), m(P, null, Z(s, (g, k) => (u(), m("td", {
|
|
225
|
+
key: k,
|
|
226
|
+
class: A(_(g)),
|
|
227
|
+
onClick: (v) => I(g)
|
|
229
228
|
}, [
|
|
230
|
-
|
|
229
|
+
b("div", {
|
|
231
230
|
class: "das-calendar-day",
|
|
232
|
-
style:
|
|
231
|
+
style: te({ height: p.value })
|
|
233
232
|
}, [
|
|
234
233
|
M(e.$slots, "date-cell", {
|
|
235
|
-
data:
|
|
234
|
+
data: d(g)
|
|
236
235
|
})
|
|
237
236
|
], 4)
|
|
238
|
-
], 10,
|
|
237
|
+
], 10, ke))), 128))
|
|
239
238
|
], 2))), 128))
|
|
240
239
|
])
|
|
241
240
|
], 2)) : C("", !0);
|
|
242
241
|
}
|
|
243
|
-
}),
|
|
242
|
+
}), ve = {
|
|
244
243
|
key: 0,
|
|
245
244
|
class: "das-calendar-body 1"
|
|
246
|
-
},
|
|
245
|
+
}, we = {
|
|
247
246
|
key: 1,
|
|
248
247
|
class: "das-calendar-cell-date"
|
|
249
|
-
},
|
|
248
|
+
}, ze = {
|
|
250
249
|
key: 2,
|
|
251
250
|
class: "das-calendar-cell-cont"
|
|
252
|
-
},
|
|
251
|
+
}, Ce = {
|
|
253
252
|
key: 1,
|
|
254
253
|
class: "das-calendar-body 2"
|
|
255
|
-
},
|
|
254
|
+
}, Ne = {
|
|
256
255
|
key: 1,
|
|
257
256
|
class: "das-calendar-cell-date"
|
|
258
|
-
},
|
|
257
|
+
}, Me = {
|
|
259
258
|
key: 2,
|
|
260
259
|
class: "das-calendar-cell-cont"
|
|
261
|
-
},
|
|
260
|
+
}, Se = {
|
|
262
261
|
name: "test"
|
|
263
|
-
},
|
|
264
|
-
...
|
|
262
|
+
}, $e = /* @__PURE__ */ G({
|
|
263
|
+
...Se,
|
|
265
264
|
props: {
|
|
266
265
|
modelValue: {},
|
|
267
266
|
range: {},
|
|
@@ -275,126 +274,126 @@ const ce = (o, h) => {
|
|
|
275
274
|
cellHeight: { default: 0 }
|
|
276
275
|
},
|
|
277
276
|
emits: ["update:model-value", "itemClick"],
|
|
278
|
-
setup(
|
|
279
|
-
z.extend(
|
|
280
|
-
const c = z.localeData().firstDayOfWeek(), r =
|
|
277
|
+
setup(l, { expose: i, emit: o }) {
|
|
278
|
+
z.extend(oe);
|
|
279
|
+
const c = z.localeData().firstDayOfWeek(), r = l, n = o, p = H(), N = H(), Y = H(), W = D(() => r.firstDayOfWeek || c), S = H(), L = z(), w = D({
|
|
281
280
|
get() {
|
|
282
|
-
return r.modelValue ? (S.value =
|
|
281
|
+
return r.modelValue ? (S.value = f.value, f.value) : S.value;
|
|
283
282
|
},
|
|
284
283
|
set(t) {
|
|
285
284
|
if (!t) return;
|
|
286
285
|
S.value = t;
|
|
287
|
-
const
|
|
288
|
-
r.isSwitchMonth &&
|
|
286
|
+
const y = t.toDate();
|
|
287
|
+
r.isSwitchMonth && n("update:model-value", y);
|
|
289
288
|
}
|
|
290
|
-
}),
|
|
289
|
+
}), T = D(() => {
|
|
291
290
|
if (r.type == "week") {
|
|
292
291
|
if (r.range) return r.range;
|
|
293
|
-
const
|
|
294
|
-
return
|
|
292
|
+
const y = (z(r.modelValue).day() - W.value + 7) % 7, d = 7 - (y + 1), e = [];
|
|
293
|
+
return e.push(z(r.modelValue).subtract(y, "day").toDate()), e.push(z(r.modelValue).add(d, "day").toDate()), e;
|
|
295
294
|
} else
|
|
296
295
|
return r.range ? r.range : void 0;
|
|
297
|
-
}),
|
|
298
|
-
if (!
|
|
299
|
-
const t =
|
|
300
|
-
return r.type == "week" ? [[
|
|
301
|
-
}),
|
|
302
|
-
|
|
303
|
-
const t = `das-calendar-month${
|
|
304
|
-
return `${
|
|
305
|
-
}), te(() => {
|
|
306
|
-
H.value = oe(() => {
|
|
307
|
-
var t, u;
|
|
308
|
-
Array.isArray(N.value) ? (t = N.value[0]) == null || t.getHeight() : (u = N.value) == null || u.getHeight();
|
|
309
|
-
}, m.value);
|
|
296
|
+
}), O = D(() => {
|
|
297
|
+
if (!T.value) return [];
|
|
298
|
+
const t = T.value.map((e) => z(e)), [y, d] = t;
|
|
299
|
+
return r.type == "week" ? [[y, d]] : y.isAfter(d) ? [] : y.isSame(d, "month") ? U(y, d) : y.add(1, "month").month() !== d.month() ? [] : U(y, d);
|
|
300
|
+
}), f = D(() => r.modelValue ? z(r.modelValue) : w.value || (O.value.length ? O.value[0][0] : L));
|
|
301
|
+
D(() => f.value.subtract(1, "month").date(1)), D(() => f.value.add(1, "month").date(1)), D(() => f.value.subtract(1, "year").date(1)), D(() => f.value.add(1, "year").date(1)), D(() => {
|
|
302
|
+
const t = `das-calendar-month${f.value.format("M")}`;
|
|
303
|
+
return `${f.value.year()} ${J("das-calendar-year")} ${J(t)}`;
|
|
310
304
|
}), ae(() => {
|
|
311
|
-
|
|
305
|
+
Y.value = de(() => {
|
|
306
|
+
var t, y;
|
|
307
|
+
Array.isArray(N.value) ? (t = N.value[0]) == null || t.getHeight() : (y = N.value) == null || y.getHeight();
|
|
308
|
+
}, p.value);
|
|
309
|
+
}), ne(() => {
|
|
310
|
+
Y.value.disconnect();
|
|
312
311
|
});
|
|
313
|
-
const
|
|
314
|
-
r.isSwitchSelection && (
|
|
312
|
+
const _ = (t) => {
|
|
313
|
+
r.isSwitchSelection && (w.value = t), n("itemClick", t.toDate());
|
|
315
314
|
};
|
|
316
|
-
return
|
|
317
|
-
$calendar:
|
|
315
|
+
return i({
|
|
316
|
+
$calendar: p,
|
|
318
317
|
setActive: (t) => {
|
|
319
|
-
|
|
318
|
+
w.value = z(t), n("itemClick", t);
|
|
320
319
|
}
|
|
321
|
-
}), (t,
|
|
320
|
+
}), (t, y) => (u(), m("div", {
|
|
322
321
|
ref_key: "$calendar",
|
|
323
|
-
ref:
|
|
322
|
+
ref: p,
|
|
324
323
|
class: "das-ui-calendar"
|
|
325
324
|
}, [
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
O.value.length === 0 ? (u(), m("div", ve, [
|
|
326
|
+
se(q, {
|
|
328
327
|
ref_key: "$calendarTable",
|
|
329
328
|
ref: N,
|
|
330
|
-
date:
|
|
331
|
-
firstDayOfWeek:
|
|
332
|
-
parent:
|
|
329
|
+
date: f.value,
|
|
330
|
+
firstDayOfWeek: W.value,
|
|
331
|
+
parent: p.value,
|
|
333
332
|
calendartType: t.type,
|
|
334
333
|
highlightWeek: t.highlightWeek,
|
|
335
334
|
highlightDay: t.highlightDay,
|
|
336
335
|
showZhou: t.showZhou,
|
|
337
336
|
cellHeight: t.cellHeight,
|
|
338
337
|
"selected-day": S.value,
|
|
339
|
-
onPick:
|
|
340
|
-
},
|
|
341
|
-
"date-cell":
|
|
342
|
-
t.$slots.custom ? M(t.$slots, "custom",
|
|
343
|
-
t.type != "week" && !t.$slots.custom ? (
|
|
344
|
-
|
|
345
|
-
M(t.$slots, "date-type",
|
|
338
|
+
onPick: _
|
|
339
|
+
}, K({
|
|
340
|
+
"date-cell": R((d) => [
|
|
341
|
+
t.$slots.custom ? M(t.$slots, "custom", V(F({ key: 0 }, d))) : C("", !0),
|
|
342
|
+
t.type != "week" && !t.$slots.custom ? (u(), m("p", we, [
|
|
343
|
+
b("span", null, j(Number(d.data.day.split("-").slice(2)).toString()), 1),
|
|
344
|
+
M(t.$slots, "date-type", V(E(d)))
|
|
346
345
|
])) : C("", !0),
|
|
347
|
-
t.$slots.custom ? C("", !0) : (
|
|
348
|
-
M(t.$slots, "date-cell",
|
|
346
|
+
t.$slots.custom ? C("", !0) : (u(), m("div", ze, [
|
|
347
|
+
M(t.$slots, "date-cell", V(E(d)))
|
|
349
348
|
]))
|
|
350
349
|
]),
|
|
351
350
|
_: 2
|
|
352
351
|
}, [
|
|
353
352
|
t.$slots["week-type"] && t.type == "week" ? {
|
|
354
353
|
name: "week-type",
|
|
355
|
-
fn:
|
|
356
|
-
M(t.$slots, "week-type",
|
|
354
|
+
fn: R((d) => [
|
|
355
|
+
M(t.$slots, "week-type", V(E(d)))
|
|
357
356
|
]),
|
|
358
357
|
key: "0"
|
|
359
358
|
} : void 0
|
|
360
359
|
]), 1032, ["date", "firstDayOfWeek", "parent", "calendartType", "highlightWeek", "highlightDay", "showZhou", "cellHeight", "selected-day"])
|
|
361
|
-
])) : (
|
|
362
|
-
(
|
|
360
|
+
])) : (u(), m("div", Ce, [
|
|
361
|
+
(u(!0), m(P, null, Z(O.value, (d, e) => (u(), re(q, {
|
|
363
362
|
ref_for: !0,
|
|
364
363
|
ref_key: "$calendarTable",
|
|
365
364
|
ref: N,
|
|
366
|
-
key:
|
|
367
|
-
firstDayOfWeek:
|
|
368
|
-
date:
|
|
365
|
+
key: e,
|
|
366
|
+
firstDayOfWeek: W.value,
|
|
367
|
+
date: d[0],
|
|
369
368
|
calendartType: t.type,
|
|
370
369
|
highlightWeek: t.highlightWeek,
|
|
371
370
|
highlightDay: t.highlightDay,
|
|
372
371
|
showZhou: t.showZhou,
|
|
373
372
|
cellHeight: t.cellHeight,
|
|
374
373
|
"selected-day": S.value,
|
|
375
|
-
range:
|
|
376
|
-
parent:
|
|
377
|
-
"hide-header":
|
|
378
|
-
onPick:
|
|
379
|
-
},
|
|
380
|
-
"date-cell":
|
|
381
|
-
t.$slots.custom ? M(t.$slots, "custom",
|
|
374
|
+
range: d,
|
|
375
|
+
parent: p.value,
|
|
376
|
+
"hide-header": e !== 0,
|
|
377
|
+
onPick: _
|
|
378
|
+
}, K({
|
|
379
|
+
"date-cell": R((a) => [
|
|
380
|
+
t.$slots.custom ? M(t.$slots, "custom", F({
|
|
382
381
|
key: 0,
|
|
383
382
|
ref_for: !0
|
|
384
|
-
},
|
|
385
|
-
t.type != "week" && !t.$slots.custom ? (
|
|
386
|
-
|
|
383
|
+
}, a)) : C("", !0),
|
|
384
|
+
t.type != "week" && !t.$slots.custom ? (u(), m("p", Ne, [
|
|
385
|
+
b("span", null, j(Number(a.data.day.split("-").slice(2)).toString()), 1)
|
|
387
386
|
])) : C("", !0),
|
|
388
|
-
t.$slots.custom ? C("", !0) : (
|
|
389
|
-
M(t.$slots, "date-cell",
|
|
387
|
+
t.$slots.custom ? C("", !0) : (u(), m("div", Me, [
|
|
388
|
+
M(t.$slots, "date-cell", F({ ref_for: !0 }, a))
|
|
390
389
|
]))
|
|
391
390
|
]),
|
|
392
391
|
_: 2
|
|
393
392
|
}, [
|
|
394
393
|
t.$slots["week-type"] && t.type == "week" ? {
|
|
395
394
|
name: "week-type",
|
|
396
|
-
fn:
|
|
397
|
-
M(t.$slots, "week-type",
|
|
395
|
+
fn: R((a) => [
|
|
396
|
+
M(t.$slots, "week-type", F({ ref_for: !0 }, a))
|
|
398
397
|
]),
|
|
399
398
|
key: "0"
|
|
400
399
|
} : void 0
|
|
@@ -402,7 +401,7 @@ const ce = (o, h) => {
|
|
|
402
401
|
]))
|
|
403
402
|
], 512));
|
|
404
403
|
}
|
|
405
|
-
}),
|
|
404
|
+
}), We = {
|
|
406
405
|
"--das-ui-calendar-color-primary": "#5582F3",
|
|
407
406
|
// 主题色
|
|
408
407
|
"--das-ui-calendar-color-text": "#212121",
|
|
@@ -467,10 +466,10 @@ const ce = (o, h) => {
|
|
|
467
466
|
"das-calendar-months-nov": { "zh-CN": "十一月", en: "Nov" },
|
|
468
467
|
"das-calendar-months-dec": { "zh-CN": "十二月", en: "Dec" }
|
|
469
468
|
};
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
const
|
|
469
|
+
le(be);
|
|
470
|
+
ce(We);
|
|
471
|
+
const Ve = X($e), Fe = { name: "calendar 日历" };
|
|
473
472
|
export {
|
|
474
|
-
|
|
475
|
-
|
|
473
|
+
Ve as DasCalendar,
|
|
474
|
+
Fe as default
|
|
476
475
|
};
|
|
Binary file
|