@das-fed/upf-ui 6.4.0-dev.215 → 6.4.0-dev.216
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/package.json +5 -5
- package/packages/business-components/ai-panel/index-B4pMosXu.js +143 -0
- package/packages/business-components/ai-panel/index-B4pMosXu.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-BybM3Q9u.js → index-BgyMyjJo.js} +711 -700
- package/packages/business-components/ai-panel/index-BgyMyjJo.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-CwdJKHy0.js → index-Bw7rNZmA.js} +9 -9
- package/packages/business-components/ai-panel/index-Bw7rNZmA.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/device-panel/index.js +8873 -8773
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/echarts/index.js +2056 -2049
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/process-configuration/index.js +50 -50
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +149 -149
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-search-form/index.js +60 -60
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/index.js +130 -128
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/index.js +904 -896
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/index.js +249 -246
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +1 -0
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/autocomplete/index.js +12 -6
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/calendar/index.js +104 -104
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.js +27 -27
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/checkbox/index.js +54 -54
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/date-picker/index.js +459 -459
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/dimple-layout/index.js +63 -61
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +23 -22
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.js +224 -223
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +44 -42
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form-item/index.js +67 -63
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +32 -32
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/input/index.js +51 -51
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input-number/index.js +44 -44
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/live-player/index.js +834 -832
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/map/index.js +437 -431
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +1 -1
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/message/index.js +6 -6
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/radio-tabs/index.js +33 -33
- package/packages/components/radio-tabs/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +4586 -4556
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +135 -135
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +2 -2
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/select/index.js +92 -92
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select-list/index.js +10 -6
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +16 -14
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +53 -51
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/spin/index.js +35 -35
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.js +102 -101
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/table/index.js +604 -599
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/time-line/index.js +1 -1
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tree/index.js +182 -173
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +81 -81
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-table/index.js +2 -2
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1240 -1208
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/business-components/ai-panel/index-BybM3Q9u.js.gz +0 -0
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js +0 -142
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js.gz +0 -0
- package/packages/business-components/ai-panel/index-CwdJKHy0.js.gz +0 -0
|
Binary file
|
|
@@ -375,6 +375,7 @@ const Te = /* @__PURE__ */ D({
|
|
|
375
375
|
return (d = h.value) == null ? void 0 : d.video;
|
|
376
376
|
}), u = k(!1), c = k(!0), g = (d) => {
|
|
377
377
|
n.value = d, n.value.on(window.mpegts.Events.ERROR, (b) => {
|
|
378
|
+
console.log("player error", b);
|
|
378
379
|
});
|
|
379
380
|
}, _ = () => {
|
|
380
381
|
s.value = !s.value, n.value && (n.value.muted = s.value);
|
|
Binary file
|
|
@@ -213,10 +213,13 @@ var ot = /* @__PURE__ */ function() {
|
|
|
213
213
|
}();
|
|
214
214
|
function _e(e, t, i) {
|
|
215
215
|
var s = t.value;
|
|
216
|
-
if (s
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
if (s)
|
|
217
|
+
if (typeof IntersectionObserver > "u")
|
|
218
|
+
console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");
|
|
219
|
+
else {
|
|
220
|
+
var n = new ot(e, s, i);
|
|
221
|
+
e._vue_visibilityState = n;
|
|
222
|
+
}
|
|
220
223
|
}
|
|
221
224
|
function at(e, t, i) {
|
|
222
225
|
var s = t.value, n = t.oldValue;
|
|
@@ -443,7 +446,7 @@ var de = {
|
|
|
443
446
|
}
|
|
444
447
|
},
|
|
445
448
|
created() {
|
|
446
|
-
this.$_startIndex = 0, this.$_endIndex = 0, this.$_views = /* @__PURE__ */ new Map(), this.$_unusedViews = /* @__PURE__ */ new Map(), this.$_scrollDirty = !1, this.$_lastUpdateScrollPosition = 0, this.prerender && (this.$_prerender = !0, this.updateVisibleItems(!1)), this.gridItems && this.itemSize;
|
|
449
|
+
this.$_startIndex = 0, this.$_endIndex = 0, this.$_views = /* @__PURE__ */ new Map(), this.$_unusedViews = /* @__PURE__ */ new Map(), this.$_scrollDirty = !1, this.$_lastUpdateScrollPosition = 0, this.prerender && (this.$_prerender = !0, this.updateVisibleItems(!1)), this.gridItems && !this.itemSize && console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems");
|
|
447
450
|
},
|
|
448
451
|
mounted() {
|
|
449
452
|
this.applyPageMode(), this.$nextTick(() => {
|
|
@@ -620,6 +623,7 @@ var de = {
|
|
|
620
623
|
},
|
|
621
624
|
itemsLimitError() {
|
|
622
625
|
throw setTimeout(() => {
|
|
626
|
+
console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.", "Scroller:", this.$el), console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.");
|
|
623
627
|
}), new Error("Rendered items limit reached");
|
|
624
628
|
},
|
|
625
629
|
sortViews() {
|
|
@@ -785,7 +789,9 @@ const St = ["onClick"], zt = { style: { display: "inline-block" } }, _t = {
|
|
|
785
789
|
s.showFullPath ? m.value = r.pathName || "" : m.value = r.name || "";
|
|
786
790
|
return;
|
|
787
791
|
}
|
|
788
|
-
let o = _.value.treeRef.getNode(r)
|
|
792
|
+
let o = _.value.treeRef.getNode(r);
|
|
793
|
+
console.log("treeNodeClick回调:", r, o);
|
|
794
|
+
let T = [o.data[s.fieldNames.label] || ""];
|
|
789
795
|
if (s.showFullPath)
|
|
790
796
|
for (; o.parent && o.parent.data[s.fieldNames.label]; )
|
|
791
797
|
o = o.parent, T.unshift(o.data[s.fieldNames.label]);
|
|
Binary file
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/calendar/style.css';
|
|
2
2
|
import { withInstall as ee } from "@das-fed/upf-utils/with-install/index";
|
|
3
|
-
import { defineComponent as Q, ref as b, computed as g, watch as ae, nextTick as
|
|
4
|
-
import { t as A, currentLang as
|
|
3
|
+
import { defineComponent as Q, ref as b, computed as g, watch as ae, nextTick as x, openBlock as u, createElementBlock as f, normalizeClass as B, Fragment as j, renderList as P, createElementVNode as S, toDisplayString as L, renderSlot as D, createCommentVNode as M, normalizeStyle as te, onMounted as ne, onBeforeUnmount as re, createVNode as oe, createSlots as K, withCtx as V, normalizeProps as F, mergeProps as Z, guardReactiveProps as E, createBlock as se } from "vue";
|
|
4
|
+
import { t as A, currentLang as U, setI18nRule as le } from "@das-fed/upf-web/packages/i18n/index";
|
|
5
5
|
import N from "dayjs";
|
|
6
6
|
import { SizeWatcher as de } from "@das-fed/upf-utils/size-watcher";
|
|
7
7
|
import { setThemeRule as he } from "@das-fed/upf-web/packages/theme/index";
|
|
8
|
-
const ce = (
|
|
9
|
-
const l =
|
|
8
|
+
const ce = (s, i) => {
|
|
9
|
+
const l = s.endOf("month"), h = i.startOf("month"), n = l.isSame(h, "week") ? h.add(1, "week") : h;
|
|
10
10
|
return [
|
|
11
|
-
[
|
|
11
|
+
[s, l],
|
|
12
12
|
[n.startOf("week"), i]
|
|
13
13
|
];
|
|
14
|
-
}, ie = (
|
|
15
|
-
const l =
|
|
14
|
+
}, ie = (s, i) => {
|
|
15
|
+
const l = s.endOf("month"), h = s.add(1, "month").startOf("month"), o = l.isSame(
|
|
16
16
|
h,
|
|
17
17
|
"week"
|
|
18
|
-
) ? h.add(1, "week") : h, n =
|
|
18
|
+
) ? h.add(1, "week") : h, n = o.endOf("month"), p = i.startOf("month"), v = n.isSame(p, "week") ? p.add(1, "week") : p;
|
|
19
19
|
return [
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
20
|
+
[s, l],
|
|
21
|
+
[o.startOf("week"), n],
|
|
22
|
+
[v.startOf("week"), i]
|
|
23
23
|
];
|
|
24
|
-
},
|
|
25
|
-
const l =
|
|
26
|
-
return
|
|
27
|
-
}, _ = (
|
|
28
|
-
const l =
|
|
29
|
-
return _(i).map((h,
|
|
30
|
-
}, pe = (
|
|
31
|
-
const i =
|
|
24
|
+
}, q = (s, i) => {
|
|
25
|
+
const l = s.startOf("week"), h = i.endOf("week"), o = l.get("month"), n = h.get("month");
|
|
26
|
+
return o === n ? [[l, h]] : (o + 1) % 12 === n ? ce(l, h) : o + 2 === n || (o + 1) % 11 === n ? ie(l, h) : (console.warn("start time and end time interval must not exceed two months"), []);
|
|
27
|
+
}, _ = (s) => Array.from(Array.from({ length: s }).keys()), ue = (s, i) => {
|
|
28
|
+
const l = s.subtract(1, "month").endOf("month").date();
|
|
29
|
+
return _(i).map((h, o) => l - (i - o - 1));
|
|
30
|
+
}, pe = (s) => {
|
|
31
|
+
const i = s.daysInMonth();
|
|
32
32
|
return _(i).map((l, h) => h + 1);
|
|
33
|
-
}, me = (
|
|
33
|
+
}, me = (s) => _(s.length / 7).map((i) => {
|
|
34
34
|
const l = i * 7;
|
|
35
|
-
return
|
|
35
|
+
return s.slice(l, l + 7);
|
|
36
36
|
}), fe = { key: 0 }, ye = { class: "das-calendar-header-box" }, ke = { class: "das-calendar-header-week-line" }, ge = ["onClick"], we = {
|
|
37
37
|
name: "calendar-table"
|
|
38
38
|
}, G = /* @__PURE__ */ Q({
|
|
@@ -51,25 +51,25 @@ const ce = (o, i) => {
|
|
|
51
51
|
cellHeight: {}
|
|
52
52
|
},
|
|
53
53
|
emits: ["pick"],
|
|
54
|
-
setup(
|
|
55
|
-
const h = l,
|
|
54
|
+
setup(s, { expose: i, emit: l }) {
|
|
55
|
+
const h = l, o = N(), n = s, p = b("128px"), v = b(), Y = 60, $ = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], O = g(() => !!n.range && !!n.range.length), J = g(() => {
|
|
56
56
|
const e = n.firstDayOfWeek, t = n.showZhou ? "das-calendar-weeks-zhou-" : "das-calendar-weeks-";
|
|
57
57
|
return e === 0 ? $.map((r) => A(`${t}${r}`)) : $.slice(e).concat($.slice(0, e)).map((r) => A(`${t}${r}`));
|
|
58
|
-
}),
|
|
58
|
+
}), z = g(() => {
|
|
59
59
|
let e = [];
|
|
60
60
|
if (O.value) {
|
|
61
61
|
const [t, r] = n.range;
|
|
62
62
|
let c = [];
|
|
63
|
-
t.isSame(r, "month") ? c = _(r.date() - t.date() + 1).map((
|
|
64
|
-
text: t.date() +
|
|
63
|
+
t.isSame(r, "month") ? c = _(r.date() - t.date() + 1).map((C) => ({
|
|
64
|
+
text: t.date() + C,
|
|
65
65
|
type: "current"
|
|
66
|
-
})) : c = _(t.endOf("month").date() - t.date() + 1).map((
|
|
67
|
-
text: t.date() +
|
|
66
|
+
})) : c = _(t.endOf("month").date() - t.date() + 1).map((C) => ({
|
|
67
|
+
text: t.date() + C,
|
|
68
68
|
type: "current"
|
|
69
69
|
}));
|
|
70
70
|
let k = c.length % 7;
|
|
71
71
|
k = k === 0 ? 0 : 7 - k;
|
|
72
|
-
const w = _(k).map((
|
|
72
|
+
const w = _(k).map((C, T) => ({
|
|
73
73
|
text: T + 1,
|
|
74
74
|
type: "next"
|
|
75
75
|
}));
|
|
@@ -78,21 +78,21 @@ const ce = (o, i) => {
|
|
|
78
78
|
const t = n.date.startOf("month").day(), r = ue(
|
|
79
79
|
n.date,
|
|
80
80
|
(t - n.firstDayOfWeek + 7) % 7
|
|
81
|
-
).map((
|
|
82
|
-
text:
|
|
81
|
+
).map((C) => ({
|
|
82
|
+
text: C,
|
|
83
83
|
type: "prev"
|
|
84
|
-
})), c = pe(n.date).map((
|
|
85
|
-
text:
|
|
84
|
+
})), c = pe(n.date).map((C) => ({
|
|
85
|
+
text: C,
|
|
86
86
|
type: "current"
|
|
87
87
|
}));
|
|
88
88
|
e = [...r, ...c];
|
|
89
|
-
const k = 7 - (e.length % 7 || 7), w = _(k).map((
|
|
89
|
+
const k = 7 - (e.length % 7 || 7), w = _(k).map((C, T) => ({
|
|
90
90
|
text: T + 1,
|
|
91
91
|
type: "next"
|
|
92
92
|
}));
|
|
93
93
|
if (e = e.concat(w), n.calendartType == "simple" && e.length / 7 < 6) {
|
|
94
|
-
const
|
|
95
|
-
text:
|
|
94
|
+
const C = w.length ? w[w.length - 1].text : 0, T = _(7).map((We, X) => ({
|
|
95
|
+
text: C + X + 1,
|
|
96
96
|
type: "next"
|
|
97
97
|
}));
|
|
98
98
|
e = e.concat(T);
|
|
@@ -103,27 +103,27 @@ const ce = (o, i) => {
|
|
|
103
103
|
var r;
|
|
104
104
|
const e = (r = n.parent) == null ? void 0 : r.offsetHeight;
|
|
105
105
|
let t = Number(e) - Y - 1;
|
|
106
|
-
|
|
106
|
+
p.value = t / z.value.length - 1 + "px", console.log("trHeight1", p.value, t, z.value.length);
|
|
107
107
|
};
|
|
108
108
|
ae(
|
|
109
|
-
() =>
|
|
109
|
+
() => z.value,
|
|
110
110
|
(e) => {
|
|
111
111
|
if (n.cellHeight) {
|
|
112
|
-
|
|
112
|
+
p.value = `${n.cellHeight}px`;
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
e && e.length ?
|
|
115
|
+
e && e.length ? x(() => {
|
|
116
116
|
H();
|
|
117
|
-
}) :
|
|
117
|
+
}) : p.value = "128px", console.log("trHeight2", p.value);
|
|
118
118
|
},
|
|
119
119
|
{ immediate: !0 }
|
|
120
120
|
);
|
|
121
121
|
const W = () => {
|
|
122
|
-
if (n.cellHeight) {
|
|
123
|
-
|
|
122
|
+
if (console.log("getHeight", z.value, n.cellHeight), n.cellHeight) {
|
|
123
|
+
p.value = `${n.cellHeight}px`;
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
x(() => {
|
|
127
127
|
H();
|
|
128
128
|
});
|
|
129
129
|
}, y = (e, t) => {
|
|
@@ -137,12 +137,12 @@ const ce = (o, i) => {
|
|
|
137
137
|
}
|
|
138
138
|
}, R = ({ text: e, type: t }) => {
|
|
139
139
|
const r = [t], c = y(e, t);
|
|
140
|
-
return c.isSame(n.selectedDay, "day") && r.push("is-selected"), c.isSame(
|
|
140
|
+
return c.isSame(n.selectedDay, "day") && r.push("is-selected"), c.isSame(o, "day") && r.push("is-today"), r;
|
|
141
141
|
}, I = ({ text: e, type: t }) => {
|
|
142
142
|
const r = y(e, t);
|
|
143
143
|
h("pick", r);
|
|
144
144
|
}, a = (e) => {
|
|
145
|
-
const t =
|
|
145
|
+
const t = z.value[0];
|
|
146
146
|
if (t) {
|
|
147
147
|
const r = t[e];
|
|
148
148
|
if (r) {
|
|
@@ -151,8 +151,8 @@ const ce = (o, i) => {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
return "";
|
|
154
|
-
},
|
|
155
|
-
const t =
|
|
154
|
+
}, m = (e) => {
|
|
155
|
+
const t = z.value[0];
|
|
156
156
|
if (t) {
|
|
157
157
|
const r = t[e];
|
|
158
158
|
if (r) {
|
|
@@ -182,16 +182,16 @@ const ce = (o, i) => {
|
|
|
182
182
|
};
|
|
183
183
|
return i({
|
|
184
184
|
getHeight: W
|
|
185
|
-
}), (e, t) =>
|
|
185
|
+
}), (e, t) => z.value.length ? (u(), f("table", {
|
|
186
186
|
key: 0,
|
|
187
187
|
class: B(["das-calendar-table", { "is-range": O.value, "is-week": e.calendartType == "week", simple: e.calendartType == "simple" }]),
|
|
188
188
|
cellspacing: "0",
|
|
189
189
|
cellpadding: "0",
|
|
190
190
|
ref_key: "tableRef",
|
|
191
|
-
ref:
|
|
191
|
+
ref: v
|
|
192
192
|
}, [
|
|
193
|
-
e.hideHeader ? M("", !0) : (u(),
|
|
194
|
-
(u(!0),
|
|
193
|
+
e.hideHeader ? M("", !0) : (u(), f("thead", fe, [
|
|
194
|
+
(u(!0), f(j, null, P(J.value, (r, c) => (u(), f("th", {
|
|
195
195
|
class: "das-calendar-table-header",
|
|
196
196
|
key: r
|
|
197
197
|
}, [
|
|
@@ -200,12 +200,12 @@ const ce = (o, i) => {
|
|
|
200
200
|
S("div", {
|
|
201
201
|
class: B(["das-calendar-header-week", { highlight: e.highlightWeek }])
|
|
202
202
|
}, L(r), 3),
|
|
203
|
-
e.calendartType == "week" ?
|
|
203
|
+
e.calendartType == "week" ? D(e.$slots, "week-type", {
|
|
204
204
|
key: 0,
|
|
205
|
-
data:
|
|
205
|
+
data: m(c)
|
|
206
206
|
}) : M("", !0)
|
|
207
207
|
]),
|
|
208
|
-
e.calendartType == "week" ? (u(),
|
|
208
|
+
e.calendartType == "week" ? (u(), f("div", {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: B(["das-calendar-header-day", { highlight: e.highlightDay }])
|
|
211
211
|
}, L(a(c)), 3)) : M("", !0)
|
|
@@ -213,23 +213,23 @@ const ce = (o, i) => {
|
|
|
213
213
|
]))), 128))
|
|
214
214
|
])),
|
|
215
215
|
S("tbody", null, [
|
|
216
|
-
(u(!0),
|
|
216
|
+
(u(!0), f(j, null, P(z.value, (r, c) => (u(), f("tr", {
|
|
217
217
|
key: c,
|
|
218
218
|
class: B({
|
|
219
219
|
"das-calendar-table-row": !0,
|
|
220
220
|
"hide-border": c === 0 && e.hideHeader
|
|
221
221
|
})
|
|
222
222
|
}, [
|
|
223
|
-
(u(!0),
|
|
223
|
+
(u(!0), f(j, null, P(r, (k, w) => (u(), f("td", {
|
|
224
224
|
key: w,
|
|
225
225
|
class: B(R(k)),
|
|
226
|
-
onClick: (
|
|
226
|
+
onClick: (C) => I(k)
|
|
227
227
|
}, [
|
|
228
228
|
S("div", {
|
|
229
229
|
class: "das-calendar-day",
|
|
230
|
-
style: te({ height:
|
|
230
|
+
style: te({ height: p.value })
|
|
231
231
|
}, [
|
|
232
|
-
|
|
232
|
+
D(e.$slots, "date-cell", {
|
|
233
233
|
data: d(k)
|
|
234
234
|
})
|
|
235
235
|
], 4)
|
|
@@ -247,10 +247,10 @@ const ce = (o, i) => {
|
|
|
247
247
|
}, Me = {
|
|
248
248
|
key: 2,
|
|
249
249
|
class: "das-calendar-cell-cont"
|
|
250
|
-
},
|
|
250
|
+
}, ve = {
|
|
251
251
|
key: 1,
|
|
252
252
|
class: "das-calendar-body 2"
|
|
253
|
-
},
|
|
253
|
+
}, De = {
|
|
254
254
|
key: 1,
|
|
255
255
|
class: "das-calendar-cell-date"
|
|
256
256
|
}, Oe = {
|
|
@@ -273,60 +273,60 @@ const ce = (o, i) => {
|
|
|
273
273
|
cellHeight: { default: 0 }
|
|
274
274
|
},
|
|
275
275
|
emits: ["update:model-value", "itemClick"],
|
|
276
|
-
setup(
|
|
277
|
-
const h = g(() =>
|
|
276
|
+
setup(s, { expose: i, emit: l }) {
|
|
277
|
+
const h = g(() => U.value == "zh-CN" ? 1 : (U.value == "en", 0)), o = s, n = l, p = b(), v = b(), Y = b(), $ = g(() => o.firstDayOfWeek || h.value), O = b(), J = N(), z = g({
|
|
278
278
|
get() {
|
|
279
|
-
return
|
|
279
|
+
return o.modelValue ? (O.value = y.value, y.value) : O.value;
|
|
280
280
|
},
|
|
281
281
|
set(a) {
|
|
282
282
|
if (!a) return;
|
|
283
283
|
O.value = a;
|
|
284
|
-
const
|
|
285
|
-
|
|
284
|
+
const m = a.toDate();
|
|
285
|
+
o.isSwitchMonth && n("update:model-value", m);
|
|
286
286
|
}
|
|
287
287
|
}), H = g(() => {
|
|
288
|
-
if (
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
return e.push(N(
|
|
288
|
+
if (o.type == "week") {
|
|
289
|
+
if (o.range) return o.range;
|
|
290
|
+
const m = (N(o.modelValue).day() - $.value + 7) % 7, d = 7 - (m + 1), e = [];
|
|
291
|
+
return e.push(N(o.modelValue).subtract(m, "day").toDate()), e.push(N(o.modelValue).add(d, "day").toDate()), e;
|
|
292
292
|
} else
|
|
293
|
-
return
|
|
293
|
+
return o.range ? o.range : void 0;
|
|
294
294
|
}), W = g(() => {
|
|
295
295
|
if (!H.value) return [];
|
|
296
|
-
const a = H.value.map((e) => N(e)), [
|
|
297
|
-
return
|
|
298
|
-
}), y = g(() =>
|
|
296
|
+
const a = H.value.map((e) => N(e)), [m, d] = a;
|
|
297
|
+
return o.type == "week" ? [[m, d]] : m.isAfter(d) ? (console.warn("end time should be greater than start time"), []) : m.isSame(d, "month") ? q(m, d) : m.add(1, "month").month() !== d.month() ? (console.warn("start time and end time interval must not exceed two months"), []) : q(m, d);
|
|
298
|
+
}), y = g(() => o.modelValue ? N(o.modelValue) : z.value || (W.value.length ? W.value[0][0] : J));
|
|
299
299
|
g(() => y.value.subtract(1, "month").date(1)), g(() => y.value.add(1, "month").date(1)), g(() => y.value.subtract(1, "year").date(1)), g(() => y.value.add(1, "year").date(1)), g(() => {
|
|
300
300
|
const a = `das-calendar-month${y.value.format("M")}`;
|
|
301
301
|
return `${y.value.year()} ${A("das-calendar-year")} ${A(a)}`;
|
|
302
302
|
}), ne(() => {
|
|
303
303
|
Y.value = de(() => {
|
|
304
|
-
var a,
|
|
305
|
-
Array.isArray(
|
|
306
|
-
},
|
|
304
|
+
var a, m;
|
|
305
|
+
Array.isArray(v.value) ? (a = v.value[0]) == null || a.getHeight() : (m = v.value) == null || m.getHeight();
|
|
306
|
+
}, p.value);
|
|
307
307
|
}), re(() => {
|
|
308
308
|
Y.value.disconnect();
|
|
309
309
|
});
|
|
310
310
|
const R = (a) => {
|
|
311
|
-
|
|
311
|
+
o.isSwitchSelection && (z.value = a), n("itemClick", a.toDate());
|
|
312
312
|
};
|
|
313
313
|
return i({
|
|
314
|
-
$calendar:
|
|
314
|
+
$calendar: p,
|
|
315
315
|
setActive: (a) => {
|
|
316
|
-
|
|
316
|
+
z.value = N(a), n("itemClick", a);
|
|
317
317
|
}
|
|
318
|
-
}), (a,
|
|
318
|
+
}), (a, m) => (u(), f("div", {
|
|
319
319
|
ref_key: "$calendar",
|
|
320
|
-
ref:
|
|
320
|
+
ref: p,
|
|
321
321
|
class: "das-ui-calendar"
|
|
322
322
|
}, [
|
|
323
|
-
W.value.length === 0 ? (u(),
|
|
324
|
-
|
|
323
|
+
W.value.length === 0 ? (u(), f("div", ze, [
|
|
324
|
+
oe(G, {
|
|
325
325
|
ref_key: "$calendarTable",
|
|
326
|
-
ref:
|
|
326
|
+
ref: v,
|
|
327
327
|
date: y.value,
|
|
328
328
|
firstDayOfWeek: $.value,
|
|
329
|
-
parent:
|
|
329
|
+
parent: p.value,
|
|
330
330
|
calendartType: a.type,
|
|
331
331
|
highlightWeek: a.highlightWeek,
|
|
332
332
|
highlightDay: a.highlightDay,
|
|
@@ -334,15 +334,15 @@ const ce = (o, i) => {
|
|
|
334
334
|
cellHeight: a.cellHeight,
|
|
335
335
|
"selected-day": O.value,
|
|
336
336
|
onPick: R
|
|
337
|
-
},
|
|
337
|
+
}, K({
|
|
338
338
|
"date-cell": V((d) => [
|
|
339
|
-
a.$slots.custom ?
|
|
340
|
-
a.type != "week" && !a.$slots.custom ? (u(),
|
|
339
|
+
a.$slots.custom ? D(a.$slots, "custom", F(Z({ key: 0 }, d))) : M("", !0),
|
|
340
|
+
a.type != "week" && !a.$slots.custom ? (u(), f("p", Ce, [
|
|
341
341
|
S("span", null, L(Number(d.data.day.split("-").slice(2)).toString()), 1),
|
|
342
|
-
|
|
342
|
+
D(a.$slots, "date-type", F(E(d)))
|
|
343
343
|
])) : M("", !0),
|
|
344
|
-
a.$slots.custom ? M("", !0) : (u(),
|
|
345
|
-
|
|
344
|
+
a.$slots.custom ? M("", !0) : (u(), f("div", Me, [
|
|
345
|
+
D(a.$slots, "date-cell", F(E(d)))
|
|
346
346
|
]))
|
|
347
347
|
]),
|
|
348
348
|
_: 2
|
|
@@ -350,16 +350,16 @@ const ce = (o, i) => {
|
|
|
350
350
|
a.$slots["week-type"] && a.type == "week" ? {
|
|
351
351
|
name: "week-type",
|
|
352
352
|
fn: V((d) => [
|
|
353
|
-
|
|
353
|
+
D(a.$slots, "week-type", F(E(d)))
|
|
354
354
|
]),
|
|
355
355
|
key: "0"
|
|
356
356
|
} : void 0
|
|
357
357
|
]), 1032, ["date", "firstDayOfWeek", "parent", "calendartType", "highlightWeek", "highlightDay", "showZhou", "cellHeight", "selected-day"])
|
|
358
|
-
])) : (u(),
|
|
359
|
-
(u(!0),
|
|
358
|
+
])) : (u(), f("div", ve, [
|
|
359
|
+
(u(!0), f(j, null, P(W.value, (d, e) => (u(), se(G, {
|
|
360
360
|
ref_for: !0,
|
|
361
361
|
ref_key: "$calendarTable",
|
|
362
|
-
ref:
|
|
362
|
+
ref: v,
|
|
363
363
|
key: e,
|
|
364
364
|
firstDayOfWeek: $.value,
|
|
365
365
|
date: d[0],
|
|
@@ -370,20 +370,20 @@ const ce = (o, i) => {
|
|
|
370
370
|
cellHeight: a.cellHeight,
|
|
371
371
|
"selected-day": O.value,
|
|
372
372
|
range: d,
|
|
373
|
-
parent:
|
|
373
|
+
parent: p.value,
|
|
374
374
|
"hide-header": e !== 0,
|
|
375
375
|
onPick: R
|
|
376
|
-
},
|
|
376
|
+
}, K({
|
|
377
377
|
"date-cell": V((t) => [
|
|
378
|
-
a.$slots.custom ?
|
|
378
|
+
a.$slots.custom ? D(a.$slots, "custom", Z({
|
|
379
379
|
key: 0,
|
|
380
380
|
ref_for: !0
|
|
381
381
|
}, t)) : M("", !0),
|
|
382
|
-
a.type != "week" && !a.$slots.custom ? (u(),
|
|
382
|
+
a.type != "week" && !a.$slots.custom ? (u(), f("p", De, [
|
|
383
383
|
S("span", null, L(Number(t.data.day.split("-").slice(2)).toString()), 1)
|
|
384
384
|
])) : M("", !0),
|
|
385
|
-
a.$slots.custom ? M("", !0) : (u(),
|
|
386
|
-
|
|
385
|
+
a.$slots.custom ? M("", !0) : (u(), f("div", Oe, [
|
|
386
|
+
D(a.$slots, "date-cell", Z({ ref_for: !0 }, t))
|
|
387
387
|
]))
|
|
388
388
|
]),
|
|
389
389
|
_: 2
|
|
@@ -391,7 +391,7 @@ const ce = (o, i) => {
|
|
|
391
391
|
a.$slots["week-type"] && a.type == "week" ? {
|
|
392
392
|
name: "week-type",
|
|
393
393
|
fn: V((t) => [
|
|
394
|
-
|
|
394
|
+
D(a.$slots, "week-type", Z({ ref_for: !0 }, t))
|
|
395
395
|
]),
|
|
396
396
|
key: "0"
|
|
397
397
|
} : void 0
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/cascader/style.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as le, useCssVars as re, useAttrs as oe, ref as t, computed as d, watch as S, watchEffect as te, openBlock as v, createElementBlock as b, normalizeClass as se, normalizeStyle as W, createVNode as _, unref as s, withCtx as y, withDirectives as A, mergeProps as ue, isRef as de, renderSlot as N, normalizeProps as ce, guardReactiveProps as ie, createTextVNode as $, toDisplayString as D, Fragment as ne, createElementVNode as pe, createCommentVNode as M, createBlock as fe, nextTick as O } from "vue";
|
|
3
3
|
import { withInstall as ve } from "@das-fed/upf-utils/with-install/index";
|
|
4
4
|
import { ElCascader as me } from "element-plus";
|
|
5
5
|
import "element-plus/es/components/cascader/style/css";
|
|
@@ -16,7 +16,7 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
16
16
|
class: "das-cascader-error-label-content"
|
|
17
17
|
}, Be = {
|
|
18
18
|
name: "DasCascader"
|
|
19
|
-
}, Fe = /* @__PURE__ */
|
|
19
|
+
}, Fe = /* @__PURE__ */ le({
|
|
20
20
|
...Be,
|
|
21
21
|
props: {
|
|
22
22
|
modelValue: { default: void 0 },
|
|
@@ -40,12 +40,12 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:model-value", "change"],
|
|
42
42
|
setup(g, { expose: C, emit: x }) {
|
|
43
|
-
|
|
43
|
+
re((e) => ({
|
|
44
44
|
"0384ed15": Q.value,
|
|
45
45
|
"5349bbb8": X.value,
|
|
46
46
|
"085a5911": B.value
|
|
47
47
|
}));
|
|
48
|
-
const a = g,
|
|
48
|
+
const a = g, r = we(a, "modelValue"), E = x, H = oe(), c = t(null), V = t(null), I = t(null), T = t(), k = t(!1), z = d(() => a.isView ? a.noSetDefaultVal ? " " : "-" : a.placeholder ?? " "), i = t(0), n = t(0), u = t(!1), U = d(() => (Array.isArray(r.value) ? r.value.length : r.value) ? T.value : z.value), w = d(() => {
|
|
49
49
|
var e;
|
|
50
50
|
return V.value ? (e = V.value) == null ? void 0 : e.querySelector(".el-input__inner") : null;
|
|
51
51
|
}), L = () => {
|
|
@@ -53,11 +53,11 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
53
53
|
return ze(z.value, e);
|
|
54
54
|
}, P = () => {
|
|
55
55
|
O(() => {
|
|
56
|
-
var e,
|
|
56
|
+
var e, l;
|
|
57
57
|
if (w.value) {
|
|
58
58
|
i.value = ((e = w.value) == null ? void 0 : e.offsetWidth) ?? 0;
|
|
59
|
-
const o = Array.isArray(
|
|
60
|
-
n.value = o ? (
|
|
59
|
+
const o = Array.isArray(r.value) ? r.value.length : r.value;
|
|
60
|
+
n.value = o ? (l = w.value) == null ? void 0 : l.scrollWidth : L(), (i.value === n.value || n.value - i.value < 1) && (u.value = !1);
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
};
|
|
@@ -65,15 +65,15 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
65
65
|
() => w.value,
|
|
66
66
|
(e) => {
|
|
67
67
|
setTimeout(() => {
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
i.value = (
|
|
71
|
-
const o = Array.isArray(
|
|
72
|
-
n.value = o ?
|
|
68
|
+
const l = e;
|
|
69
|
+
if (l) {
|
|
70
|
+
i.value = (l == null ? void 0 : l.offsetWidth) ?? 0;
|
|
71
|
+
const o = Array.isArray(r.value) ? r.value.length : r.value;
|
|
72
|
+
n.value = o ? l == null ? void 0 : l.scrollWidth : L();
|
|
73
73
|
}
|
|
74
74
|
}, 200);
|
|
75
75
|
}
|
|
76
|
-
), S(() => [z.value,
|
|
76
|
+
), S(() => [z.value, r.value], P);
|
|
77
77
|
const p = t();
|
|
78
78
|
S(
|
|
79
79
|
() => {
|
|
@@ -82,9 +82,9 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
82
82
|
},
|
|
83
83
|
(e) => {
|
|
84
84
|
e && (e.addEventListener("mouseenter", function() {
|
|
85
|
-
u.value = !0, p.value && clearTimeout(p.value);
|
|
85
|
+
console.log("进入tooltip"), u.value = !0, p.value && clearTimeout(p.value);
|
|
86
86
|
}), e.addEventListener("mouseleave", function() {
|
|
87
|
-
p.value = setTimeout(() => {
|
|
87
|
+
console.log("离开toolTip"), p.value = setTimeout(() => {
|
|
88
88
|
u.value = !1;
|
|
89
89
|
}, 200);
|
|
90
90
|
}));
|
|
@@ -100,7 +100,7 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
100
100
|
p.value = setTimeout(() => {
|
|
101
101
|
u.value = !1;
|
|
102
102
|
}, 200), k.value = !1;
|
|
103
|
-
}, K = (e,
|
|
103
|
+
}, K = (e, l) => {
|
|
104
104
|
e ? G() : J();
|
|
105
105
|
}, Q = d(() => a.width ? a.width : "230px"), m = d(() => a.formSize), X = d(() => a.height ? a.height : m.value ? m.value && {
|
|
106
106
|
small: "24px",
|
|
@@ -115,26 +115,26 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
115
115
|
}[m.value]
|
|
116
116
|
})), B = t("-10px");
|
|
117
117
|
te(() => {
|
|
118
|
-
|
|
118
|
+
r.value ? setTimeout(() => {
|
|
119
119
|
Y();
|
|
120
120
|
}, 1e3) : T.value = "";
|
|
121
121
|
});
|
|
122
122
|
const Y = () => {
|
|
123
|
-
var
|
|
124
|
-
let e = (
|
|
123
|
+
var l;
|
|
124
|
+
let e = (l = c == null ? void 0 : c.value) == null ? void 0 : l.getCheckedNodes();
|
|
125
125
|
e && e[0] && e[0].text ? T.value = e[0].text : T.value = "";
|
|
126
|
-
}, ee = (e,
|
|
126
|
+
}, ee = (e, l) => {
|
|
127
127
|
E("update:model-value", e), E("change", e);
|
|
128
128
|
}, ae = (e) => {
|
|
129
129
|
O(() => {
|
|
130
130
|
var o, f;
|
|
131
|
-
const
|
|
132
|
-
|
|
131
|
+
const l = (f = (o = c.value) == null ? void 0 : o.popperPaneRef) == null ? void 0 : f.attributes["data-popper-placement"].value;
|
|
132
|
+
l && l.indexOf("top") > -1 ? B.value = "10px" : B.value = "-10px";
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
return C({
|
|
136
136
|
$cascader: c
|
|
137
|
-
}), (e,
|
|
137
|
+
}), (e, l) => (v(), b("div", {
|
|
138
138
|
class: se(["das-ui-cascader", [
|
|
139
139
|
e.bordered ? "bordered" : "underline",
|
|
140
140
|
a.isView ? "readonly" : "",
|
|
@@ -162,8 +162,8 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
162
162
|
_(s(me), ue({
|
|
163
163
|
ref_key: "$cascader",
|
|
164
164
|
ref: c,
|
|
165
|
-
modelValue: s(
|
|
166
|
-
"onUpdate:modelValue":
|
|
165
|
+
modelValue: s(r),
|
|
166
|
+
"onUpdate:modelValue": l[0] || (l[0] = (f) => de(r) ? r.value = f : null)
|
|
167
167
|
}, s(H), {
|
|
168
168
|
props: a.props,
|
|
169
169
|
size: a.size === "table" || a.size === "medium" ? "default" : a.size,
|
|
@@ -231,8 +231,8 @@ const Ce = { style: { maxheight: "200px" } }, ke = {
|
|
|
231
231
|
}
|
|
232
232
|
}), Se = (g, C) => {
|
|
233
233
|
const x = g.__vccOpts || g;
|
|
234
|
-
for (const [a,
|
|
235
|
-
x[a] =
|
|
234
|
+
for (const [a, r] of C)
|
|
235
|
+
x[a] = r;
|
|
236
236
|
return x;
|
|
237
237
|
}, _e = /* @__PURE__ */ Se(Fe, [["__scopeId", "data-v-cb3f8a22"]]), De = { 请选择: { "zh-CN": "请选择", en: "Please select", "zh-MO": "請選擇", _appCode: "framework" } }, Me = {
|
|
238
238
|
"--das-ui-cascader-color-primary": "#5582F3",
|
|
Binary file
|