@web-utils/component 4.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/dictionary.DsN-2ukC.mjs +70 -0
- package/chunks/{form-input.B8z37eqj.mjs → form-input.BsT_5fuJ.mjs} +1 -1
- package/chunks/{form-item.D-H-wCPE.mjs → form-item.CLZf7hCo.mjs} +6 -6
- package/form-cascader/index.mjs +10 -10
- package/form-checkbox/index.mjs +4 -4
- package/form-checkbox-group/index.mjs +8 -8
- package/form-date-picker/index.mjs +1 -1
- package/form-input/index.mjs +7 -7
- package/form-input-cron-expression/index.mjs +7 -7
- package/form-input-email/index.mjs +6 -6
- package/form-input-id-card/index.mjs +7 -7
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +10 -10
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +9 -9
- package/form-item/index.mjs +1 -1
- package/form-radio-group/index.mjs +8 -8
- package/form-select/index.mjs +6 -6
- package/form-switch/index.mjs +6 -6
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-textarea/index.mjs +6 -6
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/package.json +1 -1
- package/pageable-table/index.mjs +197 -162
- package/pageable-table/style.css +1 -1
- package/picker-table-view/index.mjs +14 -14
- package/table-column/index.mjs +112 -58
- package/web-types.json +1 -1
package/table-column/index.mjs
CHANGED
|
@@ -1,9 +1,63 @@
|
|
|
1
|
-
import { _ } from "../chunks/helper.BiMLcEEk.mjs";
|
|
2
|
-
import { h as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { _ as T } from "../chunks/helper.BiMLcEEk.mjs";
|
|
2
|
+
import { h as d } from "vue";
|
|
3
|
+
import { g as C } from "../chunks/dictionary.DsN-2ukC.mjs";
|
|
4
|
+
import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
import { f as V } from "../chunks/core.DJEgjQW6.mjs";
|
|
6
|
+
const D = {
|
|
7
|
+
name: "DictRender",
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
props: {
|
|
10
|
+
row: Object,
|
|
11
|
+
column: Object,
|
|
12
|
+
dictType: String,
|
|
13
|
+
options: Array,
|
|
14
|
+
treeDict: Boolean,
|
|
15
|
+
idAsValue: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
},
|
|
19
|
+
labelAsValue: Boolean
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
label: ""
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
computed: {
|
|
27
|
+
value() {
|
|
28
|
+
return this.row[this.column.property];
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
watch: {
|
|
32
|
+
value: {
|
|
33
|
+
immediate: !0,
|
|
34
|
+
async handler() {
|
|
35
|
+
var l, e;
|
|
36
|
+
this.dictType ? this.label = await C(this.dictType, this.value, !0, {
|
|
37
|
+
treeDict: this.treeDict,
|
|
38
|
+
idAsValue: this.idAsValue,
|
|
39
|
+
labelAsValue: this.labelAsValue
|
|
40
|
+
}) : this.label = ((e = (l = this.options) == null ? void 0 : l.find((t) => `${t.value}` == `${this.value}`)) == null ? void 0 : e.label) ?? `${this.value}`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
render() {
|
|
45
|
+
return d("span", T([{}, {
|
|
46
|
+
on: this.$listeners
|
|
47
|
+
}, {}, {
|
|
48
|
+
domProps: this.$attrs
|
|
49
|
+
}]), [this.label]);
|
|
50
|
+
}
|
|
51
|
+
}, F = null, O = null;
|
|
52
|
+
var $ = /* @__PURE__ */ B(
|
|
53
|
+
D,
|
|
54
|
+
F,
|
|
55
|
+
O,
|
|
56
|
+
!1,
|
|
57
|
+
null,
|
|
58
|
+
null
|
|
59
|
+
);
|
|
60
|
+
const x = $.exports, N = {
|
|
7
61
|
props: {
|
|
8
62
|
type: {
|
|
9
63
|
type: String,
|
|
@@ -55,8 +109,8 @@ const x = {
|
|
|
55
109
|
default() {
|
|
56
110
|
return ["ascending", "descending", null];
|
|
57
111
|
},
|
|
58
|
-
validator(
|
|
59
|
-
return
|
|
112
|
+
validator(l) {
|
|
113
|
+
return l.every((e) => ["ascending", "descending", null].indexOf(e) > -1);
|
|
60
114
|
}
|
|
61
115
|
},
|
|
62
116
|
dictType: String,
|
|
@@ -69,103 +123,103 @@ const x = {
|
|
|
69
123
|
},
|
|
70
124
|
labelAsValue: Boolean
|
|
71
125
|
}
|
|
72
|
-
},
|
|
126
|
+
}, M = {
|
|
73
127
|
selection: !0,
|
|
74
128
|
"single-selection": !0,
|
|
75
129
|
index: !0,
|
|
76
130
|
expand: !0
|
|
77
|
-
},
|
|
131
|
+
}, k = (l, e, t, y, p) => {
|
|
78
132
|
var i;
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
let
|
|
83
|
-
for (;
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
86
|
-
|
|
133
|
+
const n = l.rowDbClick || ((i = l.$children.find((f) => f.$options.name === "TableView")) == null ? void 0 : i.rowDbClick);
|
|
134
|
+
n == null || n(e, t, y, p);
|
|
135
|
+
}, H = (l) => {
|
|
136
|
+
let e = l.target;
|
|
137
|
+
for (; e && e.tagName.toUpperCase() !== "HTML"; ) {
|
|
138
|
+
if (e.tagName.toUpperCase() === "TD")
|
|
139
|
+
return e;
|
|
140
|
+
e = e.parentNode;
|
|
87
141
|
}
|
|
88
142
|
return null;
|
|
89
|
-
},
|
|
90
|
-
},
|
|
143
|
+
}, P = () => {
|
|
144
|
+
}, R = (l) => !V(l).length, U = {
|
|
91
145
|
name: "TableColumn",
|
|
92
146
|
functional: !0,
|
|
93
|
-
mixins: [
|
|
94
|
-
render(
|
|
95
|
-
data:
|
|
96
|
-
props:
|
|
147
|
+
mixins: [N],
|
|
148
|
+
render(l, {
|
|
149
|
+
data: e,
|
|
150
|
+
props: t,
|
|
97
151
|
children: y,
|
|
98
|
-
parent:
|
|
152
|
+
parent: p,
|
|
99
153
|
listeners: {
|
|
100
|
-
click:
|
|
154
|
+
click: n
|
|
101
155
|
}
|
|
102
156
|
}) {
|
|
103
157
|
const {
|
|
104
158
|
scopedSlots: i,
|
|
105
159
|
...f
|
|
106
|
-
} =
|
|
107
|
-
clickable:
|
|
160
|
+
} = e, {
|
|
161
|
+
clickable: v,
|
|
108
162
|
cellClick: a,
|
|
109
163
|
...b
|
|
110
|
-
} =
|
|
164
|
+
} = t, g = {
|
|
111
165
|
...i || {}
|
|
112
|
-
},
|
|
113
|
-
if (!
|
|
114
|
-
const
|
|
115
|
-
(c ||
|
|
166
|
+
}, _ = M[t.type];
|
|
167
|
+
if (!_) {
|
|
168
|
+
const m = i == null ? void 0 : i.default, c = v || n || a;
|
|
169
|
+
(c || t.dictType || t.options) && (g.default = (A) => {
|
|
116
170
|
const {
|
|
117
171
|
row: o,
|
|
118
172
|
column: r
|
|
119
|
-
} =
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
} :
|
|
123
|
-
let s =
|
|
124
|
-
return
|
|
173
|
+
} = A, S = c ? (u) => {
|
|
174
|
+
const h = H(u);
|
|
175
|
+
n || a ? (n == null || n(o, r, o, r, h, u), a == null || a(o, r, o, r, h, u)) : k(p, o, r, h, u);
|
|
176
|
+
} : P;
|
|
177
|
+
let s = m == null ? void 0 : m(A);
|
|
178
|
+
return R(s) && (s = null), (t.dictType || t.options) && !s ? d(x, {
|
|
125
179
|
class: {
|
|
126
180
|
"is-clickable": c
|
|
127
181
|
},
|
|
128
182
|
on: {
|
|
129
|
-
click:
|
|
183
|
+
click: S
|
|
130
184
|
},
|
|
131
185
|
attrs: {
|
|
132
186
|
row: o,
|
|
133
187
|
column: r,
|
|
134
|
-
dictType:
|
|
135
|
-
treeDict:
|
|
136
|
-
idAsValue:
|
|
137
|
-
labelAsValue:
|
|
138
|
-
options:
|
|
188
|
+
dictType: t.dictType,
|
|
189
|
+
treeDict: t.treeDict,
|
|
190
|
+
idAsValue: t.idAsValue,
|
|
191
|
+
labelAsValue: t.labelAsValue,
|
|
192
|
+
options: t.options
|
|
139
193
|
}
|
|
140
|
-
}) : c ?
|
|
194
|
+
}) : c ? d("span", {
|
|
141
195
|
class: "is-clickable",
|
|
142
196
|
on: {
|
|
143
|
-
click:
|
|
197
|
+
click: S
|
|
144
198
|
}
|
|
145
199
|
}, [s || (o == null ? void 0 : o[r == null ? void 0 : r.property])]) : s;
|
|
146
200
|
});
|
|
147
201
|
}
|
|
148
|
-
const
|
|
202
|
+
const w = {
|
|
149
203
|
...f,
|
|
150
204
|
props: {
|
|
151
205
|
...b,
|
|
152
|
-
showOverflowTooltip:
|
|
206
|
+
showOverflowTooltip: _ ? !1 : b.showOverflowTooltip
|
|
153
207
|
}
|
|
154
208
|
};
|
|
155
|
-
return
|
|
156
|
-
scopedSlots:
|
|
209
|
+
return d("ElTableColumn", T([{}, w, {
|
|
210
|
+
scopedSlots: g
|
|
157
211
|
}]));
|
|
158
212
|
}
|
|
159
|
-
},
|
|
160
|
-
var
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
213
|
+
}, j = null, z = null;
|
|
214
|
+
var E = /* @__PURE__ */ B(
|
|
215
|
+
U,
|
|
216
|
+
j,
|
|
217
|
+
z,
|
|
164
218
|
!1,
|
|
165
219
|
null,
|
|
166
220
|
null
|
|
167
221
|
);
|
|
168
|
-
const
|
|
222
|
+
const X = E.exports;
|
|
169
223
|
export {
|
|
170
|
-
|
|
224
|
+
X as default
|
|
171
225
|
};
|