dld-vue-ui 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,617 +1,563 @@
1
- import { h as me, openBlock as o, createElementBlock as g, normalizeStyle as x, renderSlot as w, defineComponent as U, createBlock as f, unref as r, withCtx as m, createElementVNode as y, ref as B, onMounted as Y, resolveComponent as z, createVNode as b, createTextVNode as F, withDirectives as fe, vShow as ve, toDisplayString as T, Fragment as N, renderList as H, useSlots as J, createCommentVNode as p, reactive as _e, watch as G, normalizeClass as C, createSlots as ze, withKeys as j, resolveDynamicComponent as ge } from "vue";
2
- const ye = {
3
- name: "splitpanes",
4
- emits: ["ready", "resize", "resized", "pane-click", "pane-maximize", "pane-add", "pane-remove", "splitter-click"],
1
+ import { useSlots as be, ref as T, computed as X, watch as te, onBeforeUnmount as Pe, onMounted as ce, provide as le, openBlock as r, createBlock as v, resolveDynamicComponent as Ue, inject as oe, getCurrentInstance as Re, createElementBlock as P, unref as f, normalizeStyle as D, renderSlot as H, nextTick as we, h as Fe, defineComponent as F, withCtx as z, createElementVNode as B, resolveComponent as k, createVNode as R, createTextVNode as G, withDirectives as Ie, vShow as He, toDisplayString as re, Fragment as Q, renderList as ie, createCommentVNode as b, reactive as De, normalizeClass as Y, createSlots as Be, withKeys as ke, mergeModels as Se, useModel as Ne } from "vue";
2
+ const Te = {
3
+ __name: "splitpanes",
5
4
  props: {
6
5
  horizontal: { type: Boolean },
7
6
  pushOtherPanes: { type: Boolean, default: !0 },
8
7
  dblClickSplitter: { type: Boolean, default: !0 },
9
8
  rtl: { type: Boolean, default: !1 },
9
+ // Right to left direction.
10
10
  firstSplitter: { type: Boolean }
11
11
  },
12
- provide() {
13
- return {
14
- requestUpdate: this.requestUpdate,
15
- onPaneAdd: this.onPaneAdd,
16
- onPaneRemove: this.onPaneRemove,
17
- onPaneClick: this.onPaneClick
18
- };
19
- },
20
- data: () => ({
21
- container: null,
22
- ready: !1,
23
- panes: [],
24
- touch: {
12
+ emits: [
13
+ "ready",
14
+ "resize",
15
+ "resized",
16
+ "pane-click",
17
+ "pane-maximize",
18
+ "pane-add",
19
+ "pane-remove",
20
+ "splitter-click"
21
+ ],
22
+ setup(d, { emit: m }) {
23
+ const c = m, s = d, S = be(), a = T([]), C = X(() => a.value.reduce((t, o) => (t[~~o.id] = o) && t, {})), E = X(() => a.value.length), g = T(null), M = T(!1), U = T({
25
24
  mouseDown: !1,
26
25
  dragging: !1,
27
- activeSplitter: null
28
- },
29
- splitterTaps: {
26
+ activeSplitter: null,
27
+ cursorOffset: 0
28
+ // Cursor offset within the splitter.
29
+ }), L = T({
30
+ // Used to detect double click on touch devices.
30
31
  splitter: null,
31
32
  timeoutId: null
32
- }
33
- }),
34
- computed: {
35
- panesCount() {
36
- return this.panes.length;
37
- },
38
- indexedPanes() {
39
- return this.panes.reduce((e, a) => (e[a.id] = a) && e, {});
40
- }
41
- },
42
- methods: {
43
- updatePaneComponents() {
44
- this.panes.forEach((e) => {
45
- e.update && e.update({
46
- [this.horizontal ? "height" : "width"]: `${this.indexedPanes[e.id].size}%`
47
- });
48
- });
49
- },
50
- bindEvents() {
51
- document.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.addEventListener("touchend", this.onMouseUp));
52
- },
53
- unbindEvents() {
54
- document.removeEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.removeEventListener("touchend", this.onMouseUp));
55
- },
56
- onMouseDown(e, a) {
57
- this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = a;
58
- },
59
- onMouseMove(e) {
60
- this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((a) => ({ min: a.min, max: a.max, size: a.size }))));
61
- },
62
- onMouseUp() {
63
- this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = !1, setTimeout(() => {
64
- this.touch.dragging = !1, this.unbindEvents();
33
+ }), $ = X(() => ({
34
+ [`splitpanes splitpanes--${s.horizontal ? "horizontal" : "vertical"}`]: !0,
35
+ "splitpanes--dragging": U.value.dragging
36
+ })), W = () => {
37
+ document.addEventListener("mousemove", x, { passive: !1 }), document.addEventListener("mouseup", A), "ontouchstart" in window && (document.addEventListener("touchmove", x, { passive: !1 }), document.addEventListener("touchend", A));
38
+ }, N = () => {
39
+ document.removeEventListener("mousemove", x, { passive: !1 }), document.removeEventListener("mouseup", A), "ontouchstart" in window && (document.removeEventListener("touchmove", x, { passive: !1 }), document.removeEventListener("touchend", A));
40
+ }, I = (t, o) => {
41
+ const u = t.target.closest(".splitpanes__splitter");
42
+ if (u) {
43
+ const { left: n, top: p } = u.getBoundingClientRect(), { clientX: _, clientY: V } = "ontouchstart" in window && t.touches ? t.touches[0] : t;
44
+ U.value.cursorOffset = s.horizontal ? V - p : _ - n;
45
+ }
46
+ W(), U.value.mouseDown = !0, U.value.activeSplitter = o;
47
+ }, x = (t) => {
48
+ U.value.mouseDown && (t.preventDefault(), U.value.dragging = !0, requestAnimationFrame(() => {
49
+ l(de(t)), c("resize", a.value.map((o) => ({ min: o.min, max: o.max, size: o.size })));
50
+ }));
51
+ }, A = () => {
52
+ U.value.dragging && c("resized", a.value.map((t) => ({ min: t.min, max: t.max, size: t.size }))), U.value.mouseDown = !1, setTimeout(() => {
53
+ U.value.dragging = !1, N();
65
54
  }, 100);
66
- },
67
- onSplitterClick(e, a) {
68
- "ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === a ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, a), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = a, this.splitterTaps.timeoutId = setTimeout(() => {
69
- this.splitterTaps.splitter = null;
70
- }, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[a]);
71
- },
72
- onSplitterDblClick(e, a) {
73
- let l = 0;
74
- this.panes = this.panes.map((i, n) => (i.size = n === a ? i.max : i.min, n !== a && (l += i.min), i)), this.panes[a].size -= l, this.$emit("pane-maximize", this.panes[a]), this.$emit("resized", this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size })));
75
- },
76
- onPaneClick(e, a) {
77
- this.$emit("pane-click", this.indexedPanes[a]);
78
- },
79
- getCurrentMouseDrag(e) {
80
- const a = this.container.getBoundingClientRect(), { clientX: l, clientY: i } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
55
+ }, Z = (t, o) => {
56
+ "ontouchstart" in window && (t.preventDefault(), s.dblClickSplitter && (L.value.splitter === o ? (clearTimeout(L.value.timeoutId), L.value.timeoutId = null, j(t, o), L.value.splitter = null) : (L.value.splitter = o, L.value.timeoutId = setTimeout(() => L.value.splitter = null, 500)))), U.value.dragging || c("splitter-click", a.value[o]);
57
+ }, j = (t, o) => {
58
+ let u = 0;
59
+ a.value = a.value.map((n, p) => (n.size = p === o ? n.max : n.min, p !== o && (u += n.min), n)), a.value[o].size -= u, c("pane-maximize", a.value[o]), c("resized", a.value.map((n) => ({ min: n.min, max: n.max, size: n.size })));
60
+ }, ae = (t, o) => {
61
+ c("pane-click", C.value[o]);
62
+ }, de = (t) => {
63
+ const o = g.value.getBoundingClientRect(), { clientX: u, clientY: n } = "ontouchstart" in window && t.touches ? t.touches[0] : t;
81
64
  return {
82
- x: l - a.left,
83
- y: i - a.top
65
+ x: u - (s.horizontal ? 0 : U.value.cursorOffset) - o.left,
66
+ y: n - (s.horizontal ? U.value.cursorOffset : 0) - o.top
84
67
  };
85
- },
86
- getCurrentDragPercentage(e) {
87
- e = e[this.horizontal ? "y" : "x"];
88
- const a = this.container[this.horizontal ? "clientHeight" : "clientWidth"];
89
- return this.rtl && !this.horizontal && (e = a - e), e * 100 / a;
90
- },
91
- calculatePanesSize(e) {
92
- const a = this.touch.activeSplitter;
93
- let l = {
94
- prevPanesSize: this.sumPrevPanesSize(a),
95
- nextPanesSize: this.sumNextPanesSize(a),
68
+ }, i = (t) => {
69
+ t = t[s.horizontal ? "y" : "x"];
70
+ const o = g.value[s.horizontal ? "clientHeight" : "clientWidth"];
71
+ return s.rtl && !s.horizontal && (t = o - t), t * 100 / o;
72
+ }, l = (t) => {
73
+ const o = U.value.activeSplitter;
74
+ let u = {
75
+ prevPanesSize: y(o),
76
+ nextPanesSize: K(o),
96
77
  prevReachedMinPanes: 0,
97
78
  nextReachedMinPanes: 0
98
79
  };
99
- const i = 0 + (this.pushOtherPanes ? 0 : l.prevPanesSize), n = 100 - (this.pushOtherPanes ? 0 : l.nextPanesSize), s = Math.max(Math.min(this.getCurrentDragPercentage(e), n), i);
100
- let u = [a, a + 1], v = this.panes[u[0]] || null, _ = this.panes[u[1]] || null;
101
- const P = v.max < 100 && s >= v.max + l.prevPanesSize, q = _.max < 100 && s <= 100 - (_.max + this.sumNextPanesSize(a + 1));
102
- if (P || q) {
103
- P ? (v.size = v.max, _.size = Math.max(100 - v.max - l.prevPanesSize - l.nextPanesSize, 0)) : (v.size = Math.max(100 - _.max - l.prevPanesSize - this.sumNextPanesSize(a + 1), 0), _.size = _.max);
80
+ const n = 0 + (s.pushOtherPanes ? 0 : u.prevPanesSize), p = 100 - (s.pushOtherPanes ? 0 : u.nextPanesSize), _ = Math.max(Math.min(i(t), p), n);
81
+ let V = [o, o + 1], O = a.value[V[0]] || null, q = a.value[V[1]] || null;
82
+ const xe = O.max < 100 && _ >= O.max + u.prevPanesSize, We = q.max < 100 && _ <= 100 - (q.max + K(o + 1));
83
+ if (xe || We) {
84
+ xe ? (O.size = O.max, q.size = Math.max(100 - O.max - u.prevPanesSize - u.nextPanesSize, 0)) : (O.size = Math.max(100 - q.max - u.prevPanesSize - K(o + 1), 0), q.size = q.max);
104
85
  return;
105
86
  }
106
- if (this.pushOtherPanes) {
107
- const S = this.doPushOtherPanes(l, s);
108
- if (!S)
87
+ if (s.pushOtherPanes) {
88
+ const Ve = h(u, _);
89
+ if (!Ve)
109
90
  return;
110
- ({ sums: l, panesToResize: u } = S), v = this.panes[u[0]] || null, _ = this.panes[u[1]] || null;
91
+ ({ sums: u, panesToResize: V } = Ve), O = a.value[V[0]] || null, q = a.value[V[1]] || null;
111
92
  }
112
- v !== null && (v.size = Math.min(Math.max(s - l.prevPanesSize - l.prevReachedMinPanes, v.min), v.max)), _ !== null && (_.size = Math.min(Math.max(100 - s - l.nextPanesSize - l.nextReachedMinPanes, _.min), _.max));
113
- },
114
- doPushOtherPanes(e, a) {
115
- const l = this.touch.activeSplitter, i = [l, l + 1];
116
- return a < e.prevPanesSize + this.panes[i[0]].min && (i[0] = this.findPrevExpandedPane(l).index, e.prevReachedMinPanes = 0, i[0] < l && this.panes.forEach((n, s) => {
117
- s > i[0] && s <= l && (n.size = n.min, e.prevReachedMinPanes += n.min);
118
- }), e.prevPanesSize = this.sumPrevPanesSize(i[0]), i[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((n, s) => {
119
- s > 0 && s <= l && (n.size = n.min, e.prevReachedMinPanes += n.min);
120
- }), this.panes[i[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : a > 100 - e.nextPanesSize - this.panes[i[1]].min && (i[1] = this.findNextExpandedPane(l).index, e.nextReachedMinPanes = 0, i[1] > l + 1 && this.panes.forEach((n, s) => {
121
- s > l && s < i[1] && (n.size = n.min, e.nextReachedMinPanes += n.min);
122
- }), e.nextPanesSize = this.sumNextPanesSize(i[1] - 1), i[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((n, s) => {
123
- s < this.panesCount - 1 && s >= l + 1 && (n.size = n.min, e.nextReachedMinPanes += n.min);
124
- }), this.panes[i[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: i };
125
- },
126
- sumPrevPanesSize(e) {
127
- return this.panes.reduce((a, l, i) => a + (i < e ? l.size : 0), 0);
128
- },
129
- sumNextPanesSize(e) {
130
- return this.panes.reduce((a, l, i) => a + (i > e + 1 ? l.size : 0), 0);
131
- },
132
- findPrevExpandedPane(e) {
133
- return [...this.panes].reverse().find((a) => a.index < e && a.size > a.min) || {};
134
- },
135
- findNextExpandedPane(e) {
136
- return this.panes.find((a) => a.index > e + 1 && a.size > a.min) || {};
137
- },
138
- checkSplitpanesNodes() {
139
- Array.from(this.container.children).forEach((e) => {
140
- const a = e.classList.contains("splitpanes__pane"), l = e.classList.contains("splitpanes__splitter");
141
- !a && !l && (e.parentNode.removeChild(e), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
93
+ O !== null && (O.size = Math.min(Math.max(_ - u.prevPanesSize - u.prevReachedMinPanes, O.min), O.max)), q !== null && (q.size = Math.min(Math.max(100 - _ - u.nextPanesSize - u.nextReachedMinPanes, q.min), q.max));
94
+ }, h = (t, o) => {
95
+ const u = U.value.activeSplitter, n = [u, u + 1];
96
+ return o < t.prevPanesSize + a.value[n[0]].min && (n[0] = me(u).index, t.prevReachedMinPanes = 0, n[0] < u && a.value.forEach((p, _) => {
97
+ _ > n[0] && _ <= u && (p.size = p.min, t.prevReachedMinPanes += p.min);
98
+ }), t.prevPanesSize = y(n[0]), n[0] === void 0) ? (t.prevReachedMinPanes = 0, a.value[0].size = a.value[0].min, a.value.forEach((p, _) => {
99
+ _ > 0 && _ <= u && (p.size = p.min, t.prevReachedMinPanes += p.min);
100
+ }), a.value[n[1]].size = 100 - t.prevReachedMinPanes - a.value[0].min - t.prevPanesSize - t.nextPanesSize, null) : o > 100 - t.nextPanesSize - a.value[n[1]].min && (n[1] = he(u).index, t.nextReachedMinPanes = 0, n[1] > u + 1 && a.value.forEach((p, _) => {
101
+ _ > u && _ < n[1] && (p.size = p.min, t.nextReachedMinPanes += p.min);
102
+ }), t.nextPanesSize = K(n[1] - 1), n[1] === void 0) ? (t.nextReachedMinPanes = 0, a.value.forEach((p, _) => {
103
+ _ < E.value - 1 && _ >= u + 1 && (p.size = p.min, t.nextReachedMinPanes += p.min);
104
+ }), a.value[n[0]].size = 100 - t.prevPanesSize - K(n[0] - 1), null) : { sums: t, panesToResize: n };
105
+ }, y = (t) => a.value.reduce((o, u, n) => o + (n < t ? u.size : 0), 0), K = (t) => a.value.reduce((o, u, n) => o + (n > t + 1 ? u.size : 0), 0), me = (t) => [...a.value].reverse().find((o) => o.index < t && o.size > o.min) || {}, he = (t) => a.value.find((o) => o.index > t + 1 && o.size > o.min) || {}, fe = () => {
106
+ var t;
107
+ Array.from(((t = g.value) == null ? void 0 : t.children) || []).forEach((o) => {
108
+ const u = o.classList.contains("splitpanes__pane"), n = o.classList.contains("splitpanes__splitter");
109
+ !u && !n && (o.remove(), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
142
110
  });
143
- },
144
- addSplitter(e, a, l = !1) {
145
- const i = e - 1, n = document.createElement("div");
146
- n.classList.add("splitpanes__splitter"), l || (n.onmousedown = (s) => this.onMouseDown(s, i), typeof window < "u" && "ontouchstart" in window && (n.ontouchstart = (s) => this.onMouseDown(s, i)), n.onclick = (s) => this.onSplitterClick(s, i + 1)), this.dblClickSplitter && (n.ondblclick = (s) => this.onSplitterDblClick(s, i + 1)), a.parentNode.insertBefore(n, a);
147
- },
148
- removeSplitter(e) {
149
- e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.parentNode.removeChild(e);
150
- },
151
- redoSplitters() {
152
- const e = Array.from(this.container.children);
153
- e.forEach((l) => {
154
- l.className.includes("splitpanes__splitter") && this.removeSplitter(l);
111
+ }, ee = (t, o, u = !1) => {
112
+ const n = t - 1, p = document.createElement("div");
113
+ p.classList.add("splitpanes__splitter"), u || (p.onmousedown = (_) => I(_, n), typeof window < "u" && "ontouchstart" in window && (p.ontouchstart = (_) => I(_, n)), p.onclick = (_) => Z(_, n + 1)), s.dblClickSplitter && (p.ondblclick = (_) => j(_, n + 1)), o.parentNode.insertBefore(p, o);
114
+ }, pe = (t) => {
115
+ t.onmousedown = void 0, t.onclick = void 0, t.ondblclick = void 0, t.remove();
116
+ }, ne = () => {
117
+ var t;
118
+ const o = Array.from(((t = g.value) == null ? void 0 : t.children) || []);
119
+ o.forEach((n) => {
120
+ n.className.includes("splitpanes__splitter") && pe(n);
155
121
  });
156
- let a = 0;
157
- e.forEach((l) => {
158
- l.className.includes("splitpanes__pane") && (!a && this.firstSplitter ? this.addSplitter(a, l, !0) : a && this.addSplitter(a, l), a++);
122
+ let u = 0;
123
+ o.forEach((n) => {
124
+ n.className.includes("splitpanes__pane") && (!u && s.firstSplitter ? ee(u, n, !0) : u && ee(u, n), u++);
159
125
  });
160
- },
161
- requestUpdate({ target: e, ...a }) {
162
- const l = this.indexedPanes[e._.uid];
163
- Object.entries(a).forEach(([i, n]) => l[i] = n);
164
- },
165
- onPaneAdd(e) {
166
- let a = -1;
167
- Array.from(e.$el.parentNode.children).some((n) => (n.className.includes("splitpanes__pane") && a++, n === e.$el));
168
- const l = parseFloat(e.minSize), i = parseFloat(e.maxSize);
169
- this.panes.splice(a, 0, {
170
- id: e._.uid,
171
- index: a,
172
- min: isNaN(l) ? 0 : l,
173
- max: isNaN(i) ? 100 : i,
174
- size: e.size === null ? null : parseFloat(e.size),
175
- givenSize: e.size,
176
- update: e.update
177
- }), this.panes.forEach((n, s) => n.index = s), this.ready && this.$nextTick(() => {
178
- this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[a] }), this.$emit("pane-add", { index: a, panes: this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })) });
126
+ }, J = ({ uid: t, ...o }) => {
127
+ const u = C.value[t];
128
+ Object.entries(o).forEach(([n, p]) => u[n] = p);
129
+ }, _e = (t) => {
130
+ var o;
131
+ let u = -1;
132
+ Array.from(((o = g.value) == null ? void 0 : o.children) || []).some((n) => (n.className.includes("splitpanes__pane") && u++, n.isSameNode(t.el))), a.value.splice(u, 0, { ...t, index: u }), a.value.forEach((n, p) => n.index = p), M.value && we(() => {
133
+ ne(), ue({ addedPane: a.value[u] }), c("pane-add", { index: u, panes: a.value.map((n) => ({ min: n.min, max: n.max, size: n.size })) });
179
134
  });
180
- },
181
- onPaneRemove(e) {
182
- const a = this.panes.findIndex((i) => i.id === e._.uid), l = this.panes.splice(a, 1)[0];
183
- this.panes.forEach((i, n) => i.index = n), this.$nextTick(() => {
184
- this.redoSplitters(), this.resetPaneSizes({ removedPane: { ...l, index: a } }), this.$emit("pane-remove", { removed: l, panes: this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size })) });
135
+ }, ve = (t) => {
136
+ const o = a.value.findIndex((n) => n.id === t), u = a.value.splice(o, 1)[0];
137
+ a.value.forEach((n, p) => n.index = p), we(() => {
138
+ ne(), ue({ removedPane: { ...u } }), c("pane-remove", { removed: u, panes: a.value.map((n) => ({ min: n.min, max: n.max, size: n.size })) });
185
139
  });
186
- },
187
- resetPaneSizes(e = {}) {
188
- !e.addedPane && !e.removedPane ? this.initialPanesSizing() : this.panes.some((a) => a.givenSize !== null || a.min || a.max < 100) ? this.equalizeAfterAddOrRemove(e) : this.equalize(), this.ready && this.$emit("resized", this.panes.map((a) => ({ min: a.min, max: a.max, size: a.size })));
189
- },
190
- equalize() {
191
- const e = 100 / this.panesCount;
192
- let a = 0;
193
- const l = [], i = [];
194
- this.panes.forEach((n) => {
195
- n.size = Math.max(Math.min(e, n.max), n.min), a -= n.size, n.size >= n.max && l.push(n.id), n.size <= n.min && i.push(n.id);
196
- }), a > 0.1 && this.readjustSizes(a, l, i);
197
- },
198
- initialPanesSizing() {
199
- let e = 100;
200
- const a = [], l = [];
201
- let i = 0;
202
- this.panes.forEach((s) => {
203
- e -= s.size, s.size !== null && i++, s.size >= s.max && a.push(s.id), s.size <= s.min && l.push(s.id);
140
+ }, ue = (t = {}) => {
141
+ !t.addedPane && !t.removedPane ? ge() : a.value.some((o) => o.givenSize !== null || o.min || o.max < 100) ? ze(t) : ye(), M.value && c("resized", a.value.map((o) => ({ min: o.min, max: o.max, size: o.size })));
142
+ }, ye = () => {
143
+ const t = 100 / E.value;
144
+ let o = 0;
145
+ const u = [], n = [];
146
+ a.value.forEach((p) => {
147
+ p.size = Math.max(Math.min(t, p.max), p.min), o -= p.size, p.size >= p.max && u.push(p.id), p.size <= p.min && n.push(p.id);
148
+ }), o > 0.1 && e(o, u, n);
149
+ }, ge = () => {
150
+ let t = 100;
151
+ const o = [], u = [];
152
+ let n = 0;
153
+ a.value.forEach((_) => {
154
+ t -= _.size, _.givenSize !== null && n++, _.size >= _.max && o.push(_.id), _.size <= _.min && u.push(_.id);
204
155
  });
205
- let n = 100;
206
- e > 0.1 && (this.panes.forEach((s) => {
207
- s.size === null && (s.size = Math.max(Math.min(e / (this.panesCount - i), s.max), s.min)), n -= s.size;
208
- }), n > 0.1 && this.readjustSizes(e, a, l));
209
- },
210
- equalizeAfterAddOrRemove({ addedPane: e, removedPane: a } = {}) {
211
- let l = 100 / this.panesCount, i = 0;
212
- const n = [], s = [];
213
- e && e.givenSize !== null && (l = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((u) => {
214
- i -= u.size, u.size >= u.max && n.push(u.id), u.size <= u.min && s.push(u.id);
215
- }), !(Math.abs(i) < 0.1) && (this.panes.forEach((u) => {
216
- e && e.givenSize !== null && e.id === u.id || (u.size = Math.max(Math.min(l, u.max), u.min)), i -= u.size, u.size >= u.max && n.push(u.id), u.size <= u.min && s.push(u.id);
217
- }), i > 0.1 && this.readjustSizes(i, n, s));
218
- },
219
- readjustSizes(e, a, l) {
220
- let i;
221
- e > 0 ? i = e / (this.panesCount - a.length) : i = e / (this.panesCount - l.length), this.panes.forEach((n, s) => {
222
- if (e > 0 && !a.includes(n.id)) {
223
- const u = Math.max(Math.min(n.size + i, n.max), n.min), v = u - n.size;
224
- e -= v, n.size = u;
225
- } else if (!l.includes(n.id)) {
226
- const u = Math.max(Math.min(n.size + i, n.max), n.min), v = u - n.size;
227
- e -= v, n.size = u;
156
+ let p = 100;
157
+ t > 0.1 && (a.value.forEach((_) => {
158
+ _.givenSize === null && (_.size = Math.max(Math.min(t / (E.value - n), _.max), _.min)), p -= _.size;
159
+ }), p > 0.1 && e(p, o, u));
160
+ }, ze = ({ addedPane: t, removedPane: o } = {}) => {
161
+ let u = 100 / E.value, n = 0;
162
+ const p = [], _ = [];
163
+ ((t == null ? void 0 : t.givenSize) ?? null) !== null && (u = (100 - t.givenSize) / (E.value - 1).value), a.value.forEach((V) => {
164
+ n -= V.size, V.size >= V.max && p.push(V.id), V.size <= V.min && _.push(V.id);
165
+ }), !(Math.abs(n) < 0.1) && (a.value.forEach((V) => {
166
+ (t == null ? void 0 : t.givenSize) !== null && (t == null ? void 0 : t.id) === V.id || (V.size = Math.max(Math.min(u, V.max), V.min)), n -= V.size, V.size >= V.max && p.push(V.id), V.size <= V.min && _.push(V.id);
167
+ }), n > 0.1 && e(n, p, _));
168
+ }, e = (t, o, u) => {
169
+ let n;
170
+ t > 0 ? n = t / (E.value - o.length) : n = t / (E.value - u.length), a.value.forEach((p, _) => {
171
+ if (t > 0 && !o.includes(p.id)) {
172
+ const V = Math.max(Math.min(p.size + n, p.max), p.min), O = V - p.size;
173
+ t -= O, p.size = V;
174
+ } else if (!u.includes(p.id)) {
175
+ const V = Math.max(Math.min(p.size + n, p.max), p.min), O = V - p.size;
176
+ t -= O, p.size = V;
228
177
  }
229
- n.update({
230
- [this.horizontal ? "height" : "width"]: `${this.indexedPanes[n.id].size}%`
231
- });
232
- }), Math.abs(e) > 0.1 && this.$nextTick(() => {
233
- this.ready && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
178
+ }), Math.abs(t) > 0.1 && we(() => {
179
+ M.value && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
234
180
  });
235
- }
236
- },
237
- watch: {
238
- panes: {
239
- deep: !0,
240
- immediate: !1,
241
- handler() {
242
- this.updatePaneComponents();
243
- }
244
- },
245
- horizontal() {
246
- this.updatePaneComponents();
247
- },
248
- firstSplitter() {
249
- this.redoSplitters();
250
- },
251
- dblClickSplitter(e) {
252
- [...this.container.querySelectorAll(".splitpanes__splitter")].forEach((a, l) => {
253
- a.ondblclick = e ? (i) => this.onSplitterDblClick(i, l) : void 0;
181
+ };
182
+ te(() => s.firstSplitter, () => ne()), te(() => s.dblClickSplitter, (t) => {
183
+ [...g.value.querySelectorAll(".splitpanes__splitter")].forEach((o, u) => {
184
+ o.ondblclick = t ? (n) => j(n, u) : void 0;
254
185
  });
255
- }
256
- },
257
- beforeUnmount() {
258
- this.ready = !1;
259
- },
260
- mounted() {
261
- this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0;
262
- },
263
- render() {
264
- return me(
265
- "div",
266
- {
267
- ref: "container",
268
- class: [
269
- "splitpanes",
270
- `splitpanes--${this.horizontal ? "horizontal" : "vertical"}`,
271
- {
272
- "splitpanes--dragging": this.touch.dragging
273
- }
274
- ]
275
- },
276
- this.$slots.default()
277
- );
186
+ }), Pe(() => M.value = !1), ce(() => {
187
+ fe(), ne(), ue(), c("ready"), M.value = !0;
188
+ });
189
+ const w = () => {
190
+ var t;
191
+ return Fe(
192
+ "div",
193
+ { ref: g, class: $.value },
194
+ (t = S.default) == null ? void 0 : t.call(S)
195
+ );
196
+ };
197
+ return le("panes", a), le("indexedPanes", C), le("horizontal", X(() => s.horizontal)), le("requestUpdate", J), le("onPaneAdd", _e), le("onPaneRemove", ve), le("onPaneClick", ae), (t, o) => (r(), v(Ue(w)));
278
198
  }
279
- }, xe = (e, a) => {
280
- const l = e.__vccOpts || e;
281
- for (const [i, n] of a)
282
- l[i] = n;
283
- return l;
284
- }, we = {
285
- name: "pane",
286
- inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"],
199
+ }, Oe = {
200
+ __name: "pane",
287
201
  props: {
288
- size: { type: [Number, String], default: null },
202
+ size: { type: [Number, String] },
289
203
  minSize: { type: [Number, String], default: 0 },
290
204
  maxSize: { type: [Number, String], default: 100 }
291
205
  },
292
- data: () => ({
293
- style: {}
294
- }),
295
- mounted() {
296
- this.onPaneAdd(this);
297
- },
298
- beforeUnmount() {
299
- this.onPaneRemove(this);
300
- },
301
- methods: {
302
- update(e) {
303
- this.style = e;
304
- }
305
- },
306
- computed: {
307
- sizeNumber() {
308
- return this.size || this.size === 0 ? parseFloat(this.size) : null;
309
- },
310
- minSizeNumber() {
311
- return parseFloat(this.minSize);
312
- },
313
- maxSizeNumber() {
314
- return parseFloat(this.maxSize);
315
- }
316
- },
317
- watch: {
318
- sizeNumber(e) {
319
- this.requestUpdate({ target: this, size: e });
320
- },
321
- minSizeNumber(e) {
322
- this.requestUpdate({ target: this, min: e });
323
- },
324
- maxSizeNumber(e) {
325
- this.requestUpdate({ target: this, max: e });
326
- }
206
+ setup(d) {
207
+ var m;
208
+ const c = d, s = oe("requestUpdate"), S = oe("onPaneAdd"), a = oe("horizontal"), C = oe("onPaneRemove"), E = oe("onPaneClick"), g = (m = Re()) == null ? void 0 : m.uid, M = oe("indexedPanes"), U = X(() => M.value[g]), L = T(null), $ = X(() => {
209
+ const x = isNaN(c.size) || c.size === void 0 ? 0 : parseFloat(c.size);
210
+ return Math.max(Math.min(x, N.value), W.value);
211
+ }), W = X(() => {
212
+ const x = parseFloat(c.minSize);
213
+ return isNaN(x) ? 0 : x;
214
+ }), N = X(() => {
215
+ const x = parseFloat(c.maxSize);
216
+ return isNaN(x) ? 100 : x;
217
+ }), I = X(() => {
218
+ var x;
219
+ return `${a.value ? "height" : "width"}: ${(x = U.value) == null ? void 0 : x.size}%`;
220
+ });
221
+ return ce(() => {
222
+ S({
223
+ id: g,
224
+ el: L.value,
225
+ min: W.value,
226
+ max: N.value,
227
+ // The given size (useful to know the user intention).
228
+ givenSize: c.size === void 0 ? null : $.value,
229
+ size: $.value
230
+ // The computed current size at any time.
231
+ });
232
+ }), te(() => $.value, (x) => s({ uid: g, size: x })), te(() => W.value, (x) => s({ uid: g, min: x })), te(() => N.value, (x) => s({ uid: g, max: x })), Pe(() => C(g)), (x, A) => (r(), P("div", {
233
+ ref_key: "paneEl",
234
+ ref: L,
235
+ class: "splitpanes__pane",
236
+ onClick: A[0] || (A[0] = (Z) => f(E)(Z, x._.uid)),
237
+ style: D(I.value)
238
+ }, [
239
+ H(x.$slots, "default")
240
+ ], 4));
327
241
  }
328
242
  };
329
- function be(e, a, l, i, n, s) {
330
- return o(), g("div", {
331
- class: "splitpanes__pane",
332
- onClick: a[0] || (a[0] = (u) => s.onPaneClick(u, e._.uid)),
333
- style: x(e.style)
334
- }, [
335
- w(e.$slots, "default")
336
- ], 4);
337
- }
338
- const Se = /* @__PURE__ */ xe(we, [["render", be]]);
339
- const ke = /* @__PURE__ */ U({
243
+ const Ae = /* @__PURE__ */ F({
340
244
  __name: "index",
341
245
  props: {
342
- styles: { type: Object, required: !1, default: () => ({ width: "100%", height: "100%" }) },
343
- horizontal: { type: Boolean, required: !1, default: !1 }
246
+ styles: { default: () => ({ width: "100%", height: "100%" }) },
247
+ horizontal: { type: Boolean, default: !1 }
344
248
  },
345
- setup(e) {
346
- return (a, l) => (o(), f(r(ye), {
347
- horizontal: e.horizontal,
348
- style: x(e.styles),
249
+ setup(d) {
250
+ return (m, c) => (r(), v(f(Te), {
251
+ horizontal: m.horizontal,
252
+ style: D(m.styles),
349
253
  class: "splitpanes"
350
254
  }, {
351
- default: m(() => [
352
- w(a.$slots, "default", {}, void 0, !0)
255
+ default: z(() => [
256
+ H(m.$slots, "default", {}, void 0, !0)
353
257
  ]),
354
258
  _: 3
355
259
  }, 8, ["horizontal", "style"]));
356
260
  }
357
261
  });
358
- const D = (e, a) => {
359
- const l = e.__vccOpts || e;
360
- for (const [i, n] of a)
361
- l[i] = n;
362
- return l;
363
- }, Ce = /* @__PURE__ */ D(ke, [["__scopeId", "data-v-4226b5d2"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/SplitPanes/index.vue"]]), Pe = /* @__PURE__ */ U({
262
+ const se = (d, m) => {
263
+ const c = d.__vccOpts || d;
264
+ for (const [s, S] of m)
265
+ c[s] = S;
266
+ return c;
267
+ }, Ge = /* @__PURE__ */ se(Ae, [["__scopeId", "data-v-15862e4c"]]), qe = /* @__PURE__ */ F({
364
268
  __name: "pane",
365
269
  props: {
366
- styles: { type: Object, required: !0, default: () => ({ background: "#ececec" }) }
270
+ styles: { default: () => ({ background: "#ececec" }) }
367
271
  },
368
- setup(e) {
369
- return (a, l) => (o(), f(r(Se), {
370
- style: x(e.styles)
272
+ setup(d) {
273
+ return (m, c) => (r(), v(f(Oe), {
274
+ style: D(m.styles)
371
275
  }, {
372
- default: m(() => [
373
- w(a.$slots, "default")
276
+ default: z(() => [
277
+ H(m.$slots, "default")
374
278
  ]),
375
279
  _: 3
376
280
  }, 8, ["style"]));
377
281
  }
378
- }), Fe = /* @__PURE__ */ D(Pe, [["__file", "D:/Code/front/dld-vue-ui/src/packages/SplitPanes/pane.vue"]]);
379
- /*! Element Plus Icons Vue v2.0.10 */
380
- var E = (e, a) => {
381
- let l = e.__vccOpts || e;
382
- for (let [i, n] of a)
383
- l[i] = n;
384
- return l;
385
- }, Ee = {
386
- name: "CircleClose"
387
- }, $e = {
388
- viewBox: "0 0 1024 1024",
389
- xmlns: "http://www.w3.org/2000/svg"
390
- }, Me = /* @__PURE__ */ y("path", {
391
- fill: "currentColor",
392
- d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"
393
- }, null, -1), Ve = /* @__PURE__ */ y("path", {
394
- fill: "currentColor",
395
- d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
396
- }, null, -1), Be = [
397
- Me,
398
- Ve
399
- ];
400
- function qe(e, a, l, i, n, s) {
401
- return o(), g("svg", $e, Be);
402
- }
403
- var Le = /* @__PURE__ */ E(Ee, [["render", qe], ["__file", "circle-close.vue"]]), Ne = {
404
- name: "Close"
405
- }, Ue = {
406
- viewBox: "0 0 1024 1024",
407
- xmlns: "http://www.w3.org/2000/svg"
408
- }, De = /* @__PURE__ */ y("path", {
409
- fill: "currentColor",
410
- d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
411
- }, null, -1), Re = [
412
- De
413
- ];
414
- function Te(e, a, l, i, n, s) {
415
- return o(), g("svg", Ue, Re);
416
- }
417
- var We = /* @__PURE__ */ E(Ne, [["render", Te], ["__file", "close.vue"]]), He = {
418
- name: "DeleteFilled"
419
- }, Ae = {
420
- viewBox: "0 0 1024 1024",
421
- xmlns: "http://www.w3.org/2000/svg"
422
- }, Ie = /* @__PURE__ */ y("path", {
423
- fill: "currentColor",
424
- d: "M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64h256zm64 0h192v-64H416v64zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32H192zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32zm192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32z"
425
- }, null, -1), Oe = [
426
- Ie
427
- ];
428
- function Ge(e, a, l, i, n, s) {
429
- return o(), g("svg", Ae, Oe);
430
- }
431
- var je = /* @__PURE__ */ E(He, [["render", Ge], ["__file", "delete-filled.vue"]]), Ke = {
432
- name: "Delete"
433
- }, Ye = {
434
- viewBox: "0 0 1024 1024",
435
- xmlns: "http://www.w3.org/2000/svg"
436
- }, Je = /* @__PURE__ */ y("path", {
437
- fill: "currentColor",
438
- d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"
439
- }, null, -1), Xe = [
440
- Je
441
- ];
442
- function Qe(e, a, l, i, n, s) {
443
- return o(), g("svg", Ye, Xe);
444
- }
445
- var Ze = /* @__PURE__ */ E(Ke, [["render", Qe], ["__file", "delete.vue"]]), et = {
446
- name: "Edit"
447
- }, tt = {
448
- viewBox: "0 0 1024 1024",
449
- xmlns: "http://www.w3.org/2000/svg"
450
- }, at = /* @__PURE__ */ y("path", {
451
- fill: "currentColor",
452
- d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640V512z"
453
- }, null, -1), nt = /* @__PURE__ */ y("path", {
454
- fill: "currentColor",
455
- d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
456
- }, null, -1), lt = [
457
- at,
458
- nt
459
- ];
460
- function it(e, a, l, i, n, s) {
461
- return o(), g("svg", tt, lt);
462
- }
463
- var st = /* @__PURE__ */ E(et, [["render", it], ["__file", "edit.vue"]]), ot = {
464
- name: "Filter"
465
- }, rt = {
466
- viewBox: "0 0 1024 1024",
467
- xmlns: "http://www.w3.org/2000/svg"
468
- }, dt = /* @__PURE__ */ y("path", {
469
- fill: "currentColor",
470
- d: "M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288L384 523.392z"
471
- }, null, -1), ut = [
472
- dt
473
- ];
474
- function ct(e, a, l, i, n, s) {
475
- return o(), g("svg", rt, ut);
476
- }
477
- var K = /* @__PURE__ */ E(ot, [["render", ct], ["__file", "filter.vue"]]), pt = {
478
- name: "FolderOpened"
479
- }, ht = {
480
- viewBox: "0 0 1024 1024",
481
- xmlns: "http://www.w3.org/2000/svg"
482
- }, mt = /* @__PURE__ */ y("path", {
483
- fill: "currentColor",
484
- d: "M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"
485
- }, null, -1), ft = [
486
- mt
487
- ];
488
- function vt(e, a, l, i, n, s) {
489
- return o(), g("svg", ht, ft);
490
- }
491
- var X = /* @__PURE__ */ E(pt, [["render", vt], ["__file", "folder-opened.vue"]]), _t = {
492
- name: "Search"
493
- }, zt = {
494
- viewBox: "0 0 1024 1024",
495
- xmlns: "http://www.w3.org/2000/svg"
496
- }, gt = /* @__PURE__ */ y("path", {
497
- fill: "currentColor",
498
- d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704z"
499
- }, null, -1), yt = [
500
- gt
501
- ];
502
- function xt(e, a, l, i, n, s) {
503
- return o(), g("svg", zt, yt);
504
- }
505
- var wt = /* @__PURE__ */ E(_t, [["render", xt], ["__file", "search.vue"]]), bt = {
506
- name: "Upload"
507
- }, St = {
508
- viewBox: "0 0 1024 1024",
509
- xmlns: "http://www.w3.org/2000/svg"
510
- }, kt = /* @__PURE__ */ y("path", {
511
- fill: "currentColor",
512
- d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"
513
- }, null, -1), Ct = [
514
- kt
515
- ];
516
- function Pt(e, a, l, i, n, s) {
517
- return o(), g("svg", St, Ct);
518
- }
519
- var Q = /* @__PURE__ */ E(bt, [["render", Pt], ["__file", "upload.vue"]]), Ft = function() {
520
- function e(a) {
521
- if (!a)
522
- throw new TypeError("Invalid argument; `value` has no value.");
523
- this.value = e.EMPTY, a && e.isGuid(a) && (this.value = a);
282
+ });
283
+ /*! Element Plus Icons Vue v2.3.1 */
284
+ var Ye = /* @__PURE__ */ F({
285
+ name: "Check",
286
+ __name: "check",
287
+ setup(d) {
288
+ return (m, c) => (r(), P("svg", {
289
+ xmlns: "http://www.w3.org/2000/svg",
290
+ viewBox: "0 0 1024 1024"
291
+ }, [
292
+ B("path", {
293
+ fill: "currentColor",
294
+ d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
295
+ })
296
+ ]));
524
297
  }
525
- return e.isGuid = function(a) {
526
- var l = a.toString();
527
- return a && (a instanceof e || e.validator.test(l));
528
- }, e.create = function() {
529
- return new e([e.gen(2), e.gen(1), e.gen(1), e.gen(1), e.gen(3)].join("-"));
530
- }, e.createEmpty = function() {
531
- return new e("emptyguid");
532
- }, e.parse = function(a) {
533
- return new e(a);
534
- }, e.raw = function() {
535
- return [e.gen(2), e.gen(1), e.gen(1), e.gen(1), e.gen(3)].join("-");
536
- }, e.gen = function(a) {
537
- for (var l = "", i = 0; i < a; i++)
538
- l += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
539
- return l;
540
- }, e.prototype.equals = function(a) {
541
- return e.isGuid(a) && this.value === a.toString();
542
- }, e.prototype.isEmpty = function() {
543
- return this.value === e.EMPTY;
544
- }, e.prototype.toString = function() {
545
- return this.value;
546
- }, e.prototype.toJSON = function() {
547
- return {
548
- value: this.value
549
- };
550
- }, e.validator = new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "i"), e.EMPTY = "00000000-0000-0000-0000-000000000000", e;
551
- }(), Et = Ft;
552
- const $t = { style: {} }, Mt = ["id", "accept"], Vt = { class: "filename" }, Bt = /* @__PURE__ */ U({
298
+ }), Ke = Ye, Xe = /* @__PURE__ */ F({
299
+ name: "CircleClose",
300
+ __name: "circle-close",
301
+ setup(d) {
302
+ return (m, c) => (r(), P("svg", {
303
+ xmlns: "http://www.w3.org/2000/svg",
304
+ viewBox: "0 0 1024 1024"
305
+ }, [
306
+ B("path", {
307
+ fill: "currentColor",
308
+ d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
309
+ }),
310
+ B("path", {
311
+ fill: "currentColor",
312
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
313
+ })
314
+ ]));
315
+ }
316
+ }), Je = Xe, Qe = /* @__PURE__ */ F({
317
+ name: "Close",
318
+ __name: "close",
319
+ setup(d) {
320
+ return (m, c) => (r(), P("svg", {
321
+ xmlns: "http://www.w3.org/2000/svg",
322
+ viewBox: "0 0 1024 1024"
323
+ }, [
324
+ B("path", {
325
+ fill: "currentColor",
326
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
327
+ })
328
+ ]));
329
+ }
330
+ }), Le = Qe, Ze = /* @__PURE__ */ F({
331
+ name: "DeleteFilled",
332
+ __name: "delete-filled",
333
+ setup(d) {
334
+ return (m, c) => (r(), P("svg", {
335
+ xmlns: "http://www.w3.org/2000/svg",
336
+ viewBox: "0 0 1024 1024"
337
+ }, [
338
+ B("path", {
339
+ fill: "currentColor",
340
+ d: "M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"
341
+ })
342
+ ]));
343
+ }
344
+ }), je = Ze, el = /* @__PURE__ */ F({
345
+ name: "Delete",
346
+ __name: "delete",
347
+ setup(d) {
348
+ return (m, c) => (r(), P("svg", {
349
+ xmlns: "http://www.w3.org/2000/svg",
350
+ viewBox: "0 0 1024 1024"
351
+ }, [
352
+ B("path", {
353
+ fill: "currentColor",
354
+ d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
355
+ })
356
+ ]));
357
+ }
358
+ }), ll = el, tl = /* @__PURE__ */ F({
359
+ name: "Edit",
360
+ __name: "edit",
361
+ setup(d) {
362
+ return (m, c) => (r(), P("svg", {
363
+ xmlns: "http://www.w3.org/2000/svg",
364
+ viewBox: "0 0 1024 1024"
365
+ }, [
366
+ B("path", {
367
+ fill: "currentColor",
368
+ d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
369
+ }),
370
+ B("path", {
371
+ fill: "currentColor",
372
+ d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
373
+ })
374
+ ]));
375
+ }
376
+ }), al = tl, nl = /* @__PURE__ */ F({
377
+ name: "Filter",
378
+ __name: "filter",
379
+ setup(d) {
380
+ return (m, c) => (r(), P("svg", {
381
+ xmlns: "http://www.w3.org/2000/svg",
382
+ viewBox: "0 0 1024 1024"
383
+ }, [
384
+ B("path", {
385
+ fill: "currentColor",
386
+ d: "M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 1 0-49.536-40.576l-288 352A32 32 0 0 0 576 512v300.224l-128 64V512a32 32 0 0 0-7.232-20.288L195.52 192H704a32 32 0 1 0 0-64H128a32 32 0 0 0-24.768 52.288z"
387
+ })
388
+ ]));
389
+ }
390
+ }), Ce = nl, ol = /* @__PURE__ */ F({
391
+ name: "FolderOpened",
392
+ __name: "folder-opened",
393
+ setup(d) {
394
+ return (m, c) => (r(), P("svg", {
395
+ xmlns: "http://www.w3.org/2000/svg",
396
+ viewBox: "0 0 1024 1024"
397
+ }, [
398
+ B("path", {
399
+ fill: "currentColor",
400
+ d: "M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896"
401
+ })
402
+ ]));
403
+ }
404
+ }), Ee = ol, il = /* @__PURE__ */ F({
405
+ name: "FullScreen",
406
+ __name: "full-screen",
407
+ setup(d) {
408
+ return (m, c) => (r(), P("svg", {
409
+ xmlns: "http://www.w3.org/2000/svg",
410
+ viewBox: "0 0 1024 1024"
411
+ }, [
412
+ B("path", {
413
+ fill: "currentColor",
414
+ d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
415
+ })
416
+ ]));
417
+ }
418
+ }), rl = il, sl = /* @__PURE__ */ F({
419
+ name: "Minus",
420
+ __name: "minus",
421
+ setup(d) {
422
+ return (m, c) => (r(), P("svg", {
423
+ xmlns: "http://www.w3.org/2000/svg",
424
+ viewBox: "0 0 1024 1024"
425
+ }, [
426
+ B("path", {
427
+ fill: "currentColor",
428
+ d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
429
+ })
430
+ ]));
431
+ }
432
+ }), dl = sl, ul = /* @__PURE__ */ F({
433
+ name: "Search",
434
+ __name: "search",
435
+ setup(d) {
436
+ return (m, c) => (r(), P("svg", {
437
+ xmlns: "http://www.w3.org/2000/svg",
438
+ viewBox: "0 0 1024 1024"
439
+ }, [
440
+ B("path", {
441
+ fill: "currentColor",
442
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
443
+ })
444
+ ]));
445
+ }
446
+ }), pl = ul, cl = /* @__PURE__ */ F({
447
+ name: "Upload",
448
+ __name: "upload",
449
+ setup(d) {
450
+ return (m, c) => (r(), P("svg", {
451
+ xmlns: "http://www.w3.org/2000/svg",
452
+ viewBox: "0 0 1024 1024"
453
+ }, [
454
+ B("path", {
455
+ fill: "currentColor",
456
+ d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"
457
+ })
458
+ ]));
459
+ }
460
+ }), $e = cl, ml = (
461
+ /** @class */
462
+ function() {
463
+ function d(m) {
464
+ if (!m)
465
+ throw new TypeError("Invalid argument; `value` has no value.");
466
+ this.value = d.EMPTY, m && d.isGuid(m) && (this.value = m);
467
+ }
468
+ return d.isGuid = function(m) {
469
+ var c = m.toString();
470
+ return m && (m instanceof d || d.validator.test(c));
471
+ }, d.create = function() {
472
+ return new d([d.gen(2), d.gen(1), d.gen(1), d.gen(1), d.gen(3)].join("-"));
473
+ }, d.createEmpty = function() {
474
+ return new d("emptyguid");
475
+ }, d.parse = function(m) {
476
+ return new d(m);
477
+ }, d.raw = function() {
478
+ return [d.gen(2), d.gen(1), d.gen(1), d.gen(1), d.gen(3)].join("-");
479
+ }, d.gen = function(m) {
480
+ for (var c = "", s = 0; s < m; s++)
481
+ c += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
482
+ return c;
483
+ }, d.prototype.equals = function(m) {
484
+ return d.isGuid(m) && this.value === m.toString();
485
+ }, d.prototype.isEmpty = function() {
486
+ return this.value === d.EMPTY;
487
+ }, d.prototype.toString = function() {
488
+ return this.value;
489
+ }, d.prototype.toJSON = function() {
490
+ return {
491
+ value: this.value
492
+ };
493
+ }, d.validator = new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "i"), d.EMPTY = "00000000-0000-0000-0000-000000000000", d;
494
+ }()
495
+ ), hl = ml;
496
+ const fl = { style: {} }, _l = ["id", "accept"], vl = { class: "filename" }, yl = /* @__PURE__ */ F({
553
497
  __name: "index",
554
498
  props: {
555
- size: { type: String, required: !1, default: "default" },
556
- name: { type: String, required: !1, default: "\u4E0A\u4F20\u6587\u4EF6" },
557
- icon: { type: null, required: !1, default: Q },
558
- type: { type: null, required: !1, default: "success" },
559
- accept: { type: String, required: !0, default: "*" }
499
+ size: { default: "default" },
500
+ name: { default: "上传文件" },
501
+ icon: { default: $e },
502
+ type: { default: "success" },
503
+ accept: { default: "*" }
560
504
  },
561
505
  emits: ["upload"],
562
- setup(e, { expose: a, emit: l }) {
563
- let i = Et.create().toString(), n, s = B("");
564
- function u() {
565
- n.click();
506
+ setup(d, { expose: m, emit: c }) {
507
+ const s = c;
508
+ let S = hl.create().toString(), a, C = T("");
509
+ function E() {
510
+ a.click();
566
511
  }
567
- function v() {
568
- s.value = n.value;
512
+ function g() {
513
+ C.value = a.value;
569
514
  }
570
- function _() {
571
- n.files !== null && l("upload", n.files[0]);
515
+ function M() {
516
+ a.files !== null && s("upload", a.files[0]);
572
517
  }
573
- function P() {
574
- n.value = "", s.value = "";
518
+ function U() {
519
+ a.value = "", C.value = "";
575
520
  }
576
- return Y(() => {
577
- n = document.getElementById(i);
578
- }), a({
579
- Clear: P
580
- }), (q, S) => {
581
- const $ = z("el-button");
582
- return o(), g("div", $t, [
583
- b($, {
584
- type: e.type,
585
- icon: r(X),
586
- size: e.size,
521
+ return ce(() => {
522
+ a = document.getElementById(S);
523
+ }), m({
524
+ Clear: U
525
+ }), (L, $) => {
526
+ const W = k("el-button");
527
+ return r(), P("div", fl, [
528
+ R(W, {
529
+ type: L.type,
530
+ icon: f(Ee),
531
+ size: L.size,
587
532
  class: "btn",
588
- onClick: u
533
+ onClick: E
589
534
  }, {
590
- default: m(() => [
591
- F("\u9009\u62E9\u6587\u4EF6")
592
- ]),
593
- _: 1
535
+ default: z(() => $[0] || ($[0] = [
536
+ G("选择文件")
537
+ ])),
538
+ _: 1,
539
+ __: [0]
594
540
  }, 8, ["type", "icon", "size"]),
595
- fe(y("input", {
541
+ Ie(B("input", {
596
542
  type: "file",
597
- id: r(i),
598
- onChange: v,
599
- accept: e.accept
600
- }, null, 40, Mt), [
601
- [ve, !1]
543
+ id: f(S),
544
+ onChange: g,
545
+ accept: L.accept
546
+ }, null, 40, _l), [
547
+ [He, !1]
602
548
  ]),
603
- y("span", Vt, T(r(s)), 1),
604
- b($, {
605
- type: e.type,
606
- icon: e.icon,
607
- size: e.size,
608
- disabled: r(s) == null || r(s) == "",
549
+ B("span", vl, re(f(C)), 1),
550
+ R(W, {
551
+ type: L.type,
552
+ icon: L.icon,
553
+ size: L.size,
554
+ disabled: f(C) == null || f(C) == "",
609
555
  class: "btn",
610
- title: r(s) == null || r(s) == "" ? "\u8BF7\u9009\u62E9\u6587\u4EF6" : "",
611
- onClick: _
556
+ title: f(C) == null || f(C) == "" ? "请选择文件" : "",
557
+ onClick: M
612
558
  }, {
613
- default: m(() => [
614
- F(T(e.name), 1)
559
+ default: z(() => [
560
+ G(re(L.name), 1)
615
561
  ]),
616
562
  _: 1
617
563
  }, 8, ["type", "icon", "size", "disabled", "title"])
@@ -619,147 +565,149 @@ const $t = { style: {} }, Mt = ["id", "accept"], Vt = { class: "filename" }, Bt
619
565
  };
620
566
  }
621
567
  });
622
- const qt = /* @__PURE__ */ D(Bt, [["__scopeId", "data-v-83b9cdd7"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/UpLoadFile/index.vue"]]), Lt = ["accept"], Nt = { class: "filename" }, Ut = { class: "content" }, Dt = /* @__PURE__ */ U({
568
+ const gl = /* @__PURE__ */ se(yl, [["__scopeId", "data-v-d2ed1fe1"]]), zl = ["accept"], wl = { class: "filename" }, bl = { class: "content" }, xl = /* @__PURE__ */ F({
623
569
  __name: "index",
624
570
  props: {
625
- size: { type: String, required: !0, default: "default" },
626
- accept: { type: String, required: !0, default: "*" }
571
+ size: { default: "default" },
572
+ accept: { default: "*" }
627
573
  },
628
574
  emits: ["upload", "clear"],
629
- setup(e, { expose: a, emit: l }) {
630
- const i = e, n = B(), s = B([]);
631
- function u() {
632
- var S;
633
- (S = n.value) == null || S.click();
575
+ setup(d, { expose: m, emit: c }) {
576
+ const s = d, S = c, a = T(), C = T([]);
577
+ function E() {
578
+ var $;
579
+ ($ = a.value) == null || $.click();
634
580
  }
635
- function v() {
636
- var S, $, M;
637
- if (s.value = [], (S = n.value) != null && S.files)
638
- for (let V = 0; V < ((M = ($ = n.value) == null ? void 0 : $.files) == null ? void 0 : M.length); V++)
639
- s.value[V] = n.value.files[V];
581
+ function g() {
582
+ var $, W, N;
583
+ if (C.value = [], ($ = a.value) != null && $.files)
584
+ for (let I = 0; I < ((N = (W = a.value) == null ? void 0 : W.files) == null ? void 0 : N.length); I++)
585
+ C.value[I] = a.value.files[I];
640
586
  else
641
- s.value = [];
587
+ C.value = [];
642
588
  }
643
- function _(S) {
644
- s.value.splice(S, 1);
589
+ function M($) {
590
+ C.value.splice($, 1);
645
591
  }
646
- function P() {
647
- l("upload", s.value);
592
+ function U() {
593
+ S("upload", C.value);
648
594
  }
649
- function q() {
650
- s.value = [];
595
+ function L() {
596
+ C.value = [];
651
597
  }
652
- return a({
653
- Clear: q
654
- }), (S, $) => {
655
- const M = z("el-button");
656
- return o(), g("div", null, [
657
- y("input", {
598
+ return m({
599
+ Clear: L
600
+ }), ($, W) => {
601
+ const N = k("el-button");
602
+ return r(), P("div", null, [
603
+ B("input", {
658
604
  type: "file",
659
605
  ref_key: "files",
660
- ref: n,
606
+ ref: a,
661
607
  multiple: "",
662
608
  style: { display: "none" },
663
- onChange: v,
664
- accept: i.accept
665
- }, null, 40, Lt),
666
- b(M, {
609
+ onChange: g,
610
+ accept: s.accept
611
+ }, null, 40, zl),
612
+ R(N, {
667
613
  type: "success",
668
- size: i.size,
669
- icon: r(X),
670
- onClick: u
614
+ size: s.size,
615
+ icon: f(Ee),
616
+ onClick: E
671
617
  }, {
672
- default: m(() => [
673
- F("\u9009\u62E9\u6587\u4EF6")
674
- ]),
675
- _: 1
618
+ default: z(() => W[0] || (W[0] = [
619
+ G("选择文件")
620
+ ])),
621
+ _: 1,
622
+ __: [0]
676
623
  }, 8, ["size", "icon"]),
677
- b(M, {
624
+ R(N, {
678
625
  type: "success",
679
- size: i.size,
680
- icon: r(Q),
681
- onClick: P,
682
- disabled: s.value.length == 0
626
+ size: s.size,
627
+ icon: f($e),
628
+ onClick: U,
629
+ disabled: C.value.length == 0
683
630
  }, {
684
- default: m(() => [
685
- F("\u4E0A\u4F20\u6587\u4EF6")
686
- ]),
687
- _: 1
631
+ default: z(() => W[1] || (W[1] = [
632
+ G("上传文件")
633
+ ])),
634
+ _: 1,
635
+ __: [1]
688
636
  }, 8, ["size", "icon", "disabled"]),
689
- (o(!0), g(N, null, H(s.value, (V, R) => (o(), g("p", Nt, [
690
- y("span", Ut, T(V.name), 1),
691
- b(M, {
637
+ (r(!0), P(Q, null, ie(C.value, (I, x) => (r(), P("p", wl, [
638
+ B("span", bl, re(I.name), 1),
639
+ R(N, {
692
640
  size: "small",
693
- icon: r(We),
641
+ icon: f(Le),
694
642
  class: "operation",
695
643
  link: "",
696
- onClick: (I) => _(R)
644
+ onClick: (A) => M(x)
697
645
  }, null, 8, ["icon", "onClick"])
698
646
  ]))), 256))
699
647
  ]);
700
648
  };
701
649
  }
702
650
  });
703
- const Rt = /* @__PURE__ */ D(Dt, [["__scopeId", "data-v-50d3310f"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/UpLoadFiles/index.vue"]]), Tt = /* @__PURE__ */ U({
651
+ const Vl = /* @__PURE__ */ se(xl, [["__scopeId", "data-v-fd9596c6"]]), kl = /* @__PURE__ */ F({
704
652
  __name: "index",
705
653
  props: {
706
- asideWidth: { type: Number, required: !1, default: 220 },
707
- headerMaxHeight: { type: Number, required: !1, default: 60 },
708
- horizontal: { type: Boolean, required: !1, default: !1 }
654
+ asideWidth: { default: 220 },
655
+ headerMaxHeight: { default: 60 },
656
+ horizontal: { type: Boolean, default: !1 }
709
657
  },
710
- setup(e) {
711
- const a = J();
712
- return (l, i) => {
713
- const n = z("el-aside"), s = z("el-header"), u = z("el-main"), v = z("el-container");
714
- return o(), f(v, { class: "container" }, {
715
- default: m(() => [
716
- r(a).aside && !e.horizontal ? (o(), f(n, {
658
+ setup(d) {
659
+ const m = be();
660
+ return (c, s) => {
661
+ const S = k("el-aside"), a = k("el-header"), C = k("el-main"), E = k("el-container");
662
+ return r(), v(E, { class: "container" }, {
663
+ default: z(() => [
664
+ f(m).aside && !c.horizontal ? (r(), v(S, {
717
665
  key: 0,
718
666
  class: "aside",
719
- style: x("width: " + e.asideWidth + "px;")
667
+ style: D("width: " + c.asideWidth + "px;")
720
668
  }, {
721
- default: m(() => [
722
- w(l.$slots, "aside", {}, void 0, !0)
669
+ default: z(() => [
670
+ H(c.$slots, "aside", {}, void 0, !0)
723
671
  ]),
724
672
  _: 3
725
- }, 8, ["style"])) : p("v-if", !0),
726
- r(a).header && e.horizontal ? (o(), f(s, {
673
+ }, 8, ["style"])) : b("", !0),
674
+ f(m).header && c.horizontal ? (r(), v(a, {
727
675
  key: 1,
728
676
  class: "inside_header",
729
- style: x("height: " + e.headerMaxHeight + "px;")
677
+ style: D("height: " + c.headerMaxHeight + "px;")
730
678
  }, {
731
- default: m(() => [
732
- w(l.$slots, "header", {}, void 0, !0)
679
+ default: z(() => [
680
+ H(c.$slots, "header", {}, void 0, !0)
733
681
  ]),
734
682
  _: 3
735
- }, 8, ["style"])) : p("v-if", !0),
736
- b(u, { class: "main" }, {
737
- default: m(() => [
738
- b(v, { class: "inside_container" }, {
739
- default: m(() => [
740
- r(a).header && !e.horizontal ? (o(), f(s, {
683
+ }, 8, ["style"])) : b("", !0),
684
+ R(C, { class: "main" }, {
685
+ default: z(() => [
686
+ R(E, { class: "inside_container" }, {
687
+ default: z(() => [
688
+ f(m).header && !c.horizontal ? (r(), v(a, {
741
689
  key: 0,
742
690
  class: "inside_header",
743
- style: x("height: " + e.headerMaxHeight + "px;")
691
+ style: D("height: " + c.headerMaxHeight + "px;")
744
692
  }, {
745
- default: m(() => [
746
- w(l.$slots, "header", {}, void 0, !0)
693
+ default: z(() => [
694
+ H(c.$slots, "header", {}, void 0, !0)
747
695
  ]),
748
696
  _: 3
749
- }, 8, ["style"])) : p("v-if", !0),
750
- r(a).aside && e.horizontal ? (o(), f(n, {
697
+ }, 8, ["style"])) : b("", !0),
698
+ f(m).aside && c.horizontal ? (r(), v(S, {
751
699
  key: 1,
752
700
  class: "aside",
753
- style: x("width: " + e.asideWidth + "px;")
701
+ style: D("width: " + c.asideWidth + "px;")
754
702
  }, {
755
- default: m(() => [
756
- w(l.$slots, "aside", {}, void 0, !0)
703
+ default: z(() => [
704
+ H(c.$slots, "aside", {}, void 0, !0)
757
705
  ]),
758
706
  _: 3
759
- }, 8, ["style"])) : p("v-if", !0),
760
- b(u, { class: "inside_main" }, {
761
- default: m(() => [
762
- w(l.$slots, "default", {}, void 0, !0)
707
+ }, 8, ["style"])) : b("", !0),
708
+ R(C, { class: "inside_main" }, {
709
+ default: z(() => [
710
+ H(c.$slots, "default", {}, void 0, !0)
763
711
  ]),
764
712
  _: 3
765
713
  })
@@ -775,534 +723,780 @@ const Rt = /* @__PURE__ */ D(Dt, [["__scopeId", "data-v-50d3310f"], ["__file", "
775
723
  };
776
724
  }
777
725
  });
778
- const Wt = /* @__PURE__ */ D(Tt, [["__scopeId", "data-v-5d747d9d"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/Layout/index.vue"]]), Ht = {
726
+ const Sl = /* @__PURE__ */ se(kl, [["__scopeId", "data-v-79d244c7"]]), Cl = {
779
727
  key: 0,
780
728
  class: "header"
781
- }, At = { class: "header_title" }, It = ["innerHTML"], Ot = { class: "header_title" }, Gt = { class: "pagination" }, jt = /* @__PURE__ */ U({
729
+ }, Ml = { class: "header_title" }, Pl = ["innerHTML"], Ul = { class: "header_title" }, Bl = { class: "pagination" }, Ll = /* @__PURE__ */ F({
782
730
  __name: "index",
783
731
  props: {
784
- maxHeight: { type: [Number, String], required: !1, default: 550 },
785
- size: { type: String, required: !1, default: "default" },
786
- tableData: { type: Array, required: !1, default: () => [] },
787
- headStyle: { type: null, required: !1, default: {} },
788
- tableColumn: { type: Array, required: !1, default: () => [] },
789
- stripe: { type: Boolean, required: !1, default: !0 },
790
- border: { type: Boolean, required: !1, default: !1 },
791
- highLight: { type: Boolean, required: !1, default: !1 },
792
- type: { type: String, required: !1 },
793
- typeLabel: { type: String, required: !1, default: "\u5E8F\u53F7" },
794
- typeWidth: { type: Number, required: !1, default: 60 },
795
- typeIsFixed: { type: Boolean, required: !1 },
796
- operate: { type: Boolean, required: !1 },
797
- operateSize: { type: String, required: !1, default: "default" },
798
- rowButtonSize: { type: String, required: !1, default: "default" },
799
- operateLabel: { type: String, required: !1, default: "" },
800
- operateWidth: { type: Number, required: !1, default: 220 },
801
- operateIsFixed: { type: Boolean, required: !1 },
802
- search: { type: Boolean, required: !1 },
803
- clear: { type: Boolean, required: !1 },
804
- edit: { type: Boolean, required: !1 },
805
- delete: { type: Boolean, required: !1 },
806
- deleteTitle: { type: String, required: !1 },
807
- pagination: { type: Boolean, required: !1, default: !1 },
808
- small: { type: Boolean, required: !1, default: !1 },
809
- total: { type: Number, required: !1, default: 0 },
810
- hideOnSinglePage: { type: Boolean, required: !1, default: !1 },
811
- defaultSelect: { type: Function, required: !1 },
812
- defaultSize: { type: Number, required: !1, default: 5 },
813
- filter: { type: Boolean, required: !1 }
732
+ maxHeight: { default: 550 },
733
+ size: { default: "default" },
734
+ tableData: { default: () => [] },
735
+ headStyle: { default: {} },
736
+ tableColumn: { default: () => [] },
737
+ stripe: { type: Boolean, default: !0 },
738
+ border: { type: Boolean, default: !1 },
739
+ highLight: { type: Boolean, default: !1 },
740
+ type: {},
741
+ typeLabel: { default: "序号" },
742
+ typeWidth: { default: 60 },
743
+ typeIsFixed: { type: Boolean },
744
+ operate: { type: Boolean },
745
+ operateSize: { default: "default" },
746
+ rowButtonSize: { default: "default" },
747
+ operateLabel: { default: "" },
748
+ operateWidth: { default: 220 },
749
+ operateIsFixed: { type: Boolean },
750
+ search: { type: Boolean },
751
+ clear: { type: Boolean },
752
+ edit: { type: Boolean },
753
+ delete: { type: Boolean },
754
+ deleteTitle: {},
755
+ pagination: { type: Boolean, default: !1 },
756
+ small: { type: Boolean, default: !1 },
757
+ total: { default: 0 },
758
+ hideOnSinglePage: { type: Boolean, default: !1 },
759
+ defaultSelect: {},
760
+ defaultSize: { default: 5 },
761
+ filter: { type: Boolean }
814
762
  },
815
763
  emits: ["row-click", "row-dblclick", "selection-change", "search", "clear", "delete", "edit", "page-index", "page-size", "get-ref", "filter"],
816
- setup(e, { expose: a, emit: l }) {
817
- const i = e;
818
- let n = _e({
764
+ setup(d, { expose: m, emit: c }) {
765
+ const s = d, S = c;
766
+ let a = De({
819
767
  pageIndex: 1,
820
768
  pageSize: 5
821
- }), s = B(), u = B();
822
- const v = B([]), _ = B([]), P = B(!1), q = J(), S = (d) => {
823
- l("row-click", d);
824
- }, $ = (d) => {
825
- l("row-click", d);
826
- }, M = (d) => {
827
- l("selection-change", d);
828
- }, V = () => {
829
- if (i.tableColumn.length > 0)
830
- for (let d = 0; d < i.tableColumn.length; d++) {
831
- let c = i.tableColumn[d];
832
- n[c.prop] = null;
769
+ }), C = T(), E = T();
770
+ const g = T([]), M = T([]), U = T(!1), L = be(), $ = (l) => {
771
+ S("row-click", l);
772
+ }, W = (l) => {
773
+ S("row-click", l);
774
+ }, N = (l) => {
775
+ S("selection-change", l);
776
+ }, I = () => {
777
+ if (s.tableColumn.length > 0)
778
+ for (let l = 0; l < s.tableColumn.length; l++) {
779
+ let h = s.tableColumn[l];
780
+ a[h.prop] = null;
833
781
  }
834
- l("clear");
835
- }, R = () => {
836
- l("search", n);
837
- }, I = (d) => {
838
- l("edit", d);
839
- }, Z = (d) => {
840
- l("delete", d);
841
- }, ee = (d) => {
842
- for (let c = 0; c < d.length; c++)
843
- n[d[c].prop] = d[c].label;
844
- }, te = () => n, ae = () => {
845
- v.value.forEach((d) => {
846
- var c = _.value.find((k) => k.label == d.label);
847
- c && c.filter && (d.hidden = !c.check, d.hidden && (n[d.prop] = null));
848
- }), P.value = !1, u.value.hide(), l("filter", () => _.value);
849
- }, ne = (d) => {
850
- v.value = d, i.filter && (_.value = [], v.value.forEach((c) => {
851
- c.filter ? c.check ? _.value.push({
852
- label: c.label,
782
+ S("clear");
783
+ }, x = () => {
784
+ S("search", a);
785
+ }, A = (l) => {
786
+ S("edit", l);
787
+ }, Z = (l) => {
788
+ S("delete", l);
789
+ }, j = (l) => {
790
+ for (let h = 0; h < l.length; h++)
791
+ a[l[h].prop] = l[h].label;
792
+ }, ae = () => a, de = () => {
793
+ g.value.forEach((l) => {
794
+ var h = M.value.find((y) => y.label == l.label);
795
+ h && h.filter && (l.hidden = !h.check, l.hidden && (a[l.prop] = null));
796
+ }), U.value = !1, E.value.hide(), S("filter", () => M.value);
797
+ }, i = (l) => {
798
+ g.value = l, s.filter && (M.value = [], g.value.forEach((h) => {
799
+ h.filter ? h.check ? M.value.push({
800
+ label: h.label,
853
801
  check: !0,
854
- prop: c.prop,
855
- filter: c.filter
856
- }) : (_.value.push({
857
- label: c.label,
802
+ prop: h.prop,
803
+ filter: h.filter
804
+ }) : (M.value.push({
805
+ label: h.label,
858
806
  check: !1,
859
- prop: c.prop,
860
- filter: c.filter
861
- }), c.hidden = !0) : _.value.push({
862
- label: c.label,
807
+ prop: h.prop,
808
+ filter: h.filter
809
+ }), h.hidden = !0) : M.value.push({
810
+ label: h.label,
863
811
  check: !0,
864
- prop: c.prop,
865
- filter: c.filter
812
+ prop: h.prop,
813
+ filter: h.filter
866
814
  });
867
- })), v.value.forEach((c) => {
868
- var k = _.value.find((A) => A.label == c.label);
869
- k && k.filter && (c.hidden = !k.check, c.hidden && (n[c.prop] = null)), k != null && k.filter || (c.hidden = !1);
815
+ })), g.value.forEach((h) => {
816
+ var y = M.value.find((K) => K.label == h.label);
817
+ y && y.filter && (h.hidden = !y.check, h.hidden && (a[h.prop] = null)), y != null && y.filter || (h.hidden = !1);
870
818
  });
871
819
  };
872
- return G(
873
- () => n.pageIndex,
874
- (d, c) => {
875
- l("page-index", Number(d), Number(c));
820
+ return te(
821
+ () => a.pageIndex,
822
+ (l, h) => {
823
+ S("page-index", Number(l), Number(h));
876
824
  }
877
- ), G(
878
- () => n.pageSize,
879
- (d, c) => {
880
- l("page-size", Number(d), Number(c));
825
+ ), te(
826
+ () => a.pageSize,
827
+ (l, h) => {
828
+ S("page-size", Number(l), Number(h));
881
829
  }
882
- ), a({
883
- Assignment: ee,
884
- GetParameters: te,
885
- SetFilter: ne
886
- }), Y(() => {
887
- if (i.tableColumn.length > 0)
888
- for (let d = 0; d < i.tableColumn.length; d++) {
889
- let c = i.tableColumn[d];
890
- n[c.prop] = null;
830
+ ), m({
831
+ Assignment: j,
832
+ GetParameters: ae,
833
+ SetFilter: i
834
+ }), ce(() => {
835
+ if (s.tableColumn.length > 0)
836
+ for (let l = 0; l < s.tableColumn.length; l++) {
837
+ let h = s.tableColumn[l];
838
+ a[h.prop] = null;
891
839
  }
892
- i.tableData.forEach((d) => {
893
- i.defaultSelect && i.type == "selection" && i.defaultSelect(d) && s.value.toggleRowSelection(d, void 0, !1);
894
- }), n.pageSize = i.defaultSize, i.filter || (v.value = i.tableColumn);
895
- }), (d, c) => {
896
- const k = z("el-table-column"), A = z("el-input"), le = z("el-input-number"), ie = z("el-option"), se = z("el-select"), W = z("el-date-picker"), O = z("el-time-picker"), oe = z("el-switch"), L = z("el-button"), re = z("el-icon"), de = z("el-checkbox"), ue = z("el-popover"), ce = z("el-popconfirm"), pe = z("el-table"), he = z("el-pagination");
897
- return o(), g(N, null, [
898
- r(q).header ? (o(), g("div", Ht, [
899
- w(d.$slots, "header", {}, void 0, !0)
900
- ])) : p("v-if", !0),
901
- b(pe, {
902
- data: e.tableData,
903
- class: C([e.size && e.size == "small" ? "mini-table" : "table"]),
904
- "max-height": e.maxHeight,
905
- size: e.size,
906
- stripe: e.stripe,
907
- border: e.border,
908
- "highlight-current-row": e.highLight,
909
- onRowClick: S,
910
- onRowDblclick: $,
911
- onSelectionChange: M,
840
+ s.tableData.forEach((l) => {
841
+ s.defaultSelect && s.type == "selection" && s.defaultSelect(l) && C.value.toggleRowSelection(l, void 0, !1);
842
+ }), a.pageSize = s.defaultSize, s.filter || (g.value = s.tableColumn);
843
+ }), (l, h) => {
844
+ const y = k("el-table-column"), K = k("el-input"), me = k("el-input-number"), he = k("el-option"), fe = k("el-select"), ee = k("el-date-picker"), pe = k("el-time-picker"), ne = k("el-switch"), J = k("el-button"), _e = k("el-icon"), ve = k("el-checkbox"), ue = k("el-popover"), ye = k("el-popconfirm"), ge = k("el-table"), ze = k("el-pagination");
845
+ return r(), P(Q, null, [
846
+ f(L).header ? (r(), P("div", Cl, [
847
+ H(l.$slots, "header", {}, void 0, !0)
848
+ ])) : b("", !0),
849
+ R(ge, {
850
+ data: l.tableData,
851
+ class: Y([l.size && l.size == "small" ? "mini-table" : "table"]),
852
+ "max-height": l.maxHeight,
853
+ size: l.size,
854
+ stripe: l.stripe,
855
+ border: l.border,
856
+ "highlight-current-row": l.highLight,
857
+ onRowClick: $,
858
+ onRowDblclick: W,
859
+ onSelectionChange: N,
912
860
  ref_key: "tableRef",
913
- ref: s,
914
- "header-cell-style": e.headStyle
861
+ ref: C,
862
+ "header-cell-style": l.headStyle
915
863
  }, {
916
- default: m(() => [
917
- e.type && e.type == "index" ? (o(), f(k, {
864
+ default: z(() => [
865
+ l.type && l.type == "index" ? (r(), v(y, {
918
866
  key: 0,
919
867
  align: "center",
920
868
  type: "index",
921
- width: e.typeWidth + "px",
922
- fixed: e.typeIsFixed ? "left" : !1,
923
- label: e.typeLabel
924
- }, null, 8, ["width", "fixed", "label"])) : p("v-if", !0),
925
- e.type == "selection" ? (o(), f(k, {
869
+ width: l.typeWidth + "px",
870
+ fixed: l.typeIsFixed ? "left" : !1,
871
+ label: l.typeLabel
872
+ }, null, 8, ["width", "fixed", "label"])) : b("", !0),
873
+ l.type == "selection" ? (r(), v(y, {
926
874
  key: 1,
927
875
  align: "center",
928
876
  type: "selection",
929
- width: e.typeWidth + "px",
930
- fixed: e.typeIsFixed ? "left" : !1
931
- }, null, 8, ["width", "fixed"])) : p("v-if", !0),
932
- e.type == "expand" ? (o(), f(k, {
877
+ width: l.typeWidth + "px",
878
+ fixed: l.typeIsFixed ? "left" : !1
879
+ }, null, 8, ["width", "fixed"])) : b("", !0),
880
+ l.type == "expand" ? (r(), v(y, {
933
881
  key: 2,
934
882
  align: "center",
935
883
  type: "expand",
936
- width: e.typeWidth + "px",
937
- fixed: e.typeIsFixed ? "left" : !1,
938
- label: e.typeLabel
884
+ width: l.typeWidth + "px",
885
+ fixed: l.typeIsFixed ? "left" : !1,
886
+ label: l.typeLabel
939
887
  }, {
940
- default: m((t) => [
941
- w(d.$slots, "expand", {
942
- row: t.row
888
+ default: z((e) => [
889
+ H(l.$slots, "expand", {
890
+ row: e == null ? void 0 : e.row
943
891
  }, void 0, !0)
944
892
  ]),
945
893
  _: 3
946
- }, 8, ["width", "fixed", "label"])) : p("v-if", !0),
947
- (o(!0), g(N, null, H(v.value, (t) => (o(), g(N, null, [
948
- t.hidden ? p("v-if", !0) : (o(), f(k, {
894
+ }, 8, ["width", "fixed", "label"])) : b("", !0),
895
+ (r(!0), P(Q, null, ie(g.value, (e) => (r(), P(Q, null, [
896
+ e.hidden ? b("", !0) : (r(), v(y, {
949
897
  key: 0,
950
- prop: t.costom ? !1 : t.prop,
951
- width: t.width ? t.width : "",
952
- "min-width": t.minWidth ? t.minWidth : "",
953
- fixed: t.fixed ? t.fixed : !1,
954
- align: t.align ? t.align : "left",
955
- "show-overflow-tooltip": !!t.overflow
956
- }, ze({
957
- header: m(() => [
958
- y("div", At, T(t.label), 1),
959
- p(" \u6587\u672C\u641C\u7D22\u6846 "),
960
- t.search && (!t.type || t.type == "text") ? (o(), f(A, {
898
+ prop: e.costom ? !1 : e.prop,
899
+ width: e.width ? e.width : "",
900
+ "min-width": e.minWidth ? e.minWidth : "",
901
+ fixed: e.fixed ? e.fixed : !1,
902
+ align: e.align ? e.align : "left",
903
+ "show-overflow-tooltip": !!e.overflow
904
+ }, Be({
905
+ header: z(() => [
906
+ B("div", Ml, re(e.label), 1),
907
+ e.search && (!e.type || e.type == "text") ? (r(), v(K, {
961
908
  key: 0,
962
- modelValue: r(n)[t.prop],
963
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
964
- size: t.size,
909
+ modelValue: f(a)[e.prop],
910
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
911
+ size: e.size,
965
912
  clearable: "",
966
- style: x(
967
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
913
+ style: D(
914
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
968
915
  ),
969
- disabled: t.disabled,
970
- placeholder: t.placeholder ? t.placeholder : "\u8BF7\u8F93\u5165" + t.label,
971
- class: C([t.align && t.align == "center" ? "center" : ""]),
972
- onKeyup: j(R, ["enter", "native"])
973
- }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "placeholder", "class", "onKeyup"])) : p("v-if", !0),
974
- p(" \u6570\u5B57\u6846\u641C\u7D22 "),
975
- t.search && t.type == "number" ? (o(), f(le, {
916
+ disabled: e.disabled,
917
+ placeholder: e.placeholder ? e.placeholder : "请输入" + e.label,
918
+ class: Y([e.align && e.align == "center" ? "center" : ""]),
919
+ onKeyup: ke(x, ["enter", "native"])
920
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "placeholder", "class"])) : b("", !0),
921
+ e.search && e.type == "number" ? (r(), v(me, {
976
922
  key: 1,
977
- modelValue: r(n)[t.prop],
978
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
979
- size: t.size,
923
+ modelValue: f(a)[e.prop],
924
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
925
+ size: e.size,
980
926
  clearable: "",
981
- style: x(
982
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
927
+ style: D(
928
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
983
929
  ),
984
- disabled: t.disabled,
985
- placeholder: t.placeholder ? t.placeholder : "\u8BF7\u8F93\u5165" + t.label,
986
- class: C([t.align && t.align == "center" ? "center" : ""]),
987
- max: t.max != null ? t.max : 1 / 0,
988
- min: t.min != null ? t.min : -1 / 0,
989
- step: t.step != null ? t.step : 1,
990
- onKeyup: j(R, ["enter", "native"])
991
- }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "placeholder", "class", "max", "min", "step", "onKeyup"])) : p("v-if", !0),
992
- p(" \u9009\u62E9\u641C\u7D22 "),
993
- t.search && t.type == "select" ? (o(), f(se, {
930
+ disabled: e.disabled,
931
+ placeholder: e.placeholder ? e.placeholder : "请输入" + e.label,
932
+ class: Y([e.align && e.align == "center" ? "center" : ""]),
933
+ max: e.max != null ? e.max : 1 / 0,
934
+ min: e.min != null ? e.min : -1 / 0,
935
+ step: e.step != null ? e.step : 1,
936
+ onKeyup: ke(x, ["enter", "native"])
937
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "placeholder", "class", "max", "min", "step"])) : b("", !0),
938
+ e.search && e.type == "select" ? (r(), v(fe, {
994
939
  key: 2,
995
- modelValue: r(n)[t.prop],
996
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
997
- size: t.size,
940
+ modelValue: f(a)[e.prop],
941
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
942
+ size: e.size,
998
943
  clearable: "",
999
944
  filterable: "",
1000
- style: x(
1001
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
945
+ style: D(
946
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
1002
947
  ),
1003
- disabled: t.disabled,
1004
- multiple: t.multiple,
1005
- "collapse-tags": t.omit,
1006
- placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9" + t.label,
1007
- class: C([t.align && t.align == "center" ? "center" : ""])
948
+ disabled: e.disabled,
949
+ multiple: e.multiple,
950
+ "collapse-tags": e.omit,
951
+ placeholder: e.placeholder ? e.placeholder : "请选择" + e.label,
952
+ class: Y([e.align && e.align == "center" ? "center" : ""])
1008
953
  }, {
1009
- default: m(() => [
1010
- (o(!0), g(N, null, H(t.options, (h) => (o(), f(ie, {
1011
- label: h.label ? h.label : h.value,
1012
- value: h.value,
1013
- disabled: h.disabled
954
+ default: z(() => [
955
+ (r(!0), P(Q, null, ie(e.options, (w) => (r(), v(he, {
956
+ label: w.label ? w.label : w.value,
957
+ value: w.value,
958
+ disabled: w.disabled
1014
959
  }, null, 8, ["label", "value", "disabled"]))), 256))
1015
960
  ]),
1016
961
  _: 2
1017
- }, 1032, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "multiple", "collapse-tags", "placeholder", "class"])) : p("v-if", !0),
1018
- p(" \u65E5\u671F\u9009\u62E9 "),
1019
- t.search && t.type == "date" ? (o(), f(W, {
962
+ }, 1032, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "multiple", "collapse-tags", "placeholder", "class"])) : b("", !0),
963
+ e.search && e.type == "date" ? (r(), v(ee, {
1020
964
  key: 3,
1021
- modelValue: r(n)[t.prop],
1022
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
965
+ modelValue: f(a)[e.prop],
966
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1023
967
  type: "date",
1024
- style: x(t.searchWidth ? "width: " + t.searchWidth + "px;" : ""),
1025
- placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9\u65E5\u671F",
1026
- size: t.size,
1027
- class: C([t.align && t.align == "center" ? "center" : ""])
1028
- }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : p("v-if", !0),
1029
- p(" \u65F6\u95F4\u9009\u62E9 "),
1030
- t.search && t.type == "time" ? (o(), f(O, {
968
+ style: D(e.searchWidth ? "width: " + e.searchWidth + "px;" : ""),
969
+ placeholder: e.placeholder ? e.placeholder : "请选择日期",
970
+ size: e.size,
971
+ class: Y([e.align && e.align == "center" ? "center" : ""])
972
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : b("", !0),
973
+ e.search && e.type == "time" ? (r(), v(pe, {
1031
974
  key: 4,
1032
- modelValue: r(n)[t.prop],
1033
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
975
+ modelValue: f(a)[e.prop],
976
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1034
977
  "arrow-control": "",
1035
- style: x(
1036
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
978
+ style: D(
979
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
1037
980
  ),
1038
- placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9\u65F6\u95F4",
1039
- size: t.size,
1040
- class: C([t.align && t.align == "center" ? "center" : ""])
1041
- }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : p("v-if", !0),
1042
- p(" \u65E5\u671F\u65F6\u95F4\u641C\u7D22 "),
1043
- t.search && t.type == "datetime" ? (o(), f(W, {
981
+ placeholder: e.placeholder ? e.placeholder : "请选择时间",
982
+ size: e.size,
983
+ class: Y([e.align && e.align == "center" ? "center" : ""])
984
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : b("", !0),
985
+ e.search && e.type == "datetime" ? (r(), v(ee, {
1044
986
  key: 5,
1045
- modelValue: r(n)[t.prop],
1046
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
987
+ modelValue: f(a)[e.prop],
988
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1047
989
  type: "datetime",
1048
- style: x(
1049
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
990
+ style: D(
991
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
1050
992
  ),
1051
- placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9\u65E5\u671F\u65F6\u95F4",
1052
- size: t.size,
1053
- class: C([t.align && t.align == "center" ? "center" : ""])
1054
- }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : p("v-if", !0),
1055
- p(" \u65E5\u671F\u8303\u56F4\u9009\u62E9 "),
1056
- t.search && t.type == "daterange" ? (o(), f(W, {
993
+ placeholder: e.placeholder ? e.placeholder : "请选择日期时间",
994
+ size: e.size,
995
+ class: Y([e.align && e.align == "center" ? "center" : ""])
996
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : b("", !0),
997
+ e.search && e.type == "daterange" ? (r(), v(ee, {
1057
998
  key: 6,
1058
- modelValue: r(n)[t.prop],
1059
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
999
+ modelValue: f(a)[e.prop],
1000
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1060
1001
  type: "daterange",
1061
1002
  "range-separator": "-",
1062
- "start-placeholder": t.placeholder ? t.placeholder.split("&&")[0] : "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
1063
- "end-placeholder": t.placeholder ? t.placeholder.split("&&")[1] : "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
1064
- style: x(
1065
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
1003
+ "start-placeholder": e.placeholder ? e.placeholder.split("&&")[0] : "请选择开始日期",
1004
+ "end-placeholder": e.placeholder ? e.placeholder.split("&&")[1] : "请选择结束日期",
1005
+ style: D(
1006
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
1066
1007
  ),
1067
- size: t.size,
1068
- class: C([t.align && t.align == "center" ? "center" : ""])
1069
- }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : p("v-if", !0),
1070
- p(" \u65F6\u95F4\u8303\u56F4\u9009\u62E9 "),
1071
- t.search && t.type == "timerange" ? (o(), f(O, {
1008
+ size: e.size,
1009
+ class: Y([e.align && e.align == "center" ? "center" : ""])
1010
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : b("", !0),
1011
+ e.search && e.type == "timerange" ? (r(), v(pe, {
1072
1012
  key: 7,
1073
- modelValue: r(n)[t.prop],
1074
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
1013
+ modelValue: f(a)[e.prop],
1014
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1075
1015
  "is-range": "",
1076
1016
  "arrow-control": "",
1077
1017
  "range-separator": "-",
1078
- "start-placeholder": t.placeholder ? t.placeholder.split("&&")[0] : "\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4",
1079
- "end-placeholder": t.placeholder ? t.placeholder.split("&&")[1] : "\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",
1080
- style: x(
1081
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
1018
+ "start-placeholder": e.placeholder ? e.placeholder.split("&&")[0] : "请选择开始时间",
1019
+ "end-placeholder": e.placeholder ? e.placeholder.split("&&")[1] : "请选择结束时间",
1020
+ style: D(
1021
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
1082
1022
  ),
1083
- size: t.size,
1084
- class: C([t.align && t.align == "center" ? "center" : ""])
1085
- }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : p("v-if", !0),
1086
- p(" \u65E5\u671F\u65F6\u95F4\u8303\u56F4\u9009\u62E9 "),
1087
- t.search && t.type == "datetimerange" ? (o(), f(W, {
1023
+ size: e.size,
1024
+ class: Y([e.align && e.align == "center" ? "center" : ""])
1025
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : b("", !0),
1026
+ e.search && e.type == "datetimerange" ? (r(), v(ee, {
1088
1027
  key: 8,
1089
- modelValue: r(n)[t.prop],
1090
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
1028
+ modelValue: f(a)[e.prop],
1029
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1091
1030
  type: "datetimerange",
1092
1031
  "range-separator": "-",
1093
- "start-placeholder": t.placeholder ? t.placeholder.split("&&")[0] : "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F\u65F6\u95F4",
1094
- "end-placeholder": t.placeholder ? t.placeholder.split("&&")[1] : "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F\u65F6\u95F4",
1095
- style: x(
1096
- t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"
1032
+ "start-placeholder": e.placeholder ? e.placeholder.split("&&")[0] : "请选择开始日期时间",
1033
+ "end-placeholder": e.placeholder ? e.placeholder.split("&&")[1] : "请选择结束日期时间",
1034
+ style: D(
1035
+ e.searchWidth ? "width: " + e.searchWidth + "px;" : "width: 92%"
1097
1036
  ),
1098
- size: t.size,
1099
- class: C([t.align && t.align == "center" ? "center" : ""])
1100
- }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : p("v-if", !0),
1101
- p(" \u5F00\u5173 "),
1102
- t.search && t.type == "switch" ? (o(), f(oe, {
1037
+ size: e.size,
1038
+ class: Y([e.align && e.align == "center" ? "center" : ""])
1039
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : b("", !0),
1040
+ e.search && e.type == "switch" ? (r(), v(ne, {
1103
1041
  key: 9,
1104
- modelValue: r(n)[t.prop],
1105
- "onUpdate:modelValue": (h) => r(n)[t.prop] = h,
1106
- size: t.size,
1107
- "active-text": t.openText,
1108
- "inactive-text": t.closeText,
1109
- class: C([t.align && t.align == "center" ? "center" : ""])
1110
- }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "active-text", "inactive-text", "class"])) : p("v-if", !0)
1042
+ modelValue: f(a)[e.prop],
1043
+ "onUpdate:modelValue": (w) => f(a)[e.prop] = w,
1044
+ size: e.size,
1045
+ "active-text": e.openText,
1046
+ "inactive-text": e.closeText,
1047
+ class: Y([e.align && e.align == "center" ? "center" : ""])
1048
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "active-text", "inactive-text", "class"])) : b("", !0)
1111
1049
  ]),
1112
1050
  _: 2
1113
1051
  }, [
1114
- t.costom ? {
1052
+ e.costom ? {
1115
1053
  name: "default",
1116
- fn: m((h) => [
1117
- y("span", {
1118
- innerHTML: t.costom ? t.costom(h.row) : ""
1119
- }, null, 8, It)
1054
+ fn: z((w) => [
1055
+ B("span", {
1056
+ innerHTML: e.costom ? e.costom(w == null ? void 0 : w.row) : ""
1057
+ }, null, 8, Pl)
1120
1058
  ]),
1121
1059
  key: "0"
1122
1060
  } : void 0,
1123
- t.component ? {
1061
+ e.component ? {
1124
1062
  name: "default",
1125
- fn: m((h) => [
1126
- (o(), f(ge(t.component), {
1127
- data: h.row
1063
+ fn: z((w) => [
1064
+ (r(), v(Ue(e.component), {
1065
+ data: w == null ? void 0 : w.row
1128
1066
  }, null, 8, ["data"]))
1129
1067
  ]),
1130
1068
  key: "1"
1131
1069
  } : void 0
1132
1070
  ]), 1032, ["prop", "width", "min-width", "fixed", "align", "show-overflow-tooltip"]))
1133
1071
  ], 64))), 256)),
1134
- e.operate ? (o(), f(k, {
1072
+ l.operate ? (r(), v(y, {
1135
1073
  key: 3,
1136
1074
  align: "center",
1137
- width: e.operateWidth ? e.operateWidth : "",
1138
- fixed: e.operateIsFixed ? "right" : !1
1075
+ width: l.operateWidth ? l.operateWidth : "",
1076
+ fixed: l.operateIsFixed ? "right" : !1
1139
1077
  }, {
1140
- header: m(() => [
1141
- y("div", Ot, T(e.operateLabel), 1),
1142
- w(d.$slots, "operate-front", {}, void 0, !0),
1143
- e.search ? (o(), f(L, {
1078
+ header: z(() => [
1079
+ B("div", Ul, re(l.operateLabel), 1),
1080
+ H(l.$slots, "operate-front", {}, void 0, !0),
1081
+ l.search ? (r(), v(J, {
1144
1082
  key: 0,
1145
1083
  type: "primary",
1146
- size: e.operateSize,
1147
- icon: r(wt),
1148
- onClick: R
1084
+ size: l.operateSize,
1085
+ icon: f(pl),
1086
+ onClick: x
1149
1087
  }, {
1150
- default: m(() => [
1151
- F("\u641C\u7D22")
1152
- ]),
1153
- _: 1
1154
- }, 8, ["size", "icon"])) : p("v-if", !0),
1155
- w(d.$slots, "operate-middle", {}, void 0, !0),
1156
- e.clear ? (o(), f(L, {
1088
+ default: z(() => h[3] || (h[3] = [
1089
+ G("搜索")
1090
+ ])),
1091
+ _: 1,
1092
+ __: [3]
1093
+ }, 8, ["size", "icon"])) : b("", !0),
1094
+ H(l.$slots, "operate-middle", {}, void 0, !0),
1095
+ l.clear ? (r(), v(J, {
1157
1096
  key: 1,
1158
1097
  type: "info",
1159
- size: e.operateSize,
1160
- icon: r(Le),
1161
- onClick: V
1098
+ size: l.operateSize,
1099
+ icon: f(Je),
1100
+ onClick: I
1162
1101
  }, {
1163
- default: m(() => [
1164
- F("\u6E05\u7A7A")
1165
- ]),
1166
- _: 1
1167
- }, 8, ["size", "icon"])) : p("v-if", !0),
1168
- w(d.$slots, "operate", {}, void 0, !0),
1169
- e.filter ? (o(), f(ue, {
1102
+ default: z(() => h[4] || (h[4] = [
1103
+ G("清空")
1104
+ ])),
1105
+ _: 1,
1106
+ __: [4]
1107
+ }, 8, ["size", "icon"])) : b("", !0),
1108
+ H(l.$slots, "operate", {}, void 0, !0),
1109
+ l.filter ? (r(), v(ue, {
1170
1110
  key: 2,
1171
1111
  ref_key: "popover",
1172
- ref: u,
1112
+ ref: E,
1173
1113
  width: "150",
1174
1114
  trigger: "click",
1175
1115
  placement: "bottom"
1176
1116
  }, {
1177
- reference: m(() => [
1178
- b(L, {
1117
+ reference: z(() => [
1118
+ R(J, {
1179
1119
  type: "link",
1180
- size: e.operateSize,
1181
- icon: r(K),
1182
- onClick: c[0] || (c[0] = (t) => P.value = !P.value)
1120
+ size: l.operateSize,
1121
+ icon: f(Ce),
1122
+ onClick: h[0] || (h[0] = (e) => U.value = !U.value)
1183
1123
  }, null, 8, ["size", "icon"])
1184
1124
  ]),
1185
- default: m(() => [
1186
- y("h4", null, [
1187
- b(re, null, {
1188
- default: m(() => [
1189
- b(r(K))
1125
+ default: z(() => [
1126
+ B("h4", null, [
1127
+ R(_e, null, {
1128
+ default: z(() => [
1129
+ R(f(Ce))
1190
1130
  ]),
1191
1131
  _: 1
1192
1132
  }),
1193
- F(" \u663E\u793A\u5B57\u6BB5\u7B5B\u9009 ")
1133
+ h[5] || (h[5] = G(" 显示字段筛选 "))
1194
1134
  ]),
1195
- (o(!0), g(N, null, H(_.value, (t) => (o(), g("p", null, [
1196
- b(de, {
1197
- modelValue: t.check,
1198
- "onUpdate:modelValue": (h) => t.check = h,
1199
- label: t.label,
1200
- value: t.label,
1201
- disabled: !t.filter,
1135
+ (r(!0), P(Q, null, ie(M.value, (e) => (r(), P("p", null, [
1136
+ R(ve, {
1137
+ modelValue: e.check,
1138
+ "onUpdate:modelValue": (w) => e.check = w,
1139
+ label: e.label,
1140
+ value: e.label,
1141
+ disabled: !e.filter,
1202
1142
  size: "small"
1203
1143
  }, null, 8, ["modelValue", "onUpdate:modelValue", "label", "value", "disabled"])
1204
1144
  ]))), 256)),
1205
- b(L, {
1145
+ R(J, {
1206
1146
  type: "primary",
1207
1147
  size: "small",
1208
1148
  style: { "margin-top": "10px", "margin-left": "5px" },
1209
- onClick: ae
1149
+ onClick: de
1210
1150
  }, {
1211
- default: m(() => [
1212
- F("\u786E\u8BA4")
1213
- ]),
1214
- _: 1
1151
+ default: z(() => h[6] || (h[6] = [
1152
+ G("确认")
1153
+ ])),
1154
+ _: 1,
1155
+ __: [6]
1215
1156
  })
1216
1157
  ]),
1217
1158
  _: 1
1218
- }, 512)) : p("v-if", !0)
1159
+ }, 512)) : b("", !0)
1219
1160
  ]),
1220
- default: m((t) => [
1221
- w(d.$slots, "row-operate-front", {
1222
- row: t.row
1161
+ default: z((e) => [
1162
+ H(l.$slots, "row-operate-front", {
1163
+ row: e == null ? void 0 : e.row
1223
1164
  }, void 0, !0),
1224
- e.edit ? (o(), f(L, {
1165
+ l.edit ? (r(), v(J, {
1225
1166
  key: 0,
1226
1167
  link: "",
1227
1168
  type: "primary",
1228
- size: e.rowButtonSize,
1229
- icon: r(st),
1230
- onClick: (h) => I(t.row)
1169
+ size: l.rowButtonSize,
1170
+ icon: f(al),
1171
+ onClick: (w) => A(e == null ? void 0 : e.row)
1231
1172
  }, {
1232
- default: m(() => [
1233
- F("\u4FEE\u6539")
1234
- ]),
1235
- _: 2
1236
- }, 1032, ["size", "icon", "onClick"])) : p("v-if", !0),
1237
- w(d.$slots, "row-operate-middle", {
1238
- row: t.row
1173
+ default: z(() => h[7] || (h[7] = [
1174
+ G("修改")
1175
+ ])),
1176
+ _: 2,
1177
+ __: [7]
1178
+ }, 1032, ["size", "icon", "onClick"])) : b("", !0),
1179
+ H(l.$slots, "row-operate-middle", {
1180
+ row: e == null ? void 0 : e.row
1239
1181
  }, void 0, !0),
1240
- e.delete ? (o(), f(ce, {
1182
+ l.delete ? (r(), v(ye, {
1241
1183
  key: 1,
1242
- "confirm-button-text": "\u5426",
1243
- "cancel-button-text": "\u662F",
1184
+ "confirm-button-text": "",
1185
+ "cancel-button-text": "",
1244
1186
  "confirm-button-type": "text",
1245
1187
  "cancel-button-type": "danger",
1246
- icon: r(je),
1188
+ icon: f(je),
1247
1189
  width: "auto",
1248
- onCancel: (h) => Z(t.row),
1249
- title: e.deleteTitle ? e.deleteTitle : "\u662F\u5426\u8981\u5220\u9664\u5F53\u524D\u884C\uFF1F"
1190
+ onCancel: (w) => Z(e == null ? void 0 : e.row),
1191
+ title: l.deleteTitle ? l.deleteTitle : "是否要删除当前行?"
1250
1192
  }, {
1251
- reference: m(() => [
1252
- b(L, {
1193
+ reference: z(() => [
1194
+ R(J, {
1253
1195
  link: "",
1254
1196
  type: "danger",
1255
- size: e.rowButtonSize,
1256
- icon: r(Ze)
1197
+ size: l.rowButtonSize,
1198
+ icon: f(ll)
1257
1199
  }, {
1258
- default: m(() => [
1259
- F("\u5220\u9664")
1260
- ]),
1261
- _: 1
1200
+ default: z(() => h[8] || (h[8] = [
1201
+ G("删除")
1202
+ ])),
1203
+ _: 1,
1204
+ __: [8]
1262
1205
  }, 8, ["size", "icon"])
1263
1206
  ]),
1264
1207
  _: 2
1265
- }, 1032, ["icon", "onCancel", "title"])) : p("v-if", !0),
1266
- w(d.$slots, "row-operate", {
1267
- row: t.row
1208
+ }, 1032, ["icon", "onCancel", "title"])) : b("", !0),
1209
+ H(l.$slots, "row-operate", {
1210
+ row: e == null ? void 0 : e.row
1268
1211
  }, void 0, !0)
1269
1212
  ]),
1270
1213
  _: 3
1271
- }, 8, ["width", "fixed"])) : p("v-if", !0)
1214
+ }, 8, ["width", "fixed"])) : b("", !0)
1272
1215
  ]),
1273
1216
  _: 3
1274
1217
  }, 8, ["data", "class", "max-height", "size", "stripe", "border", "highlight-current-row", "header-cell-style"]),
1275
- y("div", Gt, [
1276
- e.pagination ? (o(), f(he, {
1218
+ B("div", Bl, [
1219
+ l.pagination ? (r(), v(ze, {
1277
1220
  key: 0,
1278
- "current-page": r(n).pageIndex,
1279
- "onUpdate:current-page": c[1] || (c[1] = (t) => r(n).pageIndex = t),
1280
- "page-size": r(n).pageSize,
1281
- "onUpdate:page-size": c[2] || (c[2] = (t) => r(n).pageSize = t),
1282
- small: e.small,
1283
- "hide-on-Single-page": e.hideOnSinglePage,
1221
+ "current-page": f(a).pageIndex,
1222
+ "onUpdate:currentPage": h[1] || (h[1] = (e) => f(a).pageIndex = e),
1223
+ "page-size": f(a).pageSize,
1224
+ "onUpdate:pageSize": h[2] || (h[2] = (e) => f(a).pageSize = e),
1225
+ small: l.small,
1226
+ "hide-on-Single-page": l.hideOnSinglePage,
1284
1227
  background: "",
1285
1228
  layout: "prev, pager, next, total, jumper, sizes",
1286
1229
  "page-sizes": [5, 10, 20, 50],
1287
- total: e.total,
1230
+ total: l.total,
1288
1231
  class: "mt-4"
1289
- }, null, 8, ["current-page", "page-size", "small", "hide-on-Single-page", "total"])) : p("v-if", !0)
1232
+ }, null, 8, ["current-page", "page-size", "small", "hide-on-Single-page", "total"])) : b("", !0)
1290
1233
  ])
1291
1234
  ], 64);
1292
1235
  };
1293
1236
  }
1294
1237
  });
1295
- const Kt = /* @__PURE__ */ D(jt, [["__scopeId", "data-v-f4c855de"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/TableForm/index.vue"]]), Jt = {
1296
- install: (e) => {
1297
- e.component("SplitPanes", Ce), e.component("Pane", Fe), e.component("UpLoadFile", qt), e.component("Layout", Wt), e.component("TableForm", Kt), e.component("UpLoadFiles", Rt);
1238
+ const El = /* @__PURE__ */ se(Ll, [["__scopeId", "data-v-b417a1fd"]]), $l = { class: "dialog" }, Wl = ["innerHTML"], Rl = { class: "form" }, Me = !0, Fl = /* @__PURE__ */ F({
1239
+ __name: "index",
1240
+ props: /* @__PURE__ */ Se({
1241
+ title: { default: "弹出框" },
1242
+ width: { default: "500px" },
1243
+ fullscreen: { type: Boolean, default: !1 },
1244
+ draggable: { type: Boolean, default: !0 },
1245
+ footer: { type: Boolean, default: !0 },
1246
+ buttonSize: { default: "default" },
1247
+ loading: { type: Boolean, default: !1 },
1248
+ rules: { default: () => {
1249
+ } },
1250
+ formSize: { default: "default" },
1251
+ lableWidth: { default: "120px" }
1252
+ }, {
1253
+ form: { default: {} },
1254
+ formModifiers: {}
1255
+ }),
1256
+ emits: /* @__PURE__ */ Se(["close", "submit"], ["update:form"]),
1257
+ setup(d, { emit: m }) {
1258
+ const c = m, s = Ne(d, "form"), S = T(!1), a = T();
1259
+ function C() {
1260
+ c("close");
1261
+ }
1262
+ function E() {
1263
+ a.value.validate((g) => {
1264
+ g && c("submit");
1265
+ });
1266
+ }
1267
+ return (g, M) => {
1268
+ const U = k("el-icon"), L = k("el-input"), $ = k("el-input-number"), W = k("el-option"), N = k("el-select"), I = k("el-date-picker"), x = k("el-time-picker"), A = k("el-switch"), Z = k("el-form-item"), j = k("el-form"), ae = k("el-button"), de = k("el-dialog");
1269
+ return r(), P("div", $l, [
1270
+ R(de, {
1271
+ modelValue: Me,
1272
+ "onUpdate:modelValue": M[1] || (M[1] = (i) => Me = i),
1273
+ width: g.width,
1274
+ fullscreen: S.value,
1275
+ "close-on-click-modal": !1,
1276
+ "close-on-press-escape": !1,
1277
+ draggable: g.draggable,
1278
+ onClose: C,
1279
+ overflow: ""
1280
+ }, Be({
1281
+ header: z(() => [
1282
+ B("span", { innerHTML: g.title }, null, 8, Wl),
1283
+ g.fullscreen ? (r(), v(U, {
1284
+ key: 0,
1285
+ class: "fullscreen",
1286
+ onClick: M[0] || (M[0] = (i) => S.value = !S.value)
1287
+ }, {
1288
+ default: z(() => [
1289
+ S.value ? b("", !0) : (r(), v(f(rl), { key: 0 })),
1290
+ S.value ? (r(), v(f(dl), { key: 1 })) : b("", !0)
1291
+ ]),
1292
+ _: 1
1293
+ })) : b("", !0)
1294
+ ]),
1295
+ default: z(() => [
1296
+ H(g.$slots, "header", {}, void 0, !0),
1297
+ B("div", Rl, [
1298
+ R(j, {
1299
+ model: s.value,
1300
+ rules: g.rules,
1301
+ ref_key: "formRef",
1302
+ ref: a,
1303
+ inline: !0,
1304
+ "label-width": g.lableWidth,
1305
+ size: g.formSize
1306
+ }, {
1307
+ default: z(() => [
1308
+ (r(!0), P(Q, null, ie(s.value, (i, l, h) => (r(), v(Z, {
1309
+ key: h,
1310
+ label: i.label,
1311
+ prop: l,
1312
+ style: D("width:" + (i.width ? i.width : "90%"))
1313
+ }, {
1314
+ default: z(() => [
1315
+ !i.type || i.type == "text" ? (r(), v(L, {
1316
+ key: 0,
1317
+ modelValue: s.value[l].default,
1318
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1319
+ clearable: "",
1320
+ disabled: i.disabled,
1321
+ readonly: i.readonly,
1322
+ placeholder: i.placeholder ? i.placeholder : "请输入" + i.label,
1323
+ style: { width: "100%" }
1324
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "readonly", "placeholder"])) : b("", !0),
1325
+ i.type == "number" ? (r(), v($, {
1326
+ key: 1,
1327
+ modelValue: s.value[l].default,
1328
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1329
+ clearable: "",
1330
+ disabled: i.disabled,
1331
+ readonly: i.readonly,
1332
+ style: { width: "100%" },
1333
+ placeholder: i.placeholder ? i.placeholder : "请输入" + i.label,
1334
+ max: i.max != null ? i.max : 1 / 0,
1335
+ min: i.min != null ? i.min : -1 / 0,
1336
+ step: i.step != null ? i.step : 1
1337
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "readonly", "placeholder", "max", "min", "step"])) : b("", !0),
1338
+ i.type == "select" ? (r(), v(N, {
1339
+ key: 2,
1340
+ modelValue: s.value[l].default,
1341
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1342
+ clearable: "",
1343
+ filterable: "",
1344
+ disabled: i.disabled,
1345
+ multiple: i.multiple,
1346
+ "collapse-tags": i.omit,
1347
+ placeholder: i.placeholder ? i.placeholder : "请选择" + i.label,
1348
+ style: { width: "100%" }
1349
+ }, {
1350
+ default: z(() => [
1351
+ (r(!0), P(Q, null, ie(i.options, (y) => (r(), v(W, {
1352
+ label: y.label ? y.label : y.value,
1353
+ value: y.value,
1354
+ disabled: y.disabled
1355
+ }, null, 8, ["label", "value", "disabled"]))), 256))
1356
+ ]),
1357
+ _: 2
1358
+ }, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "multiple", "collapse-tags", "placeholder"])) : b("", !0),
1359
+ i.type == "date" ? (r(), v(I, {
1360
+ key: 3,
1361
+ modelValue: s.value[l].default,
1362
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1363
+ type: "date",
1364
+ placeholder: i.placeholder ? i.placeholder : "请选择日期",
1365
+ disabled: i.disabled,
1366
+ readonly: i.readonly,
1367
+ style: { width: "100%" }
1368
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "readonly"])) : b("", !0),
1369
+ i.type == "time" ? (r(), v(x, {
1370
+ key: 4,
1371
+ modelValue: s.value[l].default,
1372
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1373
+ "arrow-control": "",
1374
+ placeholder: i.placeholder ? i.placeholder : "请选择时间",
1375
+ disabled: i.disabled,
1376
+ readonly: i.readonly,
1377
+ style: { width: "100%" }
1378
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "readonly"])) : b("", !0),
1379
+ i.type == "datetime" ? (r(), v(I, {
1380
+ key: 5,
1381
+ modelValue: s.value[l].default,
1382
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1383
+ type: "datetime",
1384
+ placeholder: i.placeholder ? i.placeholder : "请选择日期时间",
1385
+ disabled: i.disabled,
1386
+ readonly: i.readonly,
1387
+ style: { width: "100%" }
1388
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "readonly"])) : b("", !0),
1389
+ i.type == "daterange" ? (r(), v(I, {
1390
+ key: 6,
1391
+ modelValue: s.value[l].default,
1392
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1393
+ type: "daterange",
1394
+ "range-separator": "-",
1395
+ "start-placeholder": i.placeholder ? i.placeholder.split("&&")[0] : "请选择开始日期",
1396
+ "end-placeholder": i.placeholder ? i.placeholder.split("&&")[1] : "请选择结束日期",
1397
+ disabled: i.disabled,
1398
+ readonly: i.readonly,
1399
+ style: { width: "100%" }
1400
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled", "readonly"])) : b("", !0),
1401
+ i.type == "timerange" ? (r(), v(x, {
1402
+ key: 7,
1403
+ modelValue: s.value[l].default,
1404
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1405
+ "is-range": "",
1406
+ "arrow-control": "",
1407
+ "range-separator": "-",
1408
+ "start-placeholder": i.placeholder ? i.placeholder.split("&&")[0] : "请选择开始时间",
1409
+ "end-placeholder": i.placeholder ? i.placeholder.split("&&")[1] : "请选择结束时间",
1410
+ disabled: i.disabled,
1411
+ readonly: i.readonly,
1412
+ style: { width: "100%" }
1413
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled", "readonly"])) : b("", !0),
1414
+ i.type == "datetimerange" ? (r(), v(I, {
1415
+ key: 8,
1416
+ modelValue: s.value[l].default,
1417
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1418
+ type: "datetimerange",
1419
+ "range-separator": "-",
1420
+ "start-placeholder": i.placeholder ? i.placeholder.split("&&")[0] : "请选择开始日期时间",
1421
+ "end-placeholder": i.placeholder ? i.placeholder.split("&&")[1] : "请选择结束日期时间",
1422
+ disabled: i.disabled,
1423
+ readonly: i.readonly,
1424
+ style: { width: "100%" }
1425
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled", "readonly"])) : b("", !0),
1426
+ i.type == "switch" ? (r(), v(A, {
1427
+ key: 9,
1428
+ modelValue: s.value[l].default,
1429
+ "onUpdate:modelValue": (y) => s.value[l].default = y,
1430
+ "active-text": i.openText,
1431
+ "inactive-text": i.closeText,
1432
+ disabled: i.disabled,
1433
+ style: { width: "100%" }
1434
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "active-text", "inactive-text", "disabled"])) : b("", !0)
1435
+ ]),
1436
+ _: 2
1437
+ }, 1032, ["label", "prop", "style"]))), 128))
1438
+ ]),
1439
+ _: 1
1440
+ }, 8, ["model", "rules", "label-width", "size"])
1441
+ ]),
1442
+ H(g.$slots, "footer", {}, void 0, !0)
1443
+ ]),
1444
+ _: 2
1445
+ }, [
1446
+ g.footer ? {
1447
+ name: "footer",
1448
+ fn: z(() => [
1449
+ R(ae, {
1450
+ type: "primary",
1451
+ size: g.buttonSize,
1452
+ icon: f(Ke),
1453
+ class: "btn",
1454
+ loading: g.loading,
1455
+ onClick: E
1456
+ }, {
1457
+ default: z(() => [
1458
+ G(re(g.loading ? "提交中" : "提交"), 1)
1459
+ ]),
1460
+ _: 1
1461
+ }, 8, ["size", "icon", "loading"]),
1462
+ R(ae, {
1463
+ type: "info",
1464
+ size: g.buttonSize,
1465
+ icon: f(Le),
1466
+ class: "btn",
1467
+ onClick: C
1468
+ }, {
1469
+ default: z(() => M[2] || (M[2] = [
1470
+ G("取消")
1471
+ ])),
1472
+ _: 1,
1473
+ __: [2]
1474
+ }, 8, ["size", "icon"])
1475
+ ]),
1476
+ key: "0"
1477
+ } : void 0
1478
+ ]), 1032, ["width", "fullscreen", "draggable"])
1479
+ ]);
1480
+ };
1481
+ }
1482
+ });
1483
+ const Il = /* @__PURE__ */ se(Fl, [["__scopeId", "data-v-98c59677"]]);
1484
+ function Dl(d, m, c) {
1485
+ return m.default == null || m.default.toString() == "" ? c(new Error(m.label + "不能为空")) : c();
1486
+ }
1487
+ const Nl = {
1488
+ install: (d) => {
1489
+ d.component("SplitPanes", Ge), d.component("Pane", qe), d.component("UpLoadFile", gl), d.component("Layout", Sl), d.component("TableForm", El), d.component("UpLoadFiles", Vl), d.component("DvDialog", Il);
1298
1490
  }
1299
1491
  };
1300
1492
  export {
1301
- Wt as Layout,
1302
- Fe as Pane,
1303
- Ce as SplitPanes,
1304
- Kt as TableForm,
1305
- qt as UpLoadFile,
1306
- Rt as UpLoadFiles,
1307
- Jt as default
1493
+ Il as DvDialog,
1494
+ Dl as FormValidate,
1495
+ Sl as Layout,
1496
+ qe as Pane,
1497
+ Ge as SplitPanes,
1498
+ El as TableForm,
1499
+ gl as UpLoadFile,
1500
+ Vl as UpLoadFiles,
1501
+ Nl as default
1308
1502
  };