iking-web-ui-pro 0.3.1 → 0.3.2
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/dist/IkSelectTag/ik.index.es.js +141 -130
- package/dist/IkSelectTag/ik.index.umd.js +1 -1
- package/dist/IkSelectTag/iking-web-ui-pro.css +1 -1
- package/dist/IkStatu/ik.index.es.js +47 -38
- package/dist/IkStatu/ik.index.umd.js +1 -1
- package/dist/IkStatu/iking-web-ui-pro.css +1 -1
- package/dist/IkStatuOver/ik.index.es.js +114 -106
- package/dist/IkStatuOver/ik.index.umd.js +1 -1
- package/dist/IkStatuOver/iking-web-ui-pro.css +1 -1
- package/dist/IkTaskResume/ik.index.es.js +23 -0
- package/dist/IkTaskResume/ik.index.umd.js +1 -0
- package/dist/iking-web-ui-pro.css +1 -1
- package/dist/index.es.js +6151 -6125
- package/dist/index.umd.js +72 -72
- package/dist/src/components/IkStatu/index.d.ts +3 -3
- package/dist/src/components/IkStatu/src/index.vue.d.ts +3 -3
- package/dist/src/components/IkTaskResume/index.d.ts +2 -0
- package/dist/src/components/IkTaskResume/src/index.vue.d.ts +2 -0
- package/dist/src/components/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, computed as g, resolveComponent as C, openBlock as i, createBlock as b, normalizeClass as j, normalizeStyle as N, withCtx as m, createElementBlock as v, createCommentVNode as V, createTextVNode as x, toDisplayString as _, ref as D, Fragment as h, renderList as T, unref as W, mergeProps as S, createElementVNode as L, mergeModels as w, getCurrentInstance as P, useModel as M, withDirectives as z, createVNode as E, vShow as H, renderSlot as R } from "vue";
|
|
2
2
|
import { ikDom as F } from "iking-utils-pro";
|
|
3
|
-
const
|
|
4
|
-
for (const
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
const
|
|
8
|
-
for (const [
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
}, U = /* @__PURE__ */
|
|
3
|
+
const I = (l, f) => (l.install = (e) => {
|
|
4
|
+
for (const r of [l, ...Object.values({})])
|
|
5
|
+
e.component(r.name, r);
|
|
6
|
+
}, l), O = (l, f) => {
|
|
7
|
+
const e = l.__vccOpts || l;
|
|
8
|
+
for (const [r, n] of f)
|
|
9
|
+
e[r] = n;
|
|
10
|
+
return e;
|
|
11
|
+
}, U = /* @__PURE__ */ A({
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
14
14
|
title: {
|
|
@@ -17,7 +17,7 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
17
17
|
},
|
|
18
18
|
type: {
|
|
19
19
|
type: String,
|
|
20
|
-
default: ""
|
|
20
|
+
default: "primary"
|
|
21
21
|
},
|
|
22
22
|
// 传了type时,color和background不生效
|
|
23
23
|
// 文字颜色
|
|
@@ -36,7 +36,7 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
36
36
|
},
|
|
37
37
|
effect: {
|
|
38
38
|
type: String,
|
|
39
|
-
default: "
|
|
39
|
+
default: "plain"
|
|
40
40
|
},
|
|
41
41
|
disabled: {
|
|
42
42
|
type: Boolean,
|
|
@@ -66,45 +66,54 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
emits: ["close"],
|
|
69
|
-
setup(
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
setup(l, { emit: f }) {
|
|
70
|
+
const e = l, r = g(() => {
|
|
71
|
+
const o = e.type ? e.type === "danger" ? `var(--el-color-${e.type})` : {
|
|
72
|
+
color: `var(--ik-color-${e.type})`,
|
|
73
|
+
backgroundColor: `var(--ik-color-${e.type}-light)`
|
|
74
|
+
} : {
|
|
75
|
+
color: e.color,
|
|
76
|
+
backgroundColor: e.background,
|
|
77
|
+
border: "none"
|
|
78
|
+
};
|
|
79
|
+
if (e.effect === "plain" && e.type !== "danger")
|
|
80
|
+
o.backgroundColor = "transparent", o.borderColor = e.type ? `var(--ik-color-${e.type})` : e.color;
|
|
81
|
+
else if (e.effect === "dark" && e.type !== "danger") {
|
|
82
|
+
const y = e.type ? `var(--ik-color-${e.type})` : e.color;
|
|
83
|
+
o.backgroundColor = y, o.borderColor = y, o.color = "#fff";
|
|
84
|
+
}
|
|
85
|
+
return o;
|
|
86
|
+
}), n = f, s = () => {
|
|
87
|
+
n("close");
|
|
79
88
|
};
|
|
80
|
-
return (
|
|
81
|
-
const k =
|
|
82
|
-
return
|
|
83
|
-
effect:
|
|
84
|
-
class:
|
|
85
|
-
type:
|
|
86
|
-
style:
|
|
87
|
-
closable:
|
|
88
|
-
onClose:
|
|
89
|
+
return (o, y) => {
|
|
90
|
+
const k = C("el-tag");
|
|
91
|
+
return i(), b(k, {
|
|
92
|
+
effect: l.effect,
|
|
93
|
+
class: j(["ik-statu-tag", { disabled: l.disabled }]),
|
|
94
|
+
type: l.type,
|
|
95
|
+
style: N(r.value),
|
|
96
|
+
closable: o.$attrs.closable && !l.disabled,
|
|
97
|
+
onClose: s
|
|
89
98
|
}, {
|
|
90
|
-
default:
|
|
91
|
-
|
|
99
|
+
default: m(() => [
|
|
100
|
+
l.circle ? (i(), v(
|
|
92
101
|
"span",
|
|
93
102
|
{
|
|
94
103
|
key: 0,
|
|
95
104
|
class: "inline-block rounded-full",
|
|
96
|
-
style:
|
|
97
|
-
backgroundColor:
|
|
98
|
-
width: `${
|
|
99
|
-
height: `${
|
|
105
|
+
style: N({
|
|
106
|
+
backgroundColor: l.type ? l.type === "danger" ? `var(--el-color-${l.type})` : `var(--ik-color-${l.type})` : l.circleColor,
|
|
107
|
+
width: `${l.circleW}px`,
|
|
108
|
+
height: `${l.circleH}px`
|
|
100
109
|
})
|
|
101
110
|
},
|
|
102
111
|
null,
|
|
103
112
|
4
|
|
104
113
|
/* STYLE */
|
|
105
|
-
)) :
|
|
106
|
-
|
|
107
|
-
" " +
|
|
114
|
+
)) : V("v-if", !0),
|
|
115
|
+
x(
|
|
116
|
+
" " + _(l.title),
|
|
108
117
|
1
|
|
109
118
|
/* TEXT */
|
|
110
119
|
)
|
|
@@ -114,7 +123,7 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
114
123
|
}, 8, ["effect", "class", "type", "style", "closable"]);
|
|
115
124
|
};
|
|
116
125
|
}
|
|
117
|
-
}), q = /* @__PURE__ */
|
|
126
|
+
}), q = /* @__PURE__ */ O(U, [["__scopeId", "data-v-a3967db7"]]), B = I(q), G = /* @__PURE__ */ A({
|
|
118
127
|
__name: "index",
|
|
119
128
|
props: {
|
|
120
129
|
// 超出长度时以 +2 这样的方式显示
|
|
@@ -140,66 +149,65 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
140
149
|
}
|
|
141
150
|
},
|
|
142
151
|
emits: ["close"],
|
|
143
|
-
setup(
|
|
144
|
-
const
|
|
145
|
-
var
|
|
152
|
+
setup(l, { emit: f }) {
|
|
153
|
+
const e = l, r = g(() => Array.isArray(e.list) ? e.list : typeof e.list == "string" ? e.list.split(",").map((a, d) => {
|
|
154
|
+
var p;
|
|
146
155
|
return {
|
|
147
|
-
...((
|
|
148
|
-
title:
|
|
156
|
+
...((p = e.data) == null ? void 0 : p[d]) || {},
|
|
157
|
+
title: a,
|
|
149
158
|
type: ""
|
|
150
159
|
};
|
|
151
|
-
}) : []),
|
|
152
|
-
if (
|
|
153
|
-
const
|
|
154
|
-
let
|
|
155
|
-
const
|
|
156
|
-
let
|
|
157
|
-
for (const t of
|
|
160
|
+
}) : []), n = D(null), s = g(() => {
|
|
161
|
+
if (n.value) {
|
|
162
|
+
const a = n.value.clientWidth;
|
|
163
|
+
let d = 24;
|
|
164
|
+
const p = [];
|
|
165
|
+
let u = 0;
|
|
166
|
+
for (const t of r.value) {
|
|
158
167
|
const $ = F.useTextWidth(String((t == null ? void 0 : t.title) || t));
|
|
159
|
-
|
|
168
|
+
d += $ + 40, (d <= a || !u) && p.push(t), u++;
|
|
160
169
|
}
|
|
161
|
-
return
|
|
170
|
+
return p;
|
|
162
171
|
}
|
|
163
|
-
return
|
|
164
|
-
}),
|
|
165
|
-
k("close",
|
|
172
|
+
return r.value;
|
|
173
|
+
}), o = g(() => r.value.length - s.value.length), y = g(() => r.value.slice(s.value.length)), k = f, c = (a) => {
|
|
174
|
+
k("close", a);
|
|
166
175
|
};
|
|
167
|
-
return (
|
|
168
|
-
const
|
|
169
|
-
return
|
|
176
|
+
return (a, d) => {
|
|
177
|
+
const p = C("el-tag"), u = C("el-popover");
|
|
178
|
+
return i(), v(
|
|
170
179
|
"div",
|
|
171
180
|
{
|
|
172
181
|
ref_key: "containerRef",
|
|
173
|
-
ref:
|
|
182
|
+
ref: n,
|
|
174
183
|
class: "tag-container"
|
|
175
184
|
},
|
|
176
185
|
[
|
|
177
|
-
(
|
|
178
|
-
|
|
186
|
+
(i(!0), v(
|
|
187
|
+
h,
|
|
179
188
|
null,
|
|
180
|
-
|
|
181
|
-
|
|
189
|
+
T(s.value, (t) => (i(), v(
|
|
190
|
+
h,
|
|
182
191
|
{
|
|
183
192
|
key: t.title
|
|
184
193
|
},
|
|
185
194
|
[
|
|
186
|
-
t.title !== "--" ? (
|
|
195
|
+
t.title !== "--" ? (i(), b(W(B), S({
|
|
187
196
|
key: 0,
|
|
188
197
|
title: t.title,
|
|
189
|
-
onClose: ($) =>
|
|
198
|
+
onClose: ($) => c(t),
|
|
190
199
|
color: t.color,
|
|
191
|
-
|
|
192
|
-
type: t.type,
|
|
200
|
+
type: t.type || "primary",
|
|
193
201
|
ref_for: !0
|
|
194
|
-
},
|
|
202
|
+
}, a.$attrs, {
|
|
195
203
|
circle: !1,
|
|
196
204
|
disabled: t == null ? void 0 : t.disabled
|
|
197
|
-
}), null, 16, ["title", "onClose", "color", "
|
|
198
|
-
|
|
205
|
+
}), null, 16, ["title", "onClose", "color", "type", "disabled"])) : (i(), v(
|
|
206
|
+
h,
|
|
199
207
|
{ key: 1 },
|
|
200
208
|
[
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
x(
|
|
210
|
+
_(t.title),
|
|
203
211
|
1
|
|
204
212
|
/* TEXT */
|
|
205
213
|
)
|
|
@@ -214,46 +222,46 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
214
222
|
128
|
|
215
223
|
/* KEYED_FRAGMENT */
|
|
216
224
|
)),
|
|
217
|
-
|
|
225
|
+
o.value ? (i(), b(u, {
|
|
218
226
|
key: 0,
|
|
219
227
|
placement: "bottom",
|
|
220
228
|
"popper-class": "ik-statu-over",
|
|
221
229
|
trigger: "hover"
|
|
222
230
|
}, {
|
|
223
|
-
reference:
|
|
224
|
-
|
|
231
|
+
reference: m(() => [
|
|
232
|
+
o.value ? (i(), b(p, {
|
|
233
|
+
key: 0,
|
|
225
234
|
class: "more-tags",
|
|
226
235
|
type: "info",
|
|
227
236
|
closable: !1
|
|
228
237
|
}, {
|
|
229
|
-
default:
|
|
230
|
-
|
|
231
|
-
" +" +
|
|
238
|
+
default: m(() => [
|
|
239
|
+
x(
|
|
240
|
+
" +" + _(o.value),
|
|
232
241
|
1
|
|
233
242
|
/* TEXT */
|
|
234
243
|
)
|
|
235
244
|
]),
|
|
236
245
|
_: 1
|
|
237
246
|
/* STABLE */
|
|
238
|
-
})
|
|
247
|
+
})) : V("v-if", !0)
|
|
239
248
|
]),
|
|
240
|
-
default:
|
|
241
|
-
|
|
242
|
-
(
|
|
243
|
-
|
|
249
|
+
default: m(() => [
|
|
250
|
+
L("div", null, [
|
|
251
|
+
(i(!0), v(
|
|
252
|
+
h,
|
|
244
253
|
null,
|
|
245
|
-
|
|
254
|
+
T(y.value, (t) => (i(), b(W(B), S({
|
|
246
255
|
key: t.title,
|
|
247
256
|
title: t.title,
|
|
248
257
|
color: t.color,
|
|
249
|
-
onClose: ($) =>
|
|
250
|
-
|
|
251
|
-
type: t.type,
|
|
258
|
+
onClose: ($) => c(t),
|
|
259
|
+
type: t.type || "primary",
|
|
252
260
|
circle: !1,
|
|
253
261
|
ref_for: !0
|
|
254
|
-
},
|
|
262
|
+
}, a.$attrs, {
|
|
255
263
|
disabled: t == null ? void 0 : t.disabled
|
|
256
|
-
}), null, 16, ["title", "color", "onClose", "
|
|
264
|
+
}), null, 16, ["title", "color", "onClose", "type", "disabled"]))),
|
|
257
265
|
128
|
|
258
266
|
/* KEYED_FRAGMENT */
|
|
259
267
|
))
|
|
@@ -261,16 +269,16 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
261
269
|
]),
|
|
262
270
|
_: 1
|
|
263
271
|
/* STABLE */
|
|
264
|
-
})) :
|
|
272
|
+
})) : V("v-if", !0)
|
|
265
273
|
],
|
|
266
274
|
512
|
|
267
275
|
/* NEED_PATCH */
|
|
268
276
|
);
|
|
269
277
|
};
|
|
270
278
|
}
|
|
271
|
-
}), J = /* @__PURE__ */
|
|
279
|
+
}), J = /* @__PURE__ */ O(G, [["__scopeId", "data-v-84c057e2"]]), K = I(J), Q = /* @__PURE__ */ A({
|
|
272
280
|
__name: "index",
|
|
273
|
-
props: /* @__PURE__ */
|
|
281
|
+
props: /* @__PURE__ */ w({
|
|
274
282
|
prop: {
|
|
275
283
|
type: Object,
|
|
276
284
|
default: () => ({})
|
|
@@ -286,49 +294,52 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
286
294
|
},
|
|
287
295
|
modelModifiers: {}
|
|
288
296
|
}),
|
|
289
|
-
emits: /* @__PURE__ */
|
|
290
|
-
setup(
|
|
291
|
-
const
|
|
297
|
+
emits: /* @__PURE__ */ w(["close"], ["update:modelValue"]),
|
|
298
|
+
setup(l, { emit: f }) {
|
|
299
|
+
const e = l, r = P(), n = g(() => ({
|
|
292
300
|
label: "label",
|
|
293
301
|
value: "value",
|
|
294
|
-
...
|
|
295
|
-
})),
|
|
296
|
-
let
|
|
297
|
-
const
|
|
298
|
-
return Array.isArray(
|
|
299
|
-
list:
|
|
300
|
-
data:
|
|
302
|
+
...e.prop
|
|
303
|
+
})), s = M(l, "modelValue"), o = g(() => {
|
|
304
|
+
let c = [];
|
|
305
|
+
const a = r == null ? void 0 : r.attrs.options;
|
|
306
|
+
return Array.isArray(s.value) ? c = s.value.map((d) => a.find((p) => p[n.value.value] === d)) : s.value && (c = [a.find((d) => d[n.value.value] === s.value)]), {
|
|
307
|
+
list: c.map((d) => d[n.value.label]).join(","),
|
|
308
|
+
data: c
|
|
301
309
|
};
|
|
302
|
-
}),
|
|
303
|
-
|
|
310
|
+
}), y = f, k = (c) => {
|
|
311
|
+
s.value = s.value.filter((a) => a !== c[n.value.value]), y("close", c, s.value);
|
|
304
312
|
};
|
|
305
|
-
return (
|
|
306
|
-
const
|
|
307
|
-
return
|
|
313
|
+
return (c, a) => {
|
|
314
|
+
const d = C("el-option"), p = C("el-select");
|
|
315
|
+
return i(), b(p, S(c.$attrs, {
|
|
308
316
|
"collapse-tags": !1,
|
|
309
|
-
modelValue:
|
|
310
|
-
"onUpdate:modelValue":
|
|
317
|
+
modelValue: s.value,
|
|
318
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => s.value = u),
|
|
311
319
|
"no-data-text": "暂无数据",
|
|
312
320
|
"no-match-text": "无匹配项"
|
|
313
321
|
}), {
|
|
314
|
-
tag:
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
tag: m(() => {
|
|
323
|
+
var u, t;
|
|
324
|
+
return [
|
|
325
|
+
z(E(W(K), S({
|
|
326
|
+
list: o.value.list,
|
|
327
|
+
data: o.value.data
|
|
328
|
+
}, l.tagProps, { onClose: k }), null, 16, ["list", "data"]), [
|
|
329
|
+
[H, (t = (u = o.value) == null ? void 0 : u.list) == null ? void 0 : t.length]
|
|
330
|
+
])
|
|
331
|
+
];
|
|
332
|
+
}),
|
|
333
|
+
default: m(() => [
|
|
334
|
+
R(c.$slots, "default", {}, () => [
|
|
335
|
+
(i(!0), v(
|
|
336
|
+
h,
|
|
326
337
|
null,
|
|
327
|
-
|
|
328
|
-
key:
|
|
329
|
-
label:
|
|
330
|
-
value:
|
|
331
|
-
disabled:
|
|
338
|
+
T(c.$attrs.options, (u) => (i(), b(d, {
|
|
339
|
+
key: u[n.value.value],
|
|
340
|
+
label: u[n.value.label],
|
|
341
|
+
value: u[n.value.value],
|
|
342
|
+
disabled: u.disabled
|
|
332
343
|
}, null, 8, ["label", "value", "disabled"]))),
|
|
333
344
|
128
|
|
334
345
|
/* KEYED_FRAGMENT */
|
|
@@ -340,7 +351,7 @@ const A = (e, p) => (e.install = (l) => {
|
|
|
340
351
|
}, 16, ["modelValue"]);
|
|
341
352
|
};
|
|
342
353
|
}
|
|
343
|
-
}), Z =
|
|
354
|
+
}), Z = I(Q);
|
|
344
355
|
export {
|
|
345
356
|
Z as IkSelectTag,
|
|
346
357
|
Z as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.index={},u.vue,u["iking-utils-pro"]))})(this,function(u,e,S){"use strict";const k=(
|
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.index={},u.vue,u["iking-utils-pro"]))})(this,function(u,e,S){"use strict";const k=(o,y)=>(o.install=t=>{for(const n of[o,...Object.values({})])t.component(n.name,n)},o),C=(o,y)=>{const t=o.__vccOpts||o;for(const[n,c]of y)t[n]=c;return t},h=k(C(e.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:"primary"},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"plain"},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},circleW:{type:Number,default:8},circleH:{type:Number,default:8},borderWidth:{type:Number,default:1},borderType:{type:String,default:"solid"}},emits:["close"],setup(o,{emit:y}){const t=o,n=e.computed(()=>{const r=t.type?t.type==="danger"?`var(--el-color-${t.type})`:{color:`var(--ik-color-${t.type})`,backgroundColor:`var(--ik-color-${t.type}-light)`}:{color:t.color,backgroundColor:t.background,border:"none"};if(t.effect==="plain"&&t.type!=="danger")r.backgroundColor="transparent",r.borderColor=t.type?`var(--ik-color-${t.type})`:t.color;else if(t.effect==="dark"&&t.type!=="danger"){const m=t.type?`var(--ik-color-${t.type})`:t.color;r.backgroundColor=m,r.borderColor=m,r.color="#fff"}return r}),c=y,s=()=>{c("close")};return(r,m)=>{const g=e.resolveComponent("el-tag");return e.openBlock(),e.createBlock(g,{effect:o.effect,class:e.normalizeClass(["ik-statu-tag",{disabled:o.disabled}]),type:o.type,style:e.normalizeStyle(n.value),closable:r.$attrs.closable&&!o.disabled,onClose:s},{default:e.withCtx(()=>[o.circle?(e.openBlock(),e.createElementBlock("span",{key:0,class:"inline-block rounded-full",style:e.normalizeStyle({backgroundColor:o.type?o.type==="danger"?`var(--el-color-${o.type})`:`var(--ik-color-${o.type})`:o.circleColor,width:`${o.circleW}px`,height:`${o.circleH}px`})},null,4)):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(o.title),1)]),_:1},8,["effect","class","type","style","closable"])}}}),[["__scopeId","data-v-a3967db7"]])),$=k(C(e.defineComponent({__name:"index",props:{overfolw:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]}},emits:["close"],setup(o,{emit:y}){const t=o,n=e.computed(()=>Array.isArray(t.list)?t.list:typeof t.list=="string"?t.list.split(",").map((a,p)=>{var f;return{...((f=t.data)==null?void 0:f[p])||{},title:a,type:""}}):[]),c=e.ref(null),s=e.computed(()=>{if(c.value){const a=c.value.clientWidth;let p=24;const f=[];let d=0;for(const l of n.value){const b=S.ikDom.useTextWidth(String((l==null?void 0:l.title)||l));p+=b+40,(p<=a||!d)&&f.push(l),d++}return f}return n.value}),r=e.computed(()=>n.value.length-s.value.length),m=e.computed(()=>n.value.slice(s.value.length)),g=y,i=a=>{g("close",a)};return(a,p)=>{const f=e.resolveComponent("el-tag"),d=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:c,class:"tag-container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.title},[l.title!=="--"?(e.openBlock(),e.createBlock(e.unref(h),e.mergeProps({key:0,title:l.title,onClose:b=>i(l),color:l.color,type:l.type||"primary",ref_for:!0},a.$attrs,{circle:!1,disabled:l==null?void 0:l.disabled}),null,16,["title","onClose","color","type","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(l.title),1)],64))],64))),128)),r.value?(e.openBlock(),e.createBlock(d,{key:0,placement:"bottom","popper-class":"ik-statu-over",trigger:"hover"},{reference:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(f,{key:0,class:"more-tags",type:"info",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(r.value),1)]),_:1})):e.createCommentVNode("v-if",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createBlock(e.unref(h),e.mergeProps({key:l.title,title:l.title,color:l.color,onClose:b=>i(l),type:l.type||"primary",circle:!1,ref_for:!0},a.$attrs,{disabled:l==null?void 0:l.disabled}),null,16,["title","color","onClose","type","disabled"]))),128))])]),_:1})):e.createCommentVNode("v-if",!0)],512)}}}),[["__scopeId","data-v-84c057e2"]])),B=k(e.defineComponent({__name:"index",props:e.mergeModels({prop:{type:Object,default:()=>({})},tagProps:{type:Object,default:()=>({})}},{modelValue:{type:[Array,String],default:""},modelModifiers:{}}),emits:e.mergeModels(["close"],["update:modelValue"]),setup(o,{emit:y}){const t=o,n=e.getCurrentInstance(),c=e.computed(()=>({label:"label",value:"value",...t.prop})),s=e.useModel(o,"modelValue"),r=e.computed(()=>{let i=[];const a=n==null?void 0:n.attrs.options;return Array.isArray(s.value)?i=s.value.map(p=>a.find(f=>f[c.value.value]===p)):s.value&&(i=[a.find(p=>p[c.value.value]===s.value)]),{list:i.map(p=>p[c.value.label]).join(","),data:i}}),m=y,g=i=>{s.value=s.value.filter(a=>a!==i[c.value.value]),m("close",i,s.value)};return(i,a)=>{const p=e.resolveComponent("el-option"),f=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(f,e.mergeProps(i.$attrs,{"collapse-tags":!1,modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=d=>s.value=d),"no-data-text":"暂无数据","no-match-text":"无匹配项"}),{tag:e.withCtx(()=>{var d,l;return[e.withDirectives(e.createVNode(e.unref($),e.mergeProps({list:r.value.list,data:r.value.data},o.tagProps,{onClose:g}),null,16,["list","data"]),[[e.vShow,(l=(d=r.value)==null?void 0:d.list)==null?void 0:l.length]])]}),default:e.withCtx(()=>[e.renderSlot(i.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.$attrs.options,d=>(e.openBlock(),e.createBlock(p,{key:d[c.value.value],label:d[c.value.label],value:d[c.value.value],disabled:d.disabled},null,8,["label","value","disabled"]))),128))])]),_:3},16,["modelValue"])}}}));u.IkSelectTag=B,u.default=B,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ik-statu-tag[data-v-
|
|
1
|
+
.ik-statu-tag[data-v-a3967db7]{margin:5px 0}.ik-statu-tag[data-v-a3967db7]:not(:first-child){margin-left:5px}.el-tag[data-v-a3967db7]:not(.el-tag--plain){border:none}.el-tag--danger[data-v-a3967db7]:not(.el-tag--plain){color:var(--ik-color-error);background-color:var(--ik-color-error-light)}.ik-statu-over{width:auto!important;min-width:0!important}.tag-container[data-v-84c057e2]{display:flex;width:100%}.tag-container .ik-statu-tag[data-v-84c057e2]{max-width:calc(100% - 46px)}.tag-container .el-tag[data-v-84c057e2]:not(:last-child){margin-right:5px}.tag-container[data-v-84c057e2] .el-tag__content{display:inline-block!important;width:100%;overflow:hidden;text-overflow:ellipsis}.more-tags[data-v-84c057e2]{margin:5px 0}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
for (const l of [
|
|
4
|
-
|
|
5
|
-
},
|
|
1
|
+
import { defineComponent as f, computed as y, resolveComponent as u, openBlock as n, createBlock as p, normalizeClass as g, normalizeStyle as d, withCtx as b, createElementBlock as k, createCommentVNode as m, createTextVNode as C, toDisplayString as v } from "vue";
|
|
2
|
+
const S = (t, r) => (t.install = (e) => {
|
|
3
|
+
for (const l of [t, ...Object.values({})])
|
|
4
|
+
e.component(l.name, l);
|
|
5
|
+
}, t), $ = /* @__PURE__ */ f({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
title: {
|
|
@@ -11,7 +11,7 @@ const C = (e, o) => (e.install = (t) => {
|
|
|
11
11
|
},
|
|
12
12
|
type: {
|
|
13
13
|
type: String,
|
|
14
|
-
default: ""
|
|
14
|
+
default: "primary"
|
|
15
15
|
},
|
|
16
16
|
// 传了type时,color和background不生效
|
|
17
17
|
// 文字颜色
|
|
@@ -30,7 +30,7 @@ const C = (e, o) => (e.install = (t) => {
|
|
|
30
30
|
},
|
|
31
31
|
effect: {
|
|
32
32
|
type: String,
|
|
33
|
-
default: "
|
|
33
|
+
default: "plain"
|
|
34
34
|
},
|
|
35
35
|
disabled: {
|
|
36
36
|
type: Boolean,
|
|
@@ -60,45 +60,54 @@ const C = (e, o) => (e.install = (t) => {
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
emits: ["close"],
|
|
63
|
-
setup(
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
setup(t, { emit: r }) {
|
|
64
|
+
const e = t, l = y(() => {
|
|
65
|
+
const o = e.type ? e.type === "danger" ? `var(--el-color-${e.type})` : {
|
|
66
|
+
color: `var(--ik-color-${e.type})`,
|
|
67
|
+
backgroundColor: `var(--ik-color-${e.type}-light)`
|
|
68
|
+
} : {
|
|
69
|
+
color: e.color,
|
|
70
|
+
backgroundColor: e.background,
|
|
71
|
+
border: "none"
|
|
72
|
+
};
|
|
73
|
+
if (e.effect === "plain" && e.type !== "danger")
|
|
74
|
+
o.backgroundColor = "transparent", o.borderColor = e.type ? `var(--ik-color-${e.type})` : e.color;
|
|
75
|
+
else if (e.effect === "dark" && e.type !== "danger") {
|
|
76
|
+
const a = e.type ? `var(--ik-color-${e.type})` : e.color;
|
|
77
|
+
o.backgroundColor = a, o.borderColor = a, o.color = "#fff";
|
|
78
|
+
}
|
|
79
|
+
return o;
|
|
80
|
+
}), c = r, i = () => {
|
|
72
81
|
c("close");
|
|
73
82
|
};
|
|
74
|
-
return (
|
|
75
|
-
const
|
|
76
|
-
return
|
|
77
|
-
effect:
|
|
78
|
-
class: g(["ik-statu-tag", { disabled:
|
|
79
|
-
type:
|
|
80
|
-
style:
|
|
81
|
-
closable:
|
|
82
|
-
onClose:
|
|
83
|
+
return (o, a) => {
|
|
84
|
+
const s = u("el-tag");
|
|
85
|
+
return n(), p(s, {
|
|
86
|
+
effect: t.effect,
|
|
87
|
+
class: g(["ik-statu-tag", { disabled: t.disabled }]),
|
|
88
|
+
type: t.type,
|
|
89
|
+
style: d(l.value),
|
|
90
|
+
closable: o.$attrs.closable && !t.disabled,
|
|
91
|
+
onClose: i
|
|
83
92
|
}, {
|
|
84
93
|
default: b(() => [
|
|
85
|
-
|
|
94
|
+
t.circle ? (n(), k(
|
|
86
95
|
"span",
|
|
87
96
|
{
|
|
88
97
|
key: 0,
|
|
89
98
|
class: "inline-block rounded-full",
|
|
90
|
-
style:
|
|
91
|
-
backgroundColor:
|
|
92
|
-
width: `${
|
|
93
|
-
height: `${
|
|
99
|
+
style: d({
|
|
100
|
+
backgroundColor: t.type ? t.type === "danger" ? `var(--el-color-${t.type})` : `var(--ik-color-${t.type})` : t.circleColor,
|
|
101
|
+
width: `${t.circleW}px`,
|
|
102
|
+
height: `${t.circleH}px`
|
|
94
103
|
})
|
|
95
104
|
},
|
|
96
105
|
null,
|
|
97
106
|
4
|
|
98
107
|
/* STYLE */
|
|
99
108
|
)) : m("v-if", !0),
|
|
100
|
-
|
|
101
|
-
" " + v(
|
|
109
|
+
C(
|
|
110
|
+
" " + v(t.title),
|
|
102
111
|
1
|
|
103
112
|
/* TEXT */
|
|
104
113
|
)
|
|
@@ -108,12 +117,12 @@ const C = (e, o) => (e.install = (t) => {
|
|
|
108
117
|
}, 8, ["effect", "class", "type", "style", "closable"]);
|
|
109
118
|
};
|
|
110
119
|
}
|
|
111
|
-
}), h = (
|
|
112
|
-
const
|
|
113
|
-
for (const [l, c] of
|
|
114
|
-
|
|
115
|
-
return
|
|
116
|
-
}, x = /* @__PURE__ */ h(
|
|
120
|
+
}), h = (t, r) => {
|
|
121
|
+
const e = t.__vccOpts || t;
|
|
122
|
+
for (const [l, c] of r)
|
|
123
|
+
e[l] = c;
|
|
124
|
+
return e;
|
|
125
|
+
}, x = /* @__PURE__ */ h($, [["__scopeId", "data-v-a3967db7"]]), N = S(x);
|
|
117
126
|
export {
|
|
118
127
|
N as IkStatu,
|
|
119
128
|
N as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o
|
|
1
|
+
(function(l,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(l=typeof globalThis<"u"?globalThis:l||self,o(l.index={},l.vue))})(this,function(l,o){"use strict";const d=((t,n)=>(t.install=e=>{for(const c of[t,...Object.values({})])e.component(c.name,c)},t))(((t,n)=>{const e=t.__vccOpts||t;for(const[c,a]of n)e[c]=a;return e})(o.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:"primary"},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"plain"},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},circleW:{type:Number,default:8},circleH:{type:Number,default:8},borderWidth:{type:Number,default:1},borderType:{type:String,default:"solid"}},emits:["close"],setup(t,{emit:n}){const e=t,c=o.computed(()=>{const r=e.type?e.type==="danger"?`var(--el-color-${e.type})`:{color:`var(--ik-color-${e.type})`,backgroundColor:`var(--ik-color-${e.type}-light)`}:{color:e.color,backgroundColor:e.background,border:"none"};if(e.effect==="plain"&&e.type!=="danger")r.backgroundColor="transparent",r.borderColor=e.type?`var(--ik-color-${e.type})`:e.color;else if(e.effect==="dark"&&e.type!=="danger"){const i=e.type?`var(--ik-color-${e.type})`:e.color;r.backgroundColor=i,r.borderColor=i,r.color="#fff"}return r}),a=n,s=()=>{a("close")};return(r,i)=>{const f=o.resolveComponent("el-tag");return o.openBlock(),o.createBlock(f,{effect:t.effect,class:o.normalizeClass(["ik-statu-tag",{disabled:t.disabled}]),type:t.type,style:o.normalizeStyle(c.value),closable:r.$attrs.closable&&!t.disabled,onClose:s},{default:o.withCtx(()=>[t.circle?(o.openBlock(),o.createElementBlock("span",{key:0,class:"inline-block rounded-full",style:o.normalizeStyle({backgroundColor:t.type?t.type==="danger"?`var(--el-color-${t.type})`:`var(--ik-color-${t.type})`:t.circleColor,width:`${t.circleW}px`,height:`${t.circleH}px`})},null,4)):o.createCommentVNode("v-if",!0),o.createTextVNode(" "+o.toDisplayString(t.title),1)]),_:1},8,["effect","class","type","style","closable"])}}}),[["__scopeId","data-v-a3967db7"]]));l.IkStatu=d,l.default=d,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ik-statu-tag[data-v-
|
|
1
|
+
.ik-statu-tag[data-v-a3967db7]{margin:5px 0}.ik-statu-tag[data-v-a3967db7]:not(:first-child){margin-left:5px}.el-tag[data-v-a3967db7]:not(.el-tag--plain){border:none}.el-tag--danger[data-v-a3967db7]:not(.el-tag--plain){color:var(--ik-color-error);background-color:var(--ik-color-error-light)}
|