dld-vue-ui 0.0.9 → 0.1.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,5 +1,5 @@
1
- import { h as E, openBlock as u, createElementBlock as m, normalizeStyle as v, renderSlot as f, defineComponent as x, createBlock as w, unref as d, withCtx as p, createElementVNode as c, ref as b, onMounted as k, resolveComponent as N, createVNode as g, createTextVNode as y, withDirectives as $, vShow as R, toDisplayString as M } from "vue";
2
- const D = {
1
+ import { h as Y, openBlock as r, createElementBlock as y, normalizeStyle as _, renderSlot as g, defineComponent as k, createBlock as h, unref as d, withCtx as m, createElementVNode as x, ref as J, onMounted as R, resolveComponent as v, createVNode as b, createTextVNode as F, withDirectives as X, vShow as K, toDisplayString as D, useSlots as T, createCommentVNode as u, reactive as Q, Fragment as N, normalizeClass as w, renderList as L } from "vue";
2
+ const Z = {
3
3
  name: "splitpanes",
4
4
  emits: ["ready", "resize", "resized", "pane-click", "pane-maximize", "pane-add", "pane-remove", "splitter-click"],
5
5
  props: {
@@ -36,7 +36,7 @@ const D = {
36
36
  return this.panes.length;
37
37
  },
38
38
  indexedPanes() {
39
- return this.panes.reduce((e, t) => (e[t.id] = t) && e, {});
39
+ return this.panes.reduce((e, a) => (e[a.id] = a) && e, {});
40
40
  }
41
41
  },
42
42
  methods: {
@@ -53,178 +53,178 @@ const D = {
53
53
  unbindEvents() {
54
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
55
  },
56
- onMouseDown(e, t) {
57
- this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = t;
56
+ onMouseDown(e, a) {
57
+ this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = a;
58
58
  },
59
59
  onMouseMove(e) {
60
- this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size }))));
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
61
  },
62
62
  onMouseUp() {
63
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
64
  this.touch.dragging = !1, this.unbindEvents();
65
65
  }, 100);
66
66
  },
67
- onSplitterClick(e, t) {
68
- "ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === t ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, t), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = t, this.splitterTaps.timeoutId = setTimeout(() => {
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
69
  this.splitterTaps.splitter = null;
70
- }, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[t]);
70
+ }, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[a]);
71
71
  },
72
- onSplitterDblClick(e, t) {
73
- let n = 0;
74
- this.panes = this.panes.map((s, i) => (s.size = i === t ? s.max : s.min, i !== t && (n += s.min), s)), this.panes[t].size -= n, this.$emit("pane-maximize", this.panes[t]), this.$emit("resized", this.panes.map((s) => ({ min: s.min, max: s.max, size: s.size })));
72
+ onSplitterDblClick(e, a) {
73
+ let s = 0;
74
+ this.panes = this.panes.map((n, i) => (n.size = i === a ? n.max : n.min, i !== a && (s += n.min), n)), this.panes[a].size -= s, this.$emit("pane-maximize", this.panes[a]), this.$emit("resized", this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })));
75
75
  },
76
- onPaneClick(e, t) {
77
- this.$emit("pane-click", this.indexedPanes[t]);
76
+ onPaneClick(e, a) {
77
+ this.$emit("pane-click", this.indexedPanes[a]);
78
78
  },
79
79
  getCurrentMouseDrag(e) {
80
- const t = this.container.getBoundingClientRect(), { clientX: n, clientY: s } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
80
+ const a = this.container.getBoundingClientRect(), { clientX: s, clientY: n } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
81
81
  return {
82
- x: n - t.left,
83
- y: s - t.top
82
+ x: s - a.left,
83
+ y: n - a.top
84
84
  };
85
85
  },
86
86
  getCurrentDragPercentage(e) {
87
87
  e = e[this.horizontal ? "y" : "x"];
88
- const t = this.container[this.horizontal ? "clientHeight" : "clientWidth"];
89
- return this.rtl && !this.horizontal && (e = t - e), e * 100 / t;
88
+ const a = this.container[this.horizontal ? "clientHeight" : "clientWidth"];
89
+ return this.rtl && !this.horizontal && (e = a - e), e * 100 / a;
90
90
  },
91
91
  calculatePanesSize(e) {
92
- const t = this.touch.activeSplitter;
93
- let n = {
94
- prevPanesSize: this.sumPrevPanesSize(t),
95
- nextPanesSize: this.sumNextPanesSize(t),
92
+ const a = this.touch.activeSplitter;
93
+ let s = {
94
+ prevPanesSize: this.sumPrevPanesSize(a),
95
+ nextPanesSize: this.sumNextPanesSize(a),
96
96
  prevReachedMinPanes: 0,
97
97
  nextReachedMinPanes: 0
98
98
  };
99
- const s = 0 + (this.pushOtherPanes ? 0 : n.prevPanesSize), i = 100 - (this.pushOtherPanes ? 0 : n.nextPanesSize), a = Math.max(Math.min(this.getCurrentDragPercentage(e), i), s);
100
- let o = [t, t + 1], r = this.panes[o[0]] || null, l = this.panes[o[1]] || null;
101
- const h = r.max < 100 && a >= r.max + n.prevPanesSize, P = l.max < 100 && a <= 100 - (l.max + this.sumNextPanesSize(t + 1));
102
- if (h || P) {
103
- h ? (r.size = r.max, l.size = Math.max(100 - r.max - n.prevPanesSize - n.nextPanesSize, 0)) : (r.size = Math.max(100 - l.max - n.prevPanesSize - this.sumNextPanesSize(t + 1), 0), l.size = l.max);
99
+ const n = 0 + (this.pushOtherPanes ? 0 : s.prevPanesSize), i = 100 - (this.pushOtherPanes ? 0 : s.nextPanesSize), l = Math.max(Math.min(this.getCurrentDragPercentage(e), i), n);
100
+ let o = [a, a + 1], f = this.panes[o[0]] || null, z = this.panes[o[1]] || null;
101
+ const P = f.max < 100 && l >= f.max + s.prevPanesSize, $ = z.max < 100 && l <= 100 - (z.max + this.sumNextPanesSize(a + 1));
102
+ if (P || $) {
103
+ P ? (f.size = f.max, z.size = Math.max(100 - f.max - s.prevPanesSize - s.nextPanesSize, 0)) : (f.size = Math.max(100 - z.max - s.prevPanesSize - this.sumNextPanesSize(a + 1), 0), z.size = z.max);
104
104
  return;
105
105
  }
106
106
  if (this.pushOtherPanes) {
107
- const z = this.doPushOtherPanes(n, a);
108
- if (!z)
107
+ const C = this.doPushOtherPanes(s, l);
108
+ if (!C)
109
109
  return;
110
- ({ sums: n, panesToResize: o } = z), r = this.panes[o[0]] || null, l = this.panes[o[1]] || null;
110
+ ({ sums: s, panesToResize: o } = C), f = this.panes[o[0]] || null, z = this.panes[o[1]] || null;
111
111
  }
112
- r !== null && (r.size = Math.min(Math.max(a - n.prevPanesSize - n.prevReachedMinPanes, r.min), r.max)), l !== null && (l.size = Math.min(Math.max(100 - a - n.nextPanesSize - n.nextReachedMinPanes, l.min), l.max));
113
- },
114
- doPushOtherPanes(e, t) {
115
- const n = this.touch.activeSplitter, s = [n, n + 1];
116
- return t < e.prevPanesSize + this.panes[s[0]].min && (s[0] = this.findPrevExpandedPane(n).index, e.prevReachedMinPanes = 0, s[0] < n && this.panes.forEach((i, a) => {
117
- a > s[0] && a <= n && (i.size = i.min, e.prevReachedMinPanes += i.min);
118
- }), e.prevPanesSize = this.sumPrevPanesSize(s[0]), s[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((i, a) => {
119
- a > 0 && a <= n && (i.size = i.min, e.prevReachedMinPanes += i.min);
120
- }), this.panes[s[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : t > 100 - e.nextPanesSize - this.panes[s[1]].min && (s[1] = this.findNextExpandedPane(n).index, e.nextReachedMinPanes = 0, s[1] > n + 1 && this.panes.forEach((i, a) => {
121
- a > n && a < s[1] && (i.size = i.min, e.nextReachedMinPanes += i.min);
122
- }), e.nextPanesSize = this.sumNextPanesSize(s[1] - 1), s[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((i, a) => {
123
- a < this.panesCount - 1 && a >= n + 1 && (i.size = i.min, e.nextReachedMinPanes += i.min);
124
- }), this.panes[s[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: s };
112
+ f !== null && (f.size = Math.min(Math.max(l - s.prevPanesSize - s.prevReachedMinPanes, f.min), f.max)), z !== null && (z.size = Math.min(Math.max(100 - l - s.nextPanesSize - s.nextReachedMinPanes, z.min), z.max));
113
+ },
114
+ doPushOtherPanes(e, a) {
115
+ const s = this.touch.activeSplitter, n = [s, s + 1];
116
+ return a < e.prevPanesSize + this.panes[n[0]].min && (n[0] = this.findPrevExpandedPane(s).index, e.prevReachedMinPanes = 0, n[0] < s && this.panes.forEach((i, l) => {
117
+ l > n[0] && l <= s && (i.size = i.min, e.prevReachedMinPanes += i.min);
118
+ }), e.prevPanesSize = this.sumPrevPanesSize(n[0]), n[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((i, l) => {
119
+ l > 0 && l <= s && (i.size = i.min, e.prevReachedMinPanes += i.min);
120
+ }), this.panes[n[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : a > 100 - e.nextPanesSize - this.panes[n[1]].min && (n[1] = this.findNextExpandedPane(s).index, e.nextReachedMinPanes = 0, n[1] > s + 1 && this.panes.forEach((i, l) => {
121
+ l > s && l < n[1] && (i.size = i.min, e.nextReachedMinPanes += i.min);
122
+ }), e.nextPanesSize = this.sumNextPanesSize(n[1] - 1), n[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((i, l) => {
123
+ l < this.panesCount - 1 && l >= s + 1 && (i.size = i.min, e.nextReachedMinPanes += i.min);
124
+ }), this.panes[n[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: n };
125
125
  },
126
126
  sumPrevPanesSize(e) {
127
- return this.panes.reduce((t, n, s) => t + (s < e ? n.size : 0), 0);
127
+ return this.panes.reduce((a, s, n) => a + (n < e ? s.size : 0), 0);
128
128
  },
129
129
  sumNextPanesSize(e) {
130
- return this.panes.reduce((t, n, s) => t + (s > e + 1 ? n.size : 0), 0);
130
+ return this.panes.reduce((a, s, n) => a + (n > e + 1 ? s.size : 0), 0);
131
131
  },
132
132
  findPrevExpandedPane(e) {
133
- return [...this.panes].reverse().find((t) => t.index < e && t.size > t.min) || {};
133
+ return [...this.panes].reverse().find((a) => a.index < e && a.size > a.min) || {};
134
134
  },
135
135
  findNextExpandedPane(e) {
136
- return this.panes.find((t) => t.index > e + 1 && t.size > t.min) || {};
136
+ return this.panes.find((a) => a.index > e + 1 && a.size > a.min) || {};
137
137
  },
138
138
  checkSplitpanesNodes() {
139
139
  Array.from(this.container.children).forEach((e) => {
140
- const t = e.classList.contains("splitpanes__pane"), n = e.classList.contains("splitpanes__splitter");
141
- !t && !n && (e.parentNode.removeChild(e), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
140
+ const a = e.classList.contains("splitpanes__pane"), s = e.classList.contains("splitpanes__splitter");
141
+ !a && !s && (e.parentNode.removeChild(e), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
142
142
  });
143
143
  },
144
- addSplitter(e, t, n = !1) {
145
- const s = e - 1, i = document.createElement("div");
146
- i.classList.add("splitpanes__splitter"), n || (i.onmousedown = (a) => this.onMouseDown(a, s), typeof window < "u" && "ontouchstart" in window && (i.ontouchstart = (a) => this.onMouseDown(a, s)), i.onclick = (a) => this.onSplitterClick(a, s + 1)), this.dblClickSplitter && (i.ondblclick = (a) => this.onSplitterDblClick(a, s + 1)), t.parentNode.insertBefore(i, t);
144
+ addSplitter(e, a, s = !1) {
145
+ const n = e - 1, i = document.createElement("div");
146
+ i.classList.add("splitpanes__splitter"), s || (i.onmousedown = (l) => this.onMouseDown(l, n), typeof window < "u" && "ontouchstart" in window && (i.ontouchstart = (l) => this.onMouseDown(l, n)), i.onclick = (l) => this.onSplitterClick(l, n + 1)), this.dblClickSplitter && (i.ondblclick = (l) => this.onSplitterDblClick(l, n + 1)), a.parentNode.insertBefore(i, a);
147
147
  },
148
148
  removeSplitter(e) {
149
149
  e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.parentNode.removeChild(e);
150
150
  },
151
151
  redoSplitters() {
152
152
  const e = Array.from(this.container.children);
153
- e.forEach((n) => {
154
- n.className.includes("splitpanes__splitter") && this.removeSplitter(n);
153
+ e.forEach((s) => {
154
+ s.className.includes("splitpanes__splitter") && this.removeSplitter(s);
155
155
  });
156
- let t = 0;
157
- e.forEach((n) => {
158
- n.className.includes("splitpanes__pane") && (!t && this.firstSplitter ? this.addSplitter(t, n, !0) : t && this.addSplitter(t, n), t++);
156
+ let a = 0;
157
+ e.forEach((s) => {
158
+ s.className.includes("splitpanes__pane") && (!a && this.firstSplitter ? this.addSplitter(a, s, !0) : a && this.addSplitter(a, s), a++);
159
159
  });
160
160
  },
161
- requestUpdate({ target: e, ...t }) {
162
- const n = this.indexedPanes[e._.uid];
163
- Object.entries(t).forEach(([s, i]) => n[s] = i);
161
+ requestUpdate({ target: e, ...a }) {
162
+ const s = this.indexedPanes[e._.uid];
163
+ Object.entries(a).forEach(([n, i]) => s[n] = i);
164
164
  },
165
165
  onPaneAdd(e) {
166
- let t = -1;
167
- Array.from(e.$el.parentNode.children).some((i) => (i.className.includes("splitpanes__pane") && t++, i === e.$el));
168
- const n = parseFloat(e.minSize), s = parseFloat(e.maxSize);
169
- this.panes.splice(t, 0, {
166
+ let a = -1;
167
+ Array.from(e.$el.parentNode.children).some((i) => (i.className.includes("splitpanes__pane") && a++, i === e.$el));
168
+ const s = parseFloat(e.minSize), n = parseFloat(e.maxSize);
169
+ this.panes.splice(a, 0, {
170
170
  id: e._.uid,
171
- index: t,
172
- min: isNaN(n) ? 0 : n,
173
- max: isNaN(s) ? 100 : s,
171
+ index: a,
172
+ min: isNaN(s) ? 0 : s,
173
+ max: isNaN(n) ? 100 : n,
174
174
  size: e.size === null ? null : parseFloat(e.size),
175
175
  givenSize: e.size,
176
176
  update: e.update
177
- }), this.panes.forEach((i, a) => i.index = a), this.ready && this.$nextTick(() => {
178
- this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[t] }), this.$emit("pane-add", { index: t, panes: this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size })) });
177
+ }), this.panes.forEach((i, l) => i.index = l), this.ready && this.$nextTick(() => {
178
+ this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[a] }), this.$emit("pane-add", { index: a, panes: this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size })) });
179
179
  });
180
180
  },
181
181
  onPaneRemove(e) {
182
- const t = this.panes.findIndex((s) => s.id === e._.uid), n = this.panes.splice(t, 1)[0];
183
- this.panes.forEach((s, i) => s.index = i), this.$nextTick(() => {
184
- this.redoSplitters(), this.resetPaneSizes({ removedPane: { ...n, index: t } }), this.$emit("pane-remove", { removed: n, panes: this.panes.map((s) => ({ min: s.min, max: s.max, size: s.size })) });
182
+ const a = this.panes.findIndex((n) => n.id === e._.uid), s = this.panes.splice(a, 1)[0];
183
+ this.panes.forEach((n, i) => n.index = i), this.$nextTick(() => {
184
+ this.redoSplitters(), this.resetPaneSizes({ removedPane: { ...s, index: a } }), this.$emit("pane-remove", { removed: s, panes: this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })) });
185
185
  });
186
186
  },
187
187
  resetPaneSizes(e = {}) {
188
- !e.addedPane && !e.removedPane ? this.initialPanesSizing() : this.panes.some((t) => t.givenSize !== null || t.min || t.max < 100) ? this.equalizeAfterAddOrRemove(e) : this.equalize(), this.ready && this.$emit("resized", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size })));
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
189
  },
190
190
  equalize() {
191
191
  const e = 100 / this.panesCount;
192
- let t = 0;
193
- const n = [], s = [];
192
+ let a = 0;
193
+ const s = [], n = [];
194
194
  this.panes.forEach((i) => {
195
- i.size = Math.max(Math.min(e, i.max), i.min), t -= i.size, i.size >= i.max && n.push(i.id), i.size <= i.min && s.push(i.id);
196
- }), t > 0.1 && this.readjustSizes(t, n, s);
195
+ i.size = Math.max(Math.min(e, i.max), i.min), a -= i.size, i.size >= i.max && s.push(i.id), i.size <= i.min && n.push(i.id);
196
+ }), a > 0.1 && this.readjustSizes(a, s, n);
197
197
  },
198
198
  initialPanesSizing() {
199
199
  let e = 100;
200
- const t = [], n = [];
201
- let s = 0;
202
- this.panes.forEach((a) => {
203
- e -= a.size, a.size !== null && s++, a.size >= a.max && t.push(a.id), a.size <= a.min && n.push(a.id);
200
+ const a = [], s = [];
201
+ let n = 0;
202
+ this.panes.forEach((l) => {
203
+ e -= l.size, l.size !== null && n++, l.size >= l.max && a.push(l.id), l.size <= l.min && s.push(l.id);
204
204
  });
205
205
  let i = 100;
206
- e > 0.1 && (this.panes.forEach((a) => {
207
- a.size === null && (a.size = Math.max(Math.min(e / (this.panesCount - s), a.max), a.min)), i -= a.size;
208
- }), i > 0.1 && this.readjustSizes(e, t, n));
209
- },
210
- equalizeAfterAddOrRemove({ addedPane: e, removedPane: t } = {}) {
211
- let n = 100 / this.panesCount, s = 0;
212
- const i = [], a = [];
213
- e && e.givenSize !== null && (n = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((o) => {
214
- s -= o.size, o.size >= o.max && i.push(o.id), o.size <= o.min && a.push(o.id);
215
- }), !(Math.abs(s) < 0.1) && (this.panes.forEach((o) => {
216
- e && e.givenSize !== null && e.id === o.id || (o.size = Math.max(Math.min(n, o.max), o.min)), s -= o.size, o.size >= o.max && i.push(o.id), o.size <= o.min && a.push(o.id);
217
- }), s > 0.1 && this.readjustSizes(s, i, a));
218
- },
219
- readjustSizes(e, t, n) {
220
- let s;
221
- e > 0 ? s = e / (this.panesCount - t.length) : s = e / (this.panesCount - n.length), this.panes.forEach((i, a) => {
222
- if (e > 0 && !t.includes(i.id)) {
223
- const o = Math.max(Math.min(i.size + s, i.max), i.min), r = o - i.size;
224
- e -= r, i.size = o;
225
- } else if (!n.includes(i.id)) {
226
- const o = Math.max(Math.min(i.size + s, i.max), i.min), r = o - i.size;
227
- e -= r, i.size = o;
206
+ e > 0.1 && (this.panes.forEach((l) => {
207
+ l.size === null && (l.size = Math.max(Math.min(e / (this.panesCount - n), l.max), l.min)), i -= l.size;
208
+ }), i > 0.1 && this.readjustSizes(e, a, s));
209
+ },
210
+ equalizeAfterAddOrRemove({ addedPane: e, removedPane: a } = {}) {
211
+ let s = 100 / this.panesCount, n = 0;
212
+ const i = [], l = [];
213
+ e && e.givenSize !== null && (s = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((o) => {
214
+ n -= o.size, o.size >= o.max && i.push(o.id), o.size <= o.min && l.push(o.id);
215
+ }), !(Math.abs(n) < 0.1) && (this.panes.forEach((o) => {
216
+ e && e.givenSize !== null && e.id === o.id || (o.size = Math.max(Math.min(s, o.max), o.min)), n -= o.size, o.size >= o.max && i.push(o.id), o.size <= o.min && l.push(o.id);
217
+ }), n > 0.1 && this.readjustSizes(n, i, l));
218
+ },
219
+ readjustSizes(e, a, s) {
220
+ let n;
221
+ e > 0 ? n = e / (this.panesCount - a.length) : n = e / (this.panesCount - s.length), this.panes.forEach((i, l) => {
222
+ if (e > 0 && !a.includes(i.id)) {
223
+ const o = Math.max(Math.min(i.size + n, i.max), i.min), f = o - i.size;
224
+ e -= f, i.size = o;
225
+ } else if (!s.includes(i.id)) {
226
+ const o = Math.max(Math.min(i.size + n, i.max), i.min), f = o - i.size;
227
+ e -= f, i.size = o;
228
228
  }
229
229
  i.update({
230
230
  [this.horizontal ? "height" : "width"]: `${this.indexedPanes[i.id].size}%`
@@ -249,8 +249,8 @@ const D = {
249
249
  this.redoSplitters();
250
250
  },
251
251
  dblClickSplitter(e) {
252
- [...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t, n) => {
253
- t.ondblclick = e ? (s) => this.onSplitterDblClick(s, n) : void 0;
252
+ [...this.container.querySelectorAll(".splitpanes__splitter")].forEach((a, s) => {
253
+ a.ondblclick = e ? (n) => this.onSplitterDblClick(n, s) : void 0;
254
254
  });
255
255
  }
256
256
  },
@@ -261,7 +261,7 @@ const D = {
261
261
  this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0;
262
262
  },
263
263
  render() {
264
- return E(
264
+ return Y(
265
265
  "div",
266
266
  {
267
267
  ref: "container",
@@ -276,12 +276,12 @@ const D = {
276
276
  this.$slots.default()
277
277
  );
278
278
  }
279
- }, T = (e, t) => {
280
- const n = e.__vccOpts || e;
281
- for (const [s, i] of t)
282
- n[s] = i;
283
- return n;
284
- }, q = {
279
+ }, ee = (e, a) => {
280
+ const s = e.__vccOpts || e;
281
+ for (const [n, i] of a)
282
+ s[n] = i;
283
+ return s;
284
+ }, te = {
285
285
  name: "pane",
286
286
  inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"],
287
287
  props: {
@@ -326,113 +326,191 @@ const D = {
326
326
  }
327
327
  }
328
328
  };
329
- function O(e, t, n, s, i, a) {
330
- return u(), m("div", {
329
+ function ae(e, a, s, n, i, l) {
330
+ return r(), y("div", {
331
331
  class: "splitpanes__pane",
332
- onClick: t[0] || (t[0] = (o) => a.onPaneClick(o, e._.uid)),
333
- style: v(e.style)
332
+ onClick: a[0] || (a[0] = (o) => l.onPaneClick(o, e._.uid)),
333
+ style: _(e.style)
334
334
  }, [
335
- f(e.$slots, "default")
335
+ g(e.$slots, "default")
336
336
  ], 4);
337
337
  }
338
- const U = /* @__PURE__ */ T(q, [["render", O]]);
339
- const L = /* @__PURE__ */ x({
338
+ const ne = /* @__PURE__ */ ee(te, [["render", ae]]);
339
+ const se = /* @__PURE__ */ k({
340
340
  __name: "index",
341
341
  props: {
342
342
  styles: { type: Object, required: !1, default: () => ({ width: "100%", height: "100%" }) },
343
343
  horizontal: { type: Boolean, required: !1, default: !1 }
344
344
  },
345
345
  setup(e) {
346
- return (t, n) => (u(), w(d(D), {
346
+ return (a, s) => (r(), h(d(Z), {
347
347
  horizontal: e.horizontal,
348
- style: v(e.styles),
348
+ style: _(e.styles),
349
349
  class: "splitpanes"
350
350
  }, {
351
- default: p(() => [
352
- f(t.$slots, "default", {}, void 0, !0)
351
+ default: m(() => [
352
+ g(a.$slots, "default", {}, void 0, !0)
353
353
  ]),
354
354
  _: 3
355
355
  }, 8, ["horizontal", "style"]));
356
356
  }
357
357
  });
358
- const _ = (e, t) => {
359
- const n = e.__vccOpts || e;
360
- for (const [s, i] of t)
361
- n[s] = i;
362
- return n;
363
- }, A = /* @__PURE__ */ _(L, [["__scopeId", "data-v-4226b5d2"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/SplitPanes/index.vue"]]), F = /* @__PURE__ */ x({
358
+ const M = (e, a) => {
359
+ const s = e.__vccOpts || e;
360
+ for (const [n, i] of a)
361
+ s[n] = i;
362
+ return s;
363
+ }, ie = /* @__PURE__ */ M(se, [["__scopeId", "data-v-4226b5d2"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/SplitPanes/index.vue"]]), le = /* @__PURE__ */ k({
364
364
  __name: "pane",
365
365
  props: {
366
366
  styles: { type: Object, required: !0, default: () => ({ background: "#ececec" }) }
367
367
  },
368
368
  setup(e) {
369
- return (t, n) => (u(), w(d(U), {
370
- style: v(e.styles)
369
+ return (a, s) => (r(), h(d(ne), {
370
+ style: _(e.styles)
371
371
  }, {
372
- default: p(() => [
373
- f(t.$slots, "default")
372
+ default: m(() => [
373
+ g(a.$slots, "default")
374
374
  ]),
375
375
  _: 3
376
376
  }, 8, ["style"]));
377
377
  }
378
- }), B = /* @__PURE__ */ _(F, [["__file", "D:/Code/front/dld-vue-ui/src/packages/SplitPanes/pane.vue"]]);
378
+ }), oe = /* @__PURE__ */ M(le, [["__file", "D:/Code/front/dld-vue-ui/src/packages/SplitPanes/pane.vue"]]);
379
379
  /*! Element Plus Icons Vue v2.0.10 */
380
- var C = (e, t) => {
381
- let n = e.__vccOpts || e;
382
- for (let [s, i] of t)
383
- n[s] = i;
384
- return n;
385
- }, j = {
380
+ var S = (e, a) => {
381
+ let s = e.__vccOpts || e;
382
+ for (let [n, i] of a)
383
+ s[n] = i;
384
+ return s;
385
+ }, re = {
386
+ name: "CircleClose"
387
+ }, de = {
388
+ viewBox: "0 0 1024 1024",
389
+ xmlns: "http://www.w3.org/2000/svg"
390
+ }, ue = /* @__PURE__ */ x("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), ce = /* @__PURE__ */ x("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), he = [
397
+ ue,
398
+ ce
399
+ ];
400
+ function pe(e, a, s, n, i, l) {
401
+ return r(), y("svg", de, he);
402
+ }
403
+ var me = /* @__PURE__ */ S(re, [["render", pe], ["__file", "circle-close.vue"]]), fe = {
404
+ name: "DeleteFilled"
405
+ }, ve = {
406
+ viewBox: "0 0 1024 1024",
407
+ xmlns: "http://www.w3.org/2000/svg"
408
+ }, _e = /* @__PURE__ */ x("path", {
409
+ fill: "currentColor",
410
+ 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"
411
+ }, null, -1), ze = [
412
+ _e
413
+ ];
414
+ function ye(e, a, s, n, i, l) {
415
+ return r(), y("svg", ve, ze);
416
+ }
417
+ var xe = /* @__PURE__ */ S(fe, [["render", ye], ["__file", "delete-filled.vue"]]), ge = {
418
+ name: "Delete"
419
+ }, we = {
420
+ viewBox: "0 0 1024 1024",
421
+ xmlns: "http://www.w3.org/2000/svg"
422
+ }, be = /* @__PURE__ */ x("path", {
423
+ fill: "currentColor",
424
+ 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"
425
+ }, null, -1), Se = [
426
+ be
427
+ ];
428
+ function Pe(e, a, s, n, i, l) {
429
+ return r(), y("svg", we, Se);
430
+ }
431
+ var Fe = /* @__PURE__ */ S(ge, [["render", Pe], ["__file", "delete.vue"]]), Ce = {
432
+ name: "Edit"
433
+ }, Ee = {
434
+ viewBox: "0 0 1024 1024",
435
+ xmlns: "http://www.w3.org/2000/svg"
436
+ }, ke = /* @__PURE__ */ x("path", {
437
+ fill: "currentColor",
438
+ 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"
439
+ }, null, -1), Me = /* @__PURE__ */ x("path", {
440
+ fill: "currentColor",
441
+ 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"
442
+ }, null, -1), $e = [
443
+ ke,
444
+ Me
445
+ ];
446
+ function Ve(e, a, s, n, i, l) {
447
+ return r(), y("svg", Ee, $e);
448
+ }
449
+ var Be = /* @__PURE__ */ S(Ce, [["render", Ve], ["__file", "edit.vue"]]), qe = {
386
450
  name: "FolderOpened"
387
- }, I = {
451
+ }, De = {
388
452
  viewBox: "0 0 1024 1024",
389
453
  xmlns: "http://www.w3.org/2000/svg"
390
- }, H = /* @__PURE__ */ c("path", {
454
+ }, Ne = /* @__PURE__ */ x("path", {
391
455
  fill: "currentColor",
392
456
  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"
393
- }, null, -1), G = [
394
- H
457
+ }, null, -1), Ue = [
458
+ Ne
459
+ ];
460
+ function Le(e, a, s, n, i, l) {
461
+ return r(), y("svg", De, Ue);
462
+ }
463
+ var Re = /* @__PURE__ */ S(qe, [["render", Le], ["__file", "folder-opened.vue"]]), Te = {
464
+ name: "Search"
465
+ }, We = {
466
+ viewBox: "0 0 1024 1024",
467
+ xmlns: "http://www.w3.org/2000/svg"
468
+ }, He = /* @__PURE__ */ x("path", {
469
+ fill: "currentColor",
470
+ 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"
471
+ }, null, -1), Ae = [
472
+ He
395
473
  ];
396
- function V(e, t, n, s, i, a) {
397
- return u(), m("svg", I, G);
474
+ function Ie(e, a, s, n, i, l) {
475
+ return r(), y("svg", We, Ae);
398
476
  }
399
- var Y = /* @__PURE__ */ C(j, [["render", V], ["__file", "folder-opened.vue"]]), J = {
477
+ var Oe = /* @__PURE__ */ S(Te, [["render", Ie], ["__file", "search.vue"]]), Ge = {
400
478
  name: "Upload"
401
- }, W = {
479
+ }, je = {
402
480
  viewBox: "0 0 1024 1024",
403
481
  xmlns: "http://www.w3.org/2000/svg"
404
- }, X = /* @__PURE__ */ c("path", {
482
+ }, Ye = /* @__PURE__ */ x("path", {
405
483
  fill: "currentColor",
406
484
  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"
407
- }, null, -1), K = [
408
- X
485
+ }, null, -1), Je = [
486
+ Ye
409
487
  ];
410
- function Q(e, t, n, s, i, a) {
411
- return u(), m("svg", W, K);
488
+ function Xe(e, a, s, n, i, l) {
489
+ return r(), y("svg", je, Je);
412
490
  }
413
- var Z = /* @__PURE__ */ C(J, [["render", Q], ["__file", "upload.vue"]]), ee = function() {
414
- function e(t) {
415
- if (!t)
491
+ var Ke = /* @__PURE__ */ S(Ge, [["render", Xe], ["__file", "upload.vue"]]), Qe = function() {
492
+ function e(a) {
493
+ if (!a)
416
494
  throw new TypeError("Invalid argument; `value` has no value.");
417
- this.value = e.EMPTY, t && e.isGuid(t) && (this.value = t);
495
+ this.value = e.EMPTY, a && e.isGuid(a) && (this.value = a);
418
496
  }
419
- return e.isGuid = function(t) {
420
- var n = t.toString();
421
- return t && (t instanceof e || e.validator.test(n));
497
+ return e.isGuid = function(a) {
498
+ var s = a.toString();
499
+ return a && (a instanceof e || e.validator.test(s));
422
500
  }, e.create = function() {
423
501
  return new e([e.gen(2), e.gen(1), e.gen(1), e.gen(1), e.gen(3)].join("-"));
424
502
  }, e.createEmpty = function() {
425
503
  return new e("emptyguid");
426
- }, e.parse = function(t) {
427
- return new e(t);
504
+ }, e.parse = function(a) {
505
+ return new e(a);
428
506
  }, e.raw = function() {
429
507
  return [e.gen(2), e.gen(1), e.gen(1), e.gen(1), e.gen(3)].join("-");
430
- }, e.gen = function(t) {
431
- for (var n = "", s = 0; s < t; s++)
432
- n += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
433
- return n;
434
- }, e.prototype.equals = function(t) {
435
- return e.isGuid(t) && this.value === t.toString();
508
+ }, e.gen = function(a) {
509
+ for (var s = "", n = 0; n < a; n++)
510
+ s += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
511
+ return s;
512
+ }, e.prototype.equals = function(a) {
513
+ return e.isGuid(a) && this.value === a.toString();
436
514
  }, e.prototype.isEmpty = function() {
437
515
  return this.value === e.EMPTY;
438
516
  }, e.prototype.toString = function() {
@@ -442,82 +520,497 @@ var Z = /* @__PURE__ */ C(J, [["render", Q], ["__file", "upload.vue"]]), ee = fu
442
520
  value: this.value
443
521
  };
444
522
  }, 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;
445
- }(), te = ee;
446
- const ie = { style: {} }, ne = ["id"], se = { class: "filename" }, ae = /* @__PURE__ */ x({
523
+ }(), Ze = Qe;
524
+ const et = { style: {} }, tt = ["id"], at = { class: "filename" }, nt = /* @__PURE__ */ k({
447
525
  __name: "index",
448
526
  props: {
449
527
  size: { type: String, required: !1, default: "default" },
450
528
  name: { type: String, required: !1, default: "\u4E0A\u4F20\u6587\u4EF6" },
451
- icon: { type: null, required: !1, default: Z },
529
+ icon: { type: null, required: !1, default: Ke },
452
530
  type: { type: null, required: !1, default: "success" }
453
531
  },
454
532
  emits: ["upload"],
455
- setup(e, { expose: t, emit: n }) {
456
- let s = te.create().toString(), i, a = b("");
533
+ setup(e, { expose: a, emit: s }) {
534
+ let n = Ze.create().toString(), i, l = J("");
457
535
  function o() {
458
536
  i.click();
459
537
  }
460
- function r() {
461
- a.value = i.value;
538
+ function f() {
539
+ l.value = i.value;
462
540
  }
463
- function l() {
464
- i.files !== null && n("upload", i.files[0]);
541
+ function z() {
542
+ i.files !== null && s("upload", i.files[0]);
465
543
  }
466
- function h() {
467
- i.value = "", a.value = "";
544
+ function P() {
545
+ i.value = "", l.value = "";
468
546
  }
469
- return k(() => {
470
- i = document.getElementById(s);
471
- }), t({
472
- Clear: h
473
- }), (P, z) => {
474
- const S = N("el-button");
475
- return u(), m("div", ie, [
476
- g(S, {
547
+ return R(() => {
548
+ i = document.getElementById(n);
549
+ }), a({
550
+ Clear: P
551
+ }), ($, C) => {
552
+ const p = v("el-button");
553
+ return r(), y("div", et, [
554
+ b(p, {
477
555
  type: e.type,
478
- icon: d(Y),
556
+ icon: d(Re),
479
557
  size: e.size,
480
558
  class: "btn",
481
559
  onClick: o
482
560
  }, {
483
- default: p(() => [
484
- y("\u9009\u62E9\u6587\u4EF6")
561
+ default: m(() => [
562
+ F("\u9009\u62E9\u6587\u4EF6")
485
563
  ]),
486
564
  _: 1
487
565
  }, 8, ["type", "icon", "size"]),
488
- $(c("input", {
566
+ X(x("input", {
489
567
  type: "file",
490
- id: d(s),
491
- onChange: r
492
- }, null, 40, ne), [
493
- [R, !1]
568
+ id: d(n),
569
+ onChange: f
570
+ }, null, 40, tt), [
571
+ [K, !1]
494
572
  ]),
495
- c("span", se, M(d(a)), 1),
496
- g(S, {
573
+ x("span", at, D(d(l)), 1),
574
+ b(p, {
497
575
  type: e.type,
498
576
  icon: e.icon,
499
577
  size: e.size,
500
- disabled: d(a) == null || d(a) == "",
578
+ disabled: d(l) == null || d(l) == "",
501
579
  class: "btn",
502
- onClick: l
580
+ title: d(l) == null || d(l) == "" ? "\u8BF7\u9009\u62E9\u6587\u4EF6" : "",
581
+ onClick: z
503
582
  }, {
504
- default: p(() => [
505
- y(M(e.name), 1)
583
+ default: m(() => [
584
+ F(D(e.name), 1)
506
585
  ]),
507
586
  _: 1
508
- }, 8, ["type", "icon", "size", "disabled"])
587
+ }, 8, ["type", "icon", "size", "disabled", "title"])
509
588
  ]);
510
589
  };
511
590
  }
512
591
  });
513
- const oe = /* @__PURE__ */ _(ae, [["__scopeId", "data-v-83b9cdd7"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/UpLoadFile/index.vue"]]), le = {
592
+ const st = /* @__PURE__ */ M(nt, [["__scopeId", "data-v-83b9cdd7"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/UpLoadFile/index.vue"]]), it = /* @__PURE__ */ k({
593
+ __name: "index",
594
+ props: {
595
+ asideWidth: { type: Number, required: !1, default: 220 },
596
+ headerMaxHeight: { type: Number, required: !1, default: 60 },
597
+ horizontal: { type: Boolean, required: !1, default: !1 }
598
+ },
599
+ setup(e) {
600
+ const a = T();
601
+ return (s, n) => {
602
+ const i = v("el-aside"), l = v("el-header"), o = v("el-main"), f = v("el-container");
603
+ return r(), h(f, { class: "container" }, {
604
+ default: m(() => [
605
+ d(a).aside && !e.horizontal ? (r(), h(i, {
606
+ key: 0,
607
+ class: "aside",
608
+ style: _("width: " + e.asideWidth + "px;")
609
+ }, {
610
+ default: m(() => [
611
+ g(s.$slots, "aside", {}, void 0, !0)
612
+ ]),
613
+ _: 3
614
+ }, 8, ["style"])) : u("v-if", !0),
615
+ d(a).header && e.horizontal ? (r(), h(l, {
616
+ key: 1,
617
+ class: "inside_header",
618
+ style: _("height: " + e.headerMaxHeight + "px;")
619
+ }, {
620
+ default: m(() => [
621
+ g(s.$slots, "header", {}, void 0, !0)
622
+ ]),
623
+ _: 3
624
+ }, 8, ["style"])) : u("v-if", !0),
625
+ b(o, { class: "main" }, {
626
+ default: m(() => [
627
+ b(f, { class: "inside_container" }, {
628
+ default: m(() => [
629
+ d(a).header && !e.horizontal ? (r(), h(l, {
630
+ key: 0,
631
+ class: "inside_header",
632
+ style: _("height: " + e.headerMaxHeight + "px;")
633
+ }, {
634
+ default: m(() => [
635
+ g(s.$slots, "header", {}, void 0, !0)
636
+ ]),
637
+ _: 3
638
+ }, 8, ["style"])) : u("v-if", !0),
639
+ d(a).aside && e.horizontal ? (r(), h(i, {
640
+ key: 1,
641
+ class: "aside",
642
+ style: _("width: " + e.asideWidth + "px;")
643
+ }, {
644
+ default: m(() => [
645
+ g(s.$slots, "aside", {}, void 0, !0)
646
+ ]),
647
+ _: 3
648
+ }, 8, ["style"])) : u("v-if", !0),
649
+ b(o, { class: "inside_main" }, {
650
+ default: m(() => [
651
+ g(s.$slots, "default", {}, void 0, !0)
652
+ ]),
653
+ _: 3
654
+ })
655
+ ]),
656
+ _: 3
657
+ })
658
+ ]),
659
+ _: 3
660
+ })
661
+ ]),
662
+ _: 3
663
+ });
664
+ };
665
+ }
666
+ });
667
+ const lt = /* @__PURE__ */ M(it, [["__scopeId", "data-v-5d747d9d"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/Layout/index.vue"]]), ot = {
668
+ key: 0,
669
+ class: "header"
670
+ }, rt = { class: "header_title" }, dt = { class: "header_title" }, ut = /* @__PURE__ */ k({
671
+ __name: "index",
672
+ props: {
673
+ maxHeight: { type: Number, required: !1, default: 550 },
674
+ size: { type: String, required: !1, default: "default" },
675
+ tableData: { type: Array, required: !1, default: () => [] },
676
+ tableColumn: { type: Array, required: !1, default: () => [] },
677
+ stripe: { type: Boolean, required: !1, default: !0 },
678
+ border: { type: Boolean, required: !1, default: !1 },
679
+ highLight: { type: Boolean, required: !1, default: !1 },
680
+ type: { type: String, required: !1 },
681
+ typeLabel: { type: String, required: !1, default: "\u5E8F\u53F7" },
682
+ typeWidth: { type: Number, required: !1, default: 60 },
683
+ typeIsFixed: { type: Boolean, required: !1 },
684
+ operate: { type: Boolean, required: !1 },
685
+ operateLabel: { type: String, required: !1, default: "" },
686
+ operateWidth: { type: Number, required: !1, default: 220 },
687
+ operateIsFixed: { type: Boolean, required: !1 },
688
+ search: { type: Boolean, required: !1 },
689
+ clear: { type: Boolean, required: !1 },
690
+ edit: { type: Boolean, required: !1 },
691
+ delete: { type: Boolean, required: !1 },
692
+ deleteTitle: { type: String, required: !1 }
693
+ },
694
+ emits: ["row-click", "row-dblclick", "selection-change", "search", "clear", "delete", "edit"],
695
+ setup(e, { emit: a }) {
696
+ const s = e;
697
+ let n = Q({});
698
+ const i = T(), l = (p) => {
699
+ a("row-click", p);
700
+ }, o = (p) => {
701
+ a("row-click", p);
702
+ }, f = (p) => {
703
+ a("selection-change", p);
704
+ }, z = () => {
705
+ if (s.tableColumn.length > 0)
706
+ for (let p = 0; p < s.tableColumn.length; p++) {
707
+ let V = s.tableColumn[p];
708
+ n[V.prop] = null;
709
+ }
710
+ a("clear");
711
+ }, P = () => {
712
+ a("search", n);
713
+ }, $ = (p) => {
714
+ a("edit", p);
715
+ }, C = (p) => {
716
+ a("delete", p);
717
+ };
718
+ return R(() => {
719
+ if (s.tableColumn.length > 0)
720
+ for (let p = 0; p < s.tableColumn.length; p++) {
721
+ let V = s.tableColumn[p];
722
+ n[V.prop] = null;
723
+ }
724
+ }), (p, V) => {
725
+ const E = v("el-table-column"), W = v("el-input"), H = v("el-input-number"), A = v("el-option"), I = v("el-select"), B = v("el-date-picker"), U = v("el-time-picker"), O = v("el-switch"), q = v("el-button"), G = v("el-popconfirm"), j = v("el-table");
726
+ return r(), y(N, null, [
727
+ d(i).header ? (r(), y("div", ot, [
728
+ g(p.$slots, "header", {}, void 0, !0)
729
+ ])) : u("v-if", !0),
730
+ b(j, {
731
+ data: e.tableData,
732
+ class: w([e.size && e.size == "small" ? "mini-table" : "table"]),
733
+ "max-height": e.maxHeight,
734
+ size: e.size,
735
+ stripe: e.stripe,
736
+ border: e.border,
737
+ "highlight-current-row": e.highLight,
738
+ onRowClick: l,
739
+ onRowDblclick: o,
740
+ onSelectionChange: f
741
+ }, {
742
+ default: m(() => [
743
+ e.type && e.type == "index" ? (r(), h(E, {
744
+ key: 0,
745
+ align: "center",
746
+ type: "index",
747
+ width: e.typeWidth + "px",
748
+ fixed: e.typeIsFixed ? "left" : !1,
749
+ label: e.typeLabel
750
+ }, null, 8, ["width", "fixed", "label"])) : u("v-if", !0),
751
+ e.type == "selection" ? (r(), h(E, {
752
+ key: 1,
753
+ align: "center",
754
+ type: "selection",
755
+ width: e.typeWidth + "px",
756
+ fixed: e.typeIsFixed ? "left" : !1
757
+ }, null, 8, ["width", "fixed"])) : u("v-if", !0),
758
+ e.type == "expand" ? (r(), h(E, {
759
+ key: 2,
760
+ align: "center",
761
+ type: "expand",
762
+ width: e.typeWidth + "px",
763
+ fixed: e.typeIsFixed ? "left" : !1,
764
+ label: e.typeLabel
765
+ }, {
766
+ default: m((t) => [
767
+ g(p.$slots, "expand", {
768
+ row: t.row
769
+ }, void 0, !0)
770
+ ]),
771
+ _: 3
772
+ }, 8, ["width", "fixed", "label"])) : u("v-if", !0),
773
+ (r(!0), y(N, null, L(e.tableColumn, (t) => (r(), h(E, {
774
+ prop: t.prop,
775
+ width: (t.width ? t.width : 180) + "px",
776
+ fixed: t.fixed ? t.fixed : !1,
777
+ align: t.align ? t.align : "left"
778
+ }, {
779
+ header: m(() => [
780
+ x("div", rt, D(t.label), 1),
781
+ u(" \u6587\u672C\u641C\u7D22\u6846 "),
782
+ t.search && (!t.type || t.type == "text") ? (r(), h(W, {
783
+ key: 0,
784
+ modelValue: d(n)[t.prop],
785
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
786
+ size: t.size,
787
+ clearable: "",
788
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
789
+ disabled: t.disabled,
790
+ placeholder: t.placeholder ? t.placeholder : "\u8BF7\u8F93\u5165" + t.label,
791
+ class: w([t.align && t.align == "center" ? "center" : ""])
792
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "placeholder", "class"])) : u("v-if", !0),
793
+ u(" \u6570\u5B57\u6846\u641C\u7D22 "),
794
+ t.search && t.type == "number" ? (r(), h(H, {
795
+ key: 1,
796
+ modelValue: d(n)[t.prop],
797
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
798
+ size: t.size,
799
+ clearable: "",
800
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
801
+ disabled: t.disabled,
802
+ placeholder: t.placeholder ? t.placeholder : "\u8BF7\u8F93\u5165" + t.label,
803
+ class: w([t.align && t.align == "center" ? "center" : ""]),
804
+ max: t.max != null ? t.max : 1 / 0,
805
+ min: t.min != null ? t.min : -1 / 0,
806
+ step: t.step != null ? t.step : 1
807
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "placeholder", "class", "max", "min", "step"])) : u("v-if", !0),
808
+ u(" \u9009\u62E9\u641C\u7D22 "),
809
+ t.search && t.type == "select" ? (r(), h(I, {
810
+ key: 2,
811
+ modelValue: d(n)[t.prop],
812
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
813
+ size: t.size,
814
+ clearable: "",
815
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
816
+ disabled: t.disabled,
817
+ multiple: t.multiple,
818
+ "collapse-tags": t.omit,
819
+ placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9" + t.label,
820
+ class: w([t.align && t.align == "center" ? "center" : ""])
821
+ }, {
822
+ default: m(() => [
823
+ (r(!0), y(N, null, L(t.options, (c) => (r(), h(A, {
824
+ label: c.label ? c.label : c.value,
825
+ value: c.value,
826
+ disabled: c.disabled
827
+ }, null, 8, ["label", "value", "disabled"]))), 256))
828
+ ]),
829
+ _: 2
830
+ }, 1032, ["modelValue", "onUpdate:modelValue", "size", "style", "disabled", "multiple", "collapse-tags", "placeholder", "class"])) : u("v-if", !0),
831
+ u(" \u65E5\u671F\u9009\u62E9 "),
832
+ t.search && t.type == "date" ? (r(), h(B, {
833
+ key: 3,
834
+ modelValue: d(n)[t.prop],
835
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
836
+ type: "date",
837
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : ""),
838
+ placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9\u65E5\u671F",
839
+ size: t.size,
840
+ class: w([t.align && t.align == "center" ? "center" : ""])
841
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : u("v-if", !0),
842
+ u(" \u65F6\u95F4\u9009\u62E9 "),
843
+ t.search && t.type == "time" ? (r(), h(U, {
844
+ key: 4,
845
+ modelValue: d(n)[t.prop],
846
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
847
+ "arrow-control": "",
848
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
849
+ placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9\u65F6\u95F4",
850
+ size: t.size,
851
+ class: w([t.align && t.align == "center" ? "center" : ""])
852
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : u("v-if", !0),
853
+ u(" \u65E5\u671F\u65F6\u95F4\u641C\u7D22 "),
854
+ t.search && t.type == "datetime" ? (r(), h(B, {
855
+ key: 5,
856
+ modelValue: d(n)[t.prop],
857
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
858
+ type: "datetime",
859
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
860
+ placeholder: t.placeholder ? t.placeholder : "\u8BF7\u9009\u62E9\u65E5\u671F\u65F6\u95F4",
861
+ size: t.size,
862
+ class: w([t.align && t.align == "center" ? "center" : ""])
863
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "placeholder", "size", "class"])) : u("v-if", !0),
864
+ u(" \u65E5\u671F\u8303\u56F4\u9009\u62E9 "),
865
+ t.search && t.type == "daterange" ? (r(), h(B, {
866
+ key: 6,
867
+ modelValue: d(n)[t.prop],
868
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
869
+ type: "daterange",
870
+ "range-separator": "-",
871
+ "start-placeholder": t.placeholder ? t.placeholder.split("&&")[0] : "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
872
+ "end-placeholder": t.placeholder ? t.placeholder.split("&&")[1] : "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
873
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
874
+ size: t.size,
875
+ class: w([t.align && t.align == "center" ? "center" : ""])
876
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : u("v-if", !0),
877
+ u(" \u65F6\u95F4\u8303\u56F4\u9009\u62E9 "),
878
+ t.search && t.type == "timerange" ? (r(), h(U, {
879
+ key: 7,
880
+ modelValue: d(n)[t.prop],
881
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
882
+ "is-range": "",
883
+ "arrow-control": "",
884
+ "range-separator": "-",
885
+ "start-placeholder": t.placeholder ? t.placeholder.split("&&")[0] : "\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4",
886
+ "end-placeholder": t.placeholder ? t.placeholder.split("&&")[1] : "\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",
887
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
888
+ size: t.size,
889
+ class: w([t.align && t.align == "center" ? "center" : ""])
890
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : u("v-if", !0),
891
+ u(" \u65E5\u671F\u65F6\u95F4\u8303\u56F4\u9009\u62E9 "),
892
+ t.search && t.type == "datetimerange" ? (r(), h(B, {
893
+ key: 8,
894
+ modelValue: d(n)[t.prop],
895
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
896
+ type: "datetimerange",
897
+ "range-separator": "-",
898
+ "start-placeholder": t.placeholder ? t.placeholder.split("&&")[0] : "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F\u65F6\u95F4",
899
+ "end-placeholder": t.placeholder ? t.placeholder.split("&&")[1] : "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F\u65F6\u95F4",
900
+ style: _(t.searchWidth ? "width: " + t.searchWidth + "px;" : "width: 92%"),
901
+ size: t.size,
902
+ class: w([t.align && t.align == "center" ? "center" : ""])
903
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "style", "size", "class"])) : u("v-if", !0),
904
+ u(" \u5F00\u5173 "),
905
+ t.search && t.type == "switch" ? (r(), h(O, {
906
+ key: 9,
907
+ modelValue: d(n)[t.prop],
908
+ "onUpdate:modelValue": (c) => d(n)[t.prop] = c,
909
+ size: t.size,
910
+ "active-text": t.openText,
911
+ "inactive-text": t.closeText,
912
+ class: w([t.align && t.align == "center" ? "center" : ""])
913
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size", "active-text", "inactive-text", "class"])) : u("v-if", !0)
914
+ ]),
915
+ _: 2
916
+ }, 1032, ["prop", "width", "fixed", "align"]))), 256)),
917
+ e.operate ? (r(), h(E, {
918
+ key: 3,
919
+ align: "center",
920
+ width: e.operateWidth,
921
+ fixed: e.operateIsFixed ? "left" : !1
922
+ }, {
923
+ header: m(() => [
924
+ x("div", dt, D(e.operateLabel), 1),
925
+ e.search ? (r(), h(q, {
926
+ key: 0,
927
+ type: "primary",
928
+ size: "small",
929
+ icon: d(Oe),
930
+ onClick: P
931
+ }, {
932
+ default: m(() => [
933
+ F("\u641C\u7D22")
934
+ ]),
935
+ _: 1
936
+ }, 8, ["icon"])) : u("v-if", !0),
937
+ e.clear ? (r(), h(q, {
938
+ key: 1,
939
+ type: "info",
940
+ size: "small",
941
+ icon: d(me),
942
+ onClick: z
943
+ }, {
944
+ default: m(() => [
945
+ F("\u6E05\u7A7A")
946
+ ]),
947
+ _: 1
948
+ }, 8, ["icon"])) : u("v-if", !0),
949
+ g(p.$slots, "operate", {}, void 0, !0)
950
+ ]),
951
+ default: m((t) => [
952
+ e.edit ? (r(), h(q, {
953
+ key: 0,
954
+ link: "",
955
+ type: "primary",
956
+ size: "small",
957
+ icon: d(Be),
958
+ onClick: (c) => $(t.row)
959
+ }, {
960
+ default: m(() => [
961
+ F("\u4FEE\u6539")
962
+ ]),
963
+ _: 2
964
+ }, 1032, ["icon", "onClick"])) : u("v-if", !0),
965
+ e.delete ? (r(), h(G, {
966
+ key: 1,
967
+ "confirm-button-text": "\u5426",
968
+ "cancel-button-text": "\u662F",
969
+ "confirm-button-type": "text",
970
+ "cancel-button-type": "danger",
971
+ icon: d(xe),
972
+ width: "auto",
973
+ onCancel: (c) => C(t.row),
974
+ title: e.deleteTitle ? e.deleteTitle : "\u662F\u5426\u8981\u5220\u9664\u5F53\u524D\u884C\uFF1F"
975
+ }, {
976
+ reference: m(() => [
977
+ b(q, {
978
+ link: "",
979
+ type: "danger",
980
+ size: "small",
981
+ icon: d(Fe)
982
+ }, {
983
+ default: m(() => [
984
+ F("\u5220\u9664")
985
+ ]),
986
+ _: 1
987
+ }, 8, ["icon"])
988
+ ]),
989
+ _: 2
990
+ }, 1032, ["icon", "onCancel", "title"])) : u("v-if", !0),
991
+ g(p.$slots, "row-operate", {
992
+ row: t.row
993
+ }, void 0, !0)
994
+ ]),
995
+ _: 3
996
+ }, 8, ["width", "fixed"])) : u("v-if", !0)
997
+ ]),
998
+ _: 3
999
+ }, 8, ["data", "class", "max-height", "size", "stripe", "border", "highlight-current-row"])
1000
+ ], 64);
1001
+ };
1002
+ }
1003
+ });
1004
+ const ct = /* @__PURE__ */ M(ut, [["__scopeId", "data-v-f4c855de"], ["__file", "D:/Code/front/dld-vue-ui/src/packages/TableForm/index.vue"]]), pt = {
514
1005
  install: (e) => {
515
- e.component("SplitPanes", A), e.component("Pane", B), e.component("UpLoadFile", oe);
1006
+ e.component("SplitPanes", ie), e.component("Pane", oe), e.component("UpLoadFile", st), e.component("Layout", lt), e.component("TableForm", ct);
516
1007
  }
517
1008
  };
518
1009
  export {
519
- B as Pane,
520
- A as SplitPanes,
521
- oe as UpLoadFile,
522
- le as default
1010
+ lt as Layout,
1011
+ oe as Pane,
1012
+ ie as SplitPanes,
1013
+ ct as TableForm,
1014
+ st as UpLoadFile,
1015
+ pt as default
523
1016
  };