iking-web-ui-pro 0.2.50 → 0.2.52
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/IKApprovalProcessDetail/ik.index.es.js +527 -513
- package/dist/IKApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +342 -328
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IkDescription/ik.index.es.js +380 -366
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +456 -442
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IkSelectTag/ik.index.es.js +30 -31
- package/dist/IkSelectTag/ik.index.umd.js +1 -1
- package/dist/IkSelectTag/style.css +1 -1
- package/dist/IkStatu/ik.index.es.js +4 -5
- package/dist/IkStatu/ik.index.umd.js +1 -1
- package/dist/IkStatu/style.css +1 -1
- package/dist/IkStatuOver/ik.index.es.js +2 -3
- package/dist/IkStatuOver/ik.index.umd.js +1 -1
- package/dist/IkStatuOver/style.css +1 -1
- package/dist/index.es.js +2186 -2173
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as W, computed as y, resolveComponent as k, openBlock as
|
|
1
|
+
import { defineComponent as W, computed as y, resolveComponent as k, openBlock as u, createBlock as g, normalizeClass as D, normalizeStyle as I, withCtx as b, createElementBlock as v, createCommentVNode as w, createTextVNode as $, toDisplayString as x, ref as L, Fragment as m, renderList as V, unref as T, mergeProps as C, createVNode as B, createElementVNode as P, mergeModels as N, getCurrentInstance as M, useModel as z, withDirectives as E, vShow as H, renderSlot as R } from "vue";
|
|
2
2
|
import { ikDom as F } from "iking-utils-pro";
|
|
3
3
|
const A = (t, d) => {
|
|
4
4
|
if (t.install = (l) => {
|
|
@@ -72,17 +72,16 @@ const A = (t, d) => {
|
|
|
72
72
|
},
|
|
73
73
|
emits: ["close"],
|
|
74
74
|
setup(t, { emit: d }) {
|
|
75
|
-
const l = t, o = y(() => l.type ?
|
|
75
|
+
const l = t, o = y(() => l.type ? `var(--el-color-${l.type})` : {
|
|
76
76
|
color: l.color,
|
|
77
77
|
backgroundColor: l.background,
|
|
78
78
|
border: "none"
|
|
79
|
-
// borderColor: props.color
|
|
80
79
|
}), n = d, r = () => {
|
|
81
80
|
n("close");
|
|
82
81
|
};
|
|
83
82
|
return (f, h) => {
|
|
84
83
|
const _ = k("el-tag");
|
|
85
|
-
return
|
|
84
|
+
return u(), g(_, {
|
|
86
85
|
effect: t.effect,
|
|
87
86
|
class: D(["ik-statu-tag", { disabled: t.disabled }]),
|
|
88
87
|
type: t.type,
|
|
@@ -91,7 +90,7 @@ const A = (t, d) => {
|
|
|
91
90
|
onClose: r
|
|
92
91
|
}, {
|
|
93
92
|
default: b(() => [
|
|
94
|
-
t.circle ? (
|
|
93
|
+
t.circle ? (u(), v(
|
|
95
94
|
"span",
|
|
96
95
|
{
|
|
97
96
|
key: 0,
|
|
@@ -106,8 +105,8 @@ const A = (t, d) => {
|
|
|
106
105
|
4
|
|
107
106
|
/* STYLE */
|
|
108
107
|
)) : w("v-if", !0),
|
|
109
|
-
|
|
110
|
-
" " +
|
|
108
|
+
$(
|
|
109
|
+
" " + x(t.title),
|
|
111
110
|
1
|
|
112
111
|
/* TEXT */
|
|
113
112
|
)
|
|
@@ -118,7 +117,7 @@ const A = (t, d) => {
|
|
|
118
117
|
};
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
|
-
const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-
|
|
120
|
+
const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-699d5162"]]), O = A(q), G = /* @__PURE__ */ W({
|
|
122
121
|
__name: "index",
|
|
123
122
|
props: {
|
|
124
123
|
// 超出长度时以 +2 这样的方式显示
|
|
@@ -145,22 +144,22 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
145
144
|
},
|
|
146
145
|
emits: ["close"],
|
|
147
146
|
setup(t, { emit: d }) {
|
|
148
|
-
const l = t, o = y(() => Array.isArray(l.list) ? l.list : typeof l.list == "string" ? l.list.split(",").map((a,
|
|
147
|
+
const l = t, o = y(() => Array.isArray(l.list) ? l.list : typeof l.list == "string" ? l.list.split(",").map((a, c) => {
|
|
149
148
|
var i;
|
|
150
149
|
return {
|
|
151
|
-
...((i = l.data) == null ? void 0 : i[
|
|
150
|
+
...((i = l.data) == null ? void 0 : i[c]) || {},
|
|
152
151
|
title: a,
|
|
153
152
|
type: ""
|
|
154
153
|
};
|
|
155
154
|
}) : []), n = L(null), r = y(() => {
|
|
156
155
|
if (n.value) {
|
|
157
156
|
const a = n.value.clientWidth;
|
|
158
|
-
let
|
|
157
|
+
let c = 24;
|
|
159
158
|
const i = [];
|
|
160
159
|
let p = 0;
|
|
161
160
|
for (const e of o.value) {
|
|
162
161
|
const S = F.useTextWidth(String((e == null ? void 0 : e.title) || e));
|
|
163
|
-
|
|
162
|
+
c += S + 40, (c <= a || !p) && i.push(e), p++;
|
|
164
163
|
}
|
|
165
164
|
return i;
|
|
166
165
|
}
|
|
@@ -168,9 +167,9 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
168
167
|
}), f = y(() => o.value.length - r.value.length), h = y(() => o.value.slice(r.value.length)), _ = d, s = (a) => {
|
|
169
168
|
_("close", a);
|
|
170
169
|
};
|
|
171
|
-
return (a,
|
|
170
|
+
return (a, c) => {
|
|
172
171
|
const i = k("el-tag"), p = k("el-popover");
|
|
173
|
-
return
|
|
172
|
+
return u(), v(
|
|
174
173
|
"div",
|
|
175
174
|
{
|
|
176
175
|
ref_key: "containerRef",
|
|
@@ -178,16 +177,16 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
178
177
|
class: "tag-container"
|
|
179
178
|
},
|
|
180
179
|
[
|
|
181
|
-
(
|
|
180
|
+
(u(!0), v(
|
|
182
181
|
m,
|
|
183
182
|
null,
|
|
184
|
-
V(r.value, (e) => (
|
|
183
|
+
V(r.value, (e) => (u(), v(
|
|
185
184
|
m,
|
|
186
185
|
{
|
|
187
186
|
key: e.title
|
|
188
187
|
},
|
|
189
188
|
[
|
|
190
|
-
e.title !== "--" ? (
|
|
189
|
+
e.title !== "--" ? (u(), g(T(O), C({
|
|
191
190
|
key: 0,
|
|
192
191
|
title: e.title,
|
|
193
192
|
onClose: (S) => s(e),
|
|
@@ -198,12 +197,12 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
198
197
|
}, a.$attrs, {
|
|
199
198
|
circle: !1,
|
|
200
199
|
disabled: e == null ? void 0 : e.disabled
|
|
201
|
-
}), null, 16, ["title", "onClose", "color", "background", "type", "disabled"])) : (
|
|
200
|
+
}), null, 16, ["title", "onClose", "color", "background", "type", "disabled"])) : (u(), v(
|
|
202
201
|
m,
|
|
203
202
|
{ key: 1 },
|
|
204
203
|
[
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
$(
|
|
205
|
+
x(e.title),
|
|
207
206
|
1
|
|
208
207
|
/* TEXT */
|
|
209
208
|
)
|
|
@@ -218,7 +217,7 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
218
217
|
128
|
|
219
218
|
/* KEYED_FRAGMENT */
|
|
220
219
|
)),
|
|
221
|
-
f.value ? (
|
|
220
|
+
f.value ? (u(), g(p, {
|
|
222
221
|
key: 0,
|
|
223
222
|
placement: "bottom",
|
|
224
223
|
"popper-class": "ik-statu-over",
|
|
@@ -231,8 +230,8 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
231
230
|
closable: !1
|
|
232
231
|
}, {
|
|
233
232
|
default: b(() => [
|
|
234
|
-
|
|
235
|
-
" +" +
|
|
233
|
+
$(
|
|
234
|
+
" +" + x(f.value),
|
|
236
235
|
1
|
|
237
236
|
/* TEXT */
|
|
238
237
|
)
|
|
@@ -243,10 +242,10 @@ const q = /* @__PURE__ */ j(U, [["__scopeId", "data-v-2e950628"]]), O = A(q), G
|
|
|
243
242
|
]),
|
|
244
243
|
default: b(() => [
|
|
245
244
|
P("div", null, [
|
|
246
|
-
(
|
|
245
|
+
(u(!0), v(
|
|
247
246
|
m,
|
|
248
247
|
null,
|
|
249
|
-
V(h.value, (e) => (
|
|
248
|
+
V(h.value, (e) => (u(), g(T(O), C({
|
|
250
249
|
key: e.title,
|
|
251
250
|
title: e.title,
|
|
252
251
|
color: e.color,
|
|
@@ -300,16 +299,16 @@ const J = /* @__PURE__ */ j(G, [["__scopeId", "data-v-e872e623"]]), K = A(J), Q
|
|
|
300
299
|
})), r = z(t, "modelValue"), f = y(() => {
|
|
301
300
|
let s = [];
|
|
302
301
|
const a = o == null ? void 0 : o.attrs.options;
|
|
303
|
-
return Array.isArray(r.value) ? s = r.value.map((
|
|
304
|
-
list: s.map((
|
|
302
|
+
return Array.isArray(r.value) ? s = r.value.map((c) => a.find((i) => i[n.value.value] === c)) : r.value && (s = [a.find((c) => c[n.value.value] === r.value)]), {
|
|
303
|
+
list: s.map((c) => c[n.value.label]).join(","),
|
|
305
304
|
data: s
|
|
306
305
|
};
|
|
307
306
|
}), h = d, _ = (s) => {
|
|
308
307
|
r.value = r.value.filter((a) => a !== s[n.value.value]), h("close", s, r.value);
|
|
309
308
|
};
|
|
310
309
|
return (s, a) => {
|
|
311
|
-
const
|
|
312
|
-
return
|
|
310
|
+
const c = k("el-option"), i = k("el-select");
|
|
311
|
+
return u(), g(i, C(s.$attrs, {
|
|
313
312
|
"collapse-tags": !1,
|
|
314
313
|
modelValue: r.value,
|
|
315
314
|
"onUpdate:modelValue": a[0] || (a[0] = (p) => r.value = p),
|
|
@@ -326,10 +325,10 @@ const J = /* @__PURE__ */ j(G, [["__scopeId", "data-v-e872e623"]]), K = A(J), Q
|
|
|
326
325
|
]),
|
|
327
326
|
default: b(() => [
|
|
328
327
|
R(s.$slots, "default", {}, () => [
|
|
329
|
-
(
|
|
328
|
+
(u(!0), v(
|
|
330
329
|
m,
|
|
331
330
|
null,
|
|
332
|
-
V(s.$attrs.options, (p) => (
|
|
331
|
+
V(s.$attrs.options, (p) => (u(), g(c, {
|
|
333
332
|
key: p[n.value.value],
|
|
334
333
|
label: p[n.value.label],
|
|
335
334
|
value: p[n.value.value],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,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):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,B){"use strict";const k=(l,d)=>{if(l.install=o=>{for(const n of[l,...Object.values(d??{})])o.component(n.name,n)},d)for(const[o,n]of Object.entries(d))l[o]=n;return l},_=(l,d)=>{const o=l.__vccOpts||l;for(const[n,r]of d)o[n]=r;return o},S=e.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:""},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"light"},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(l,{emit:d}){const o=l,n=e.computed(()=>o.type
|
|
1
|
+
(function(f,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):(f=typeof globalThis<"u"?globalThis:f||self,e(f.index={},f.vue,f["iking-utils-pro"]))})(this,function(f,e,B){"use strict";const k=(l,d)=>{if(l.install=o=>{for(const n of[l,...Object.values(d??{})])o.component(n.name,n)},d)for(const[o,n]of Object.entries(d))l[o]=n;return l},_=(l,d)=>{const o=l.__vccOpts||l;for(const[n,r]of d)o[n]=r;return o},S=e.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:""},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"light"},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(l,{emit:d}){const o=l,n=e.computed(()=>o.type?`var(--el-color-${o.type})`:{color:o.color,backgroundColor:o.background,border:"none"}),r=d,c=()=>{r("close")};return(y,m)=>{const g=e.resolveComponent("el-tag");return e.openBlock(),e.createBlock(g,{effect:l.effect,class:e.normalizeClass(["ik-statu-tag",{disabled:l.disabled}]),type:l.type,style:e.normalizeStyle(n.value),closable:y.$attrs.closable&&!l.disabled,onClose:c},{default:e.withCtx(()=>[l.circle?(e.openBlock(),e.createElementBlock("span",{key:0,class:"inline-block rounded-full",style:e.normalizeStyle({backgroundColor:l.type?`var(--el-color-${l.type})`:l.circleColor,width:`${l.circleW}px`,height:`${l.circleH}px`})},null,4)):e.createCommentVNode("v-if",!0),e.createTextVNode(" "+e.toDisplayString(l.title),1)]),_:1},8,["effect","class","type","style","closable"])}}}),V="",h=k(_(S,[["__scopeId","data-v-699d5162"]])),x=e.defineComponent({__name:"index",props:{overfolw:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]}},emits:["close"],setup(l,{emit:d}){const o=l,n=e.computed(()=>Array.isArray(o.list)?o.list:typeof o.list=="string"?o.list.split(",").map((a,i)=>{var p;return{...((p=o.data)==null?void 0:p[i])||{},title:a,type:""}}):[]),r=e.ref(null),c=e.computed(()=>{if(r.value){const a=r.value.clientWidth;let i=24;const p=[];let u=0;for(const t of n.value){const b=B.ikDom.useTextWidth(String((t==null?void 0:t.title)||t));i+=b+40,(i<=a||!u)&&p.push(t),u++}return p}return n.value}),y=e.computed(()=>n.value.length-c.value.length),m=e.computed(()=>n.value.slice(c.value.length)),g=d,s=a=>{g("close",a)};return(a,i)=>{const p=e.resolveComponent("el-tag"),u=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:r,class:"tag-container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.title},[t.title!=="--"?(e.openBlock(),e.createBlock(e.unref(h),e.mergeProps({key:0,title:t.title,onClose:b=>s(t),color:t.color,background:t.background,type:t.type,ref_for:!0},a.$attrs,{circle:!1,disabled:t==null?void 0:t.disabled}),null,16,["title","onClose","color","background","type","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.title),1)],64))],64))),128)),y.value?(e.openBlock(),e.createBlock(u,{key:0,placement:"bottom","popper-class":"ik-statu-over",trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(p,{class:"more-tags",type:"info",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(y.value),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,t=>(e.openBlock(),e.createBlock(e.unref(h),e.mergeProps({key:t.title,title:t.title,color:t.color,onClose:b=>s(t),background:t.background,type:t.type,circle:!1,ref_for:!0},a.$attrs,{disabled:t==null?void 0:t.disabled}),null,16,["title","color","onClose","background","type","disabled"]))),128))])]),_:1})):e.createCommentVNode("v-if",!0)],512)}}}),w="",N="",T=k(_(x,[["__scopeId","data-v-e872e623"]])),C=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(l,{emit:d}){const o=l,n=e.getCurrentInstance(),r=e.computed(()=>({label:"label",value:"value",...o.prop})),c=e.useModel(l,"modelValue"),y=e.computed(()=>{let s=[];const a=n==null?void 0:n.attrs.options;return Array.isArray(c.value)?s=c.value.map(i=>a.find(p=>p[r.value.value]===i)):c.value&&(s=[a.find(i=>i[r.value.value]===c.value)]),{list:s.map(i=>i[r.value.label]).join(","),data:s}}),m=d,g=s=>{c.value=c.value.filter(a=>a!==s[r.value.value]),m("close",s,c.value)};return(s,a)=>{const i=e.resolveComponent("el-option"),p=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(p,e.mergeProps(s.$attrs,{"collapse-tags":!1,modelValue:c.value,"onUpdate:modelValue":a[0]||(a[0]=u=>c.value=u),"no-data-text":"暂无数据","no-match-text":"无匹配项"}),{tag:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(T),e.mergeProps({list:y.value.list,data:y.value.data},l.tagProps,{onClose:g}),null,16,["list","data"]),[[e.vShow,y.value]])]),default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.$attrs.options,u=>(e.openBlock(),e.createBlock(i,{key:u[r.value.value],label:u[r.value.label],value:u[r.value.value],disabled:u.disabled},null,8,["label","value","disabled"]))),128))])]),_:3},16,["modelValue"])}}}));f.IkSelectTag=C,f.default=C,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ik-statu-tag[data-v-
|
|
1
|
+
.ik-statu-tag[data-v-699d5162]{margin:5px 0}.ik-statu-tag[data-v-699d5162]:not(:first-child){margin-left:5px}.el-tag[data-v-699d5162]{border:none;border-radius:6px}.el-tag--primary[data-v-699d5162]{color:var(--ik-color-primary);background-color:var(--ik-color-primary-light)}.el-tag--success[data-v-699d5162]{color:var(--ik-color-success);background-color:var(--ik-color-success-light)}.el-tag--warning[data-v-699d5162]{color:var(--ik-color-warning);background-color:var(--ik-color-warning-light)}.el-tag--info[data-v-699d5162]{color:var(--ik-color-info);background-color:var(--ik-color-info-light)}.el-tag--danger[data-v-699d5162]{color:var(--ik-color-error);background-color:var(--ik-color-error-light)}.el-tag--cyan[data-v-699d5162]{color:var(--ik-color-cyan);background-color:var(--ik-color-cyan-light)}.el-tag--blueBlack[data-v-699d5162]{color:var(--ik-color-blueBlack);background-color:var(--ik-color-blueBlack-light)}.el-tag--purple[data-v-699d5162]{color:var(--ik-color-purple);background-color:var(--ik-color-purple-light)}.el-tag--orange[data-v-699d5162]{color:var(--ik-color-orange);background-color:var(--ik-color-orange-light)}.el-tag--brown[data-v-699d5162]{color:var(--ik-color-brown);background-color:var(--ik-color-brown-light)}.ik-statu-over{width:auto!important;min-width:0!important}.tag-container[data-v-e872e623]{display:flex;width:100%}.tag-container .ik-statu-tag[data-v-e872e623]{max-width:calc(100% - 46px)}.tag-container .el-tag[data-v-e872e623]:not(:last-child){margin-right:5px}.tag-container[data-v-e872e623] .el-tag__content{display:inline-block!important;width:100%;overflow:hidden;text-overflow:ellipsis}.more-tags[data-v-e872e623]{margin:5px 0}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, computed as u, resolveComponent as f, openBlock as n, createBlock as y, normalizeClass as p, normalizeStyle as a, withCtx as b, createElementBlock as g, createCommentVNode as m, createTextVNode as k, toDisplayString as S } from "vue";
|
|
2
|
-
const
|
|
2
|
+
const v = (e, o) => {
|
|
3
3
|
if (e.install = (t) => {
|
|
4
4
|
for (const l of [e, ...Object.values(o ?? {})])
|
|
5
5
|
t.component(l.name, l);
|
|
@@ -7,7 +7,7 @@ const C = (e, o) => {
|
|
|
7
7
|
for (const [t, l] of Object.entries(o))
|
|
8
8
|
e[t] = l;
|
|
9
9
|
return e;
|
|
10
|
-
},
|
|
10
|
+
}, C = /* @__PURE__ */ i({
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
13
13
|
title: {
|
|
@@ -66,11 +66,10 @@ const C = (e, o) => {
|
|
|
66
66
|
},
|
|
67
67
|
emits: ["close"],
|
|
68
68
|
setup(e, { emit: o }) {
|
|
69
|
-
const t = e, l = u(() => t.type ?
|
|
69
|
+
const t = e, l = u(() => t.type ? `var(--el-color-${t.type})` : {
|
|
70
70
|
color: t.color,
|
|
71
71
|
backgroundColor: t.background,
|
|
72
72
|
border: "none"
|
|
73
|
-
// borderColor: props.color
|
|
74
73
|
}), c = o, r = () => {
|
|
75
74
|
c("close");
|
|
76
75
|
};
|
|
@@ -117,7 +116,7 @@ const h = (e, o) => {
|
|
|
117
116
|
for (const [l, c] of o)
|
|
118
117
|
t[l] = c;
|
|
119
118
|
return t;
|
|
120
|
-
}, x = /* @__PURE__ */ h(
|
|
119
|
+
}, x = /* @__PURE__ */ h(C, [["__scopeId", "data-v-699d5162"]]), $ = v(x);
|
|
121
120
|
export {
|
|
122
121
|
$ as IkStatu,
|
|
123
122
|
$ as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o.index={},o.vue))})(this,function(o,t){"use strict";const
|
|
1
|
+
(function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o.index={},o.vue))})(this,function(o,t){"use strict";const i=(e,c)=>{if(e.install=l=>{for(const n of[e,...Object.values(c??{})])l.component(n.name,n)},c)for(const[l,n]of Object.entries(c))e[l]=n;return e},d=t.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:""},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"light"},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(e,{emit:c}){const l=e,n=t.computed(()=>l.type?`var(--el-color-${l.type})`:{color:l.color,backgroundColor:l.background,border:"none"}),a=c,s=()=>{a("close")};return(f,m)=>{const u=t.resolveComponent("el-tag");return t.openBlock(),t.createBlock(u,{effect:e.effect,class:t.normalizeClass(["ik-statu-tag",{disabled:e.disabled}]),type:e.type,style:t.normalizeStyle(n.value),closable:f.$attrs.closable&&!e.disabled,onClose:s},{default:t.withCtx(()=>[e.circle?(t.openBlock(),t.createElementBlock("span",{key:0,class:"inline-block rounded-full",style:t.normalizeStyle({backgroundColor:e.type?`var(--el-color-${e.type})`:e.circleColor,width:`${e.circleW}px`,height:`${e.circleH}px`})},null,4)):t.createCommentVNode("v-if",!0),t.createTextVNode(" "+t.toDisplayString(e.title),1)]),_:1},8,["effect","class","type","style","closable"])}}}),y="",r=i(((e,c)=>{const l=e.__vccOpts||e;for(const[n,a]of c)l[n]=a;return l})(d,[["__scopeId","data-v-699d5162"]]));o.IkStatu=r,o.default=r,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/IkStatu/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ik-statu-tag[data-v-
|
|
1
|
+
.ik-statu-tag[data-v-699d5162]{margin:5px 0}.ik-statu-tag[data-v-699d5162]:not(:first-child){margin-left:5px}.el-tag[data-v-699d5162]{border:none;border-radius:6px}.el-tag--primary[data-v-699d5162]{color:var(--ik-color-primary);background-color:var(--ik-color-primary-light)}.el-tag--success[data-v-699d5162]{color:var(--ik-color-success);background-color:var(--ik-color-success-light)}.el-tag--warning[data-v-699d5162]{color:var(--ik-color-warning);background-color:var(--ik-color-warning-light)}.el-tag--info[data-v-699d5162]{color:var(--ik-color-info);background-color:var(--ik-color-info-light)}.el-tag--danger[data-v-699d5162]{color:var(--ik-color-error);background-color:var(--ik-color-error-light)}.el-tag--cyan[data-v-699d5162]{color:var(--ik-color-cyan);background-color:var(--ik-color-cyan-light)}.el-tag--blueBlack[data-v-699d5162]{color:var(--ik-color-blueBlack);background-color:var(--ik-color-blueBlack-light)}.el-tag--purple[data-v-699d5162]{color:var(--ik-color-purple);background-color:var(--ik-color-purple-light)}.el-tag--orange[data-v-699d5162]{color:var(--ik-color-orange);background-color:var(--ik-color-orange-light)}.el-tag--brown[data-v-699d5162]{color:var(--ik-color-brown);background-color:var(--ik-color-brown-light)}
|
|
@@ -72,11 +72,10 @@ const w = (t, n) => {
|
|
|
72
72
|
},
|
|
73
73
|
emits: ["close"],
|
|
74
74
|
setup(t, { emit: n }) {
|
|
75
|
-
const l = t, o = f(() => l.type ?
|
|
75
|
+
const l = t, o = f(() => l.type ? `var(--el-color-${l.type})` : {
|
|
76
76
|
color: l.color,
|
|
77
77
|
backgroundColor: l.background,
|
|
78
78
|
border: "none"
|
|
79
|
-
// borderColor: props.color
|
|
80
79
|
}), c = n, d = () => {
|
|
81
80
|
c("close");
|
|
82
81
|
};
|
|
@@ -118,7 +117,7 @@ const w = (t, n) => {
|
|
|
118
117
|
};
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
|
-
const H = /* @__PURE__ */ A(E, [["__scopeId", "data-v-
|
|
120
|
+
const H = /* @__PURE__ */ A(E, [["__scopeId", "data-v-699d5162"]]), B = w(H), R = /* @__PURE__ */ I({
|
|
122
121
|
__name: "index",
|
|
123
122
|
props: {
|
|
124
123
|
// 超出长度时以 +2 这样的方式显示
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(r,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):(r=typeof globalThis<"u"?globalThis:r||self,e(r.index={},r.vue,r["iking-utils-pro"]))})(this,function(r,e,B){"use strict";const k=(o,c)=>{if(o.install=l=>{for(const n of[o,...Object.values(c??{})])l.component(n.name,n)},c)for(const[l,n]of Object.entries(c))o[l]=n;return o},m=(o,c)=>{const l=o.__vccOpts||o;for(const[n,s]of c)l[n]=s;return l},S=e.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:""},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"light"},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:c}){const l=o,n=e.computed(()=>l.type
|
|
1
|
+
(function(r,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):(r=typeof globalThis<"u"?globalThis:r||self,e(r.index={},r.vue,r["iking-utils-pro"]))})(this,function(r,e,B){"use strict";const k=(o,c)=>{if(o.install=l=>{for(const n of[o,...Object.values(c??{})])l.component(n.name,n)},c)for(const[l,n]of Object.entries(c))o[l]=n;return o},m=(o,c)=>{const l=o.__vccOpts||o;for(const[n,s]of c)l[n]=s;return l},S=e.defineComponent({__name:"index",props:{title:{type:String,default:""},type:{type:String,default:""},color:{type:String,default:""},background:{type:String,default:""},circleColor:{type:String,default:""},effect:{type:String,default:"light"},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:c}){const l=o,n=e.computed(()=>l.type?`var(--el-color-${l.type})`:{color:l.color,backgroundColor:l.background,border:"none"}),s=c,d=()=>{s("close")};return(f,h)=>{const y=e.resolveComponent("el-tag");return e.openBlock(),e.createBlock(y,{effect:o.effect,class:e.normalizeClass(["ik-statu-tag",{disabled:o.disabled}]),type:o.type,style:e.normalizeStyle(n.value),closable:f.$attrs.closable&&!o.disabled,onClose:d},{default:e.withCtx(()=>[o.circle?(e.openBlock(),e.createElementBlock("span",{key:0,class:"inline-block rounded-full",style:e.normalizeStyle({backgroundColor:o.type?`var(--el-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"])}}}),T="",_=k(m(S,[["__scopeId","data-v-699d5162"]])),x=e.defineComponent({__name:"index",props:{overfolw:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},data:{type:Array,default:()=>[]}},emits:["close"],setup(o,{emit:c}){const l=o,n=e.computed(()=>Array.isArray(l.list)?l.list:typeof l.list=="string"?l.list.split(",").map((a,p)=>{var i;return{...((i=l.data)==null?void 0:i[p])||{},title:a,type:""}}):[]),s=e.ref(null),d=e.computed(()=>{if(s.value){const a=s.value.clientWidth;let p=24;const i=[];let u=0;for(const t of n.value){const g=B.ikDom.useTextWidth(String((t==null?void 0:t.title)||t));p+=g+40,(p<=a||!u)&&i.push(t),u++}return i}return n.value}),f=e.computed(()=>n.value.length-d.value.length),h=e.computed(()=>n.value.slice(d.value.length)),y=c,C=a=>{y("close",a)};return(a,p)=>{const i=e.resolveComponent("el-tag"),u=e.resolveComponent("el-popover");return e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:s,class:"tag-container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.title},[t.title!=="--"?(e.openBlock(),e.createBlock(e.unref(_),e.mergeProps({key:0,title:t.title,onClose:g=>C(t),color:t.color,background:t.background,type:t.type,ref_for:!0},a.$attrs,{circle:!1,disabled:t==null?void 0:t.disabled}),null,16,["title","onClose","color","background","type","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.title),1)],64))],64))),128)),f.value?(e.openBlock(),e.createBlock(u,{key:0,placement:"bottom","popper-class":"ik-statu-over",trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(i,{class:"more-tags",type:"info",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(f.value),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,t=>(e.openBlock(),e.createBlock(e.unref(_),e.mergeProps({key:t.title,title:t.title,color:t.color,onClose:g=>C(t),background:t.background,type:t.type,circle:!1,ref_for:!0},a.$attrs,{disabled:t==null?void 0:t.disabled}),null,16,["title","color","onClose","background","type","disabled"]))),128))])]),_:1})):e.createCommentVNode("v-if",!0)],512)}}}),$="",O="",b=k(m(x,[["__scopeId","data-v-e872e623"]]));r.IkStatuOver=b,r.default=b,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ik-statu-tag[data-v-
|
|
1
|
+
.ik-statu-tag[data-v-699d5162]{margin:5px 0}.ik-statu-tag[data-v-699d5162]:not(:first-child){margin-left:5px}.el-tag[data-v-699d5162]{border:none;border-radius:6px}.el-tag--primary[data-v-699d5162]{color:var(--ik-color-primary);background-color:var(--ik-color-primary-light)}.el-tag--success[data-v-699d5162]{color:var(--ik-color-success);background-color:var(--ik-color-success-light)}.el-tag--warning[data-v-699d5162]{color:var(--ik-color-warning);background-color:var(--ik-color-warning-light)}.el-tag--info[data-v-699d5162]{color:var(--ik-color-info);background-color:var(--ik-color-info-light)}.el-tag--danger[data-v-699d5162]{color:var(--ik-color-error);background-color:var(--ik-color-error-light)}.el-tag--cyan[data-v-699d5162]{color:var(--ik-color-cyan);background-color:var(--ik-color-cyan-light)}.el-tag--blueBlack[data-v-699d5162]{color:var(--ik-color-blueBlack);background-color:var(--ik-color-blueBlack-light)}.el-tag--purple[data-v-699d5162]{color:var(--ik-color-purple);background-color:var(--ik-color-purple-light)}.el-tag--orange[data-v-699d5162]{color:var(--ik-color-orange);background-color:var(--ik-color-orange-light)}.el-tag--brown[data-v-699d5162]{color:var(--ik-color-brown);background-color:var(--ik-color-brown-light)}.ik-statu-over{width:auto!important;min-width:0!important}.tag-container[data-v-e872e623]{display:flex;width:100%}.tag-container .ik-statu-tag[data-v-e872e623]{max-width:calc(100% - 46px)}.tag-container .el-tag[data-v-e872e623]:not(:last-child){margin-right:5px}.tag-container[data-v-e872e623] .el-tag__content{display:inline-block!important;width:100%;overflow:hidden;text-overflow:ellipsis}.more-tags[data-v-e872e623]{margin:5px 0}
|