iking-web-ui-pro 0.2.20 → 0.2.22
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/IKExpandCollapse/ik.index.es.js +67 -64
- package/dist/IKExpandCollapse/ik.index.umd.js +1 -1
- package/dist/IKExpandCollapse/style.css +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +279 -276
- package/dist/IKPreviewFile/ik.index.umd.js +16 -16
- package/dist/IKPreviewFile/style.css +1 -1
- package/dist/IKVerticalStepBar/ik.index.es.js +102 -99
- package/dist/IKVerticalStepBar/ik.index.umd.js +3 -3
- package/dist/IKVerticalStepBar/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +279 -276
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkBaseDialog/ik.index.es.js +113 -110
- package/dist/IkBaseDialog/ik.index.umd.js +1 -1
- package/dist/IkBaseDialog/style.css +1 -1
- package/dist/IkBtnSetting/ik.index.es.js +208 -205
- package/dist/IkBtnSetting/ik.index.umd.js +1 -1
- package/dist/IkBtnSetting/style.css +1 -1
- package/dist/IkCollapseCard/ik.index.es.js +75 -72
- package/dist/IkCollapseCard/ik.index.umd.js +1 -1
- package/dist/IkCollapseCard/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +413 -410
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDescription/style.css +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +272 -269
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IkDetailPreviewFiles/style.css +1 -1
- package/dist/IkIconPicker/ik.index.es.js +146 -143
- package/dist/IkIconPicker/ik.index.umd.js +1 -1
- package/dist/IkIconPicker/style.css +1 -1
- package/dist/IkMonacoEditor/ik.index.es.js +156 -153
- package/dist/IkMonacoEditor/ik.index.umd.js +3 -3
- package/dist/IkMonacoEditor/style.css +1 -1
- package/dist/IkPageFull/ik.index.es.js +1129 -1126
- package/dist/IkPageFull/ik.index.umd.js +2 -2
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +556 -553
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/style.css +1 -1
- package/dist/IkSchedule/ik.index.es.js +1432 -1429
- package/dist/IkSchedule/ik.index.umd.js +1 -1
- package/dist/IkSchedule/style.css +1 -1
- package/dist/IkSideText/ik.index.es.js +99 -96
- package/dist/IkSideText/ik.index.umd.js +1 -1
- package/dist/IkSideText/style.css +1 -1
- package/dist/IkSvgIcon/ik.index.es.js +54 -51
- package/dist/IkSvgIcon/ik.index.umd.js +1 -1
- package/dist/IkSvgIcon/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +697 -694
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +204 -201
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/Provider/ik.index.es.js +10 -14
- package/dist/Provider/ik.index.umd.js +1 -1
- package/dist/index.es.js +4121 -4122
- package/dist/index.umd.js +2 -2
- package/dist/src/components/IkSvgIcon/index.d.ts +6 -2
- package/dist/src/components/IkSvgIcon/src/index.vue.d.ts +6 -2
- package/dist/src/components/Provider/ProviderConfig.vue.d.ts +0 -9
- package/dist/src/components/Provider/index.d.ts +0 -19
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro","vuedraggable"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.index={},_.vue,_["iking-utils-pro"],_.vuedraggable))})(this,function(_,e,g,T){"use strict";const v=(l,h)=>{if(l.install=o=>{for(const t of[l,...Object.values(h??{})])o.component(t.name,t)},h)for(const[o,t]of Object.entries(h))l[o]=t;return l};/*! Element Plus Icons Vue v2.3.1 */var j=e.defineComponent({name:"DCaret",__name:"d-caret",setup(l){return(h,o)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m512 128 288 320H224zM224 576h576L512 896z"})]))}}),L=j;const x=(l,h)=>{const o=l.__vccOpts||l;for(const[t,u]of h)o[t]=u;return o},O={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},M={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},F=["xlink:href"],A=["src"],q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},W=["xlink:href"],H=["src"],X=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},setup(l){const h=l,o=e.inject("iconConfig"),t=e.computed(()=>({...(o==null?void 0:o.value)||{},...h})),u=e.computed(()=>{const{name:a}=t.value;return/^http?:\/\//.test(a)?"img":/i-[^:]+:[^:]+/.test(a)?"unocss":a!=null&&a.startsWith("iksig")?"iksig":a!=null&&a.includes(":")?"iconify":a!=null&&a.startsWith("iksvg")?"svg":"i"}),i=e.computed(()=>{const a=[];if(t.value.flip)switch(t.value.flip){case"horizontal":a.push("rotateY(180deg)");break;case"vertical":a.push("rotateX(180deg)");break;case"both":a.push("rotateX(180deg)"),a.push("rotateY(180deg)");break}t.value.rotate&&a.push(`rotate(${t.value.rotate%360}deg)`);const B={...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...a.length&&{transform:a.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&u.value!=="iksig"?{"--ik-color-icon-dark":t.value.color,"--ik-color-icon-light":t.value.colorLight||g.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(B.width=B.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),B});return(a,B)=>{const S=e.resolveComponent("el-tooltip"),p=e.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(e.openBlock(),e.createElementBlock("span",O,[t.value.notip||!t.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[a.name]:u.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:a.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:e.normalizeStyle(i.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),u.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(i.value)},null,6)):u.value==="svg"?(e.openBlock(),e.createElementBlock("svg",M,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,F)])):u.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,A)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(i.value)},null,6))],6)):(e.openBlock(),e.createBlock(S,{key:1,content:t.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[a.name]:u.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:a.primary||t.value.type==="primary",success:a.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),style:e.normalizeStyle(i.value)},[u.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(i.value)},null,6)):u.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,W)])):u.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,H)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(i.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(p,{key:1,type:["warning","error"].includes(t.value.type)?"danger":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),oe="",Y=v(x(X,[["__scopeId","data-v-ec9fdc8a"]])),E={animation:200,group:"gl",disabled:!1,ghostClass:"ghost",sort:!0,delay:100,showIcon:!0,itemStyle:{radius:4,bottom:8,background:"var(--ik-sub-sidebar-menu-bg)"}},R={list:{required:!0,type:Array,default:[]},group:{type:String,default:"draggable"},sort:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},delay:{type:Number,default:0},touchStartThreshold:{type:Number,default:0},disabled:{type:Boolean,default:!1},animation:{type:Number,default:200},handle:{type:String,default:".mover"},filter:{type:String,default:".unmover"},draggable:{type:String,default:".item"},ghostClass:{type:String,default:"ghost"},chosenClass:{type:String,default:"chosen"},dragClass:{type:String,default:"drag"},forceFallback:{type:Boolean,default:!1},fallbackClass:{type:String,default:"fallback"},fallbackOnBody:{type:Boolean,default:!1},fallbackTolerance:{type:Number,default:8},scroll:{type:Boolean,default:!0},scrollFn:{type:Function,default:()=>{}},scrollFensitivity:{type:Number,default:30},scrollSpeed:{type:Number,default:30},itemClass:{type:String,default:""},groupClass:{type:String,default:""},itemStyle:{type:Object,default:()=>({radius:{type:Number,default:30},bottom:{type:Number,default:8},background:{type:String,default:"var(--ik-sub-sidebar-menu-bg)"}})}},G=e.defineComponent({__name:"IkDragList",props:R,emits:["change"],setup(l,{emit:h}){const o=l,t=h,u=e.ref([]);e.watch(()=>o.list,p=>{u.value=g._.cloneDeep(p)},{immediate:!0,deep:!0});const i=e.computed(()=>({...E,...o,itemStyle:{...E.itemStyle,...o.itemStyle}})),a=e.ref(!1),B=()=>{a.value=!0},S=p=>{a.value=!1;const w=o.list[p.oldIndex];t("change",u.value,{...w,oldIndex:p.oldIndex,newIndex:p.newIndex})};return(p,w)=>{const f=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(e.unref(T),{modelValue:u.value,"onUpdate:modelValue":w[0]||(w[0]=r=>u.value=r),class:e.normalizeClass(["list-group",[i.value.groupClass]]),tag:"ul",attrs:i.value,animation:i.value.animation,group:i.value.group,disabled:i.value.disabled,"ghost-class":i.value.ghostClass,"force-fallback":i.value.ghostClass,"item-key":"order",onStart:B,onEnd:S},{item:e.withCtx(({element:r})=>[e.createVNode(e.Transition,{type:"transition",name:"flip-list"},{default:e.withCtx(()=>[p.$slots.item?e.renderSlot(p.$slots,"item",{key:0,item:r},void 0,!0):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["list-group-item",[i.value.itemClass]]),style:e.normalizeStyle({borderRadius:`${i.value.itemStyle.radius}px`,marginBottom:`${i.value.itemStyle.bottom}px`,backgroundColor:`${i.value.itemStyle.background}`})},[i.value.showIcon&&!p.$slots.icon?(e.openBlock(),e.createBlock(f,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:1})):e.renderSlot(p.$slots,"icon",{key:1},void 0,!0),e.createTextVNode(" "+e.toDisplayString(r.label),1)],6))]),_:2},1024)]),_:3},8,["modelValue","class","attrs","animation","group","disabled","ghost-class","force-fallback"])}}}),se="",J=v(x(G,[["__scopeId","data-v-3716c05e"]])),K=(l=>(e.pushScopeId("data-v-b5ed17ed"),l=l(),e.popScopeId(),l))(()=>e.createElementVNode("i",{class:"ik ik-shezhi"},null,-1)),Q={class:"check-right"},Z={class:"dialog-footer"},U=e.defineComponent({__name:"IkBtnSetting",props:e.mergeModels({list:{type:Array,default:()=>[]},tab:{type:[String,Number],default:""},type:{type:String,default:"primary"},btnType:{type:String,default:"icon"},circle:{type:Boolean,default:!0},inline:{type:Boolean,default:!1},role:{type:String,default:""},config:{type:Object,default:()=>({t:l=>l,dialog:{l:"700px",sl:"600px"},path:"user_0",user:{id:"111"}})}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["sort"],["update:modelValue"]),setup(l,{emit:h}){const o=l,t=h,u=e.useModel(l,"modelValue"),{t:i,dialog:a,path:B,user:S}=o.config,p=e.computed(()=>`${S==null?void 0:S.id}_${B}${o.tab!==""?`_${o.tab}`:""}`),w=e.ref([]),f=e.ref([]),r=e.ref([]),V=new Map,I=e.ref(!1),P=e.computed(()=>{const c=f.value.length&&f.value.length!==o.list.length;return!c&&f.value.length&&(I.value=!0),!!c}),N=c=>{var d;const n=g._.cloneDeep(r.value);n==null||n.forEach(s=>{var b;if(!f.value.length)r.value=[];else if(!f.value.includes(s==null?void 0:s.key)){const k=(b=r.value)==null?void 0:b.findIndex(m=>m.key===s.key);k!==-1&&r.value.splice(k,1),s.show=!1,V.set(s.key,s)}}),f.value.forEach(s=>{var k;if(((k=r.value)==null?void 0:k.findIndex(m=>(m==null?void 0:m.key)===s))===-1){const m=V.get(s);m&&(m.show=!0,r.value.push(m))}}),(d=r.value)!=null&&d.length||(r.value=g._.cloneDeep(o.list)),c===!0&&(t("sort",g._.cloneDeep(r.value)),u.value=g._.cloneDeep(r.value))},ee=c=>{if(c)f.value=o.list.map(n=>n.key);else{const n=o.list.find(d=>!d.key||d.label==="操作");f.value=n?[n.key]:[]}N()},z=()=>{const c=g.ikStore.local.getItem(p.value);try{const n=g._.cloneDeep(o==null?void 0:o.list);if((!c||!(c!=null&&c.length))&&g.ikStore.local.setItem(p.value,n.map(({show:d,type:s,key:b,label:k,width:m,minWidth:y,align:ae})=>({show:d,key:b,type:s,label:k,width:m,minWidth:y,align:ae}))),w.value=[...(n==null?void 0:n.map(d=>(V.set(d.key,d),{...d,show:d.show||!1})))||[]],c){const d=c.filter(s=>s.show).map(s=>s.key);f.value=[...d]}else{const d=w.value.filter(s=>s.show);f.value=d.map(s=>s.key)}N(!0)}catch(n){console.info("error: ",n)}};z(),e.watch(()=>o.list,()=>{z()},{deep:!0});const C=e.ref(!1),D=()=>{C.value=!0},te=c=>{r.value=c},le=()=>{C.value=!1,g.ikStore.local.setItem(p.value,r.value.map(({show:c,key:n,label:d,value:s,width:b,minWidth:k,align:m})=>({show:c,key:n,label:d,value:s,width:b,minWidth:k,align:m}))),t("sort",g._.cloneDeep(r.value)),u.value=g._.cloneDeep(r.value)};return(c,n)=>{const d=e.resolveComponent("el-button"),s=e.resolveComponent("el-checkbox"),b=e.resolveComponent("el-checkbox-group"),k=e.resolveComponent("el-dialog"),m=e.resolveDirective("role");return e.openBlock(),e.createElementBlock(e.Fragment,null,[l.btnType==="button"?e.withDirectives((e.openBlock(),e.createBlock(d,e.mergeProps({key:0},c.$attrs,{circle:l.circle,type:l.type,style:{minWidth:l.circle?"40px":"",minHeight:l.circle?"40px":""},onClick:D}),e.createSlots({icon:e.withCtx(()=>[K]),_:2},[l.circle?void 0:{name:"default",fn:e.withCtx(()=>[e.createCommentVNode(' {{ t("action.setting") }} '),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("设置")),1)]),key:"0"}]),1040,["circle","type","style"])),[[m,c.$props.role]]):e.createCommentVNode("v-if",!0),l.btnType==="icon"?e.withDirectives((e.openBlock(),e.createBlock(e.unref(Y),e.mergeProps({key:1,name:"iksvg_shezhi-daohang","show-bg":"",size:"default"},c.$attrs,{onClick:D}),null,16)),[[m,c.$props.role]]):e.createCommentVNode("v-if",!0),e.createVNode(k,{modelValue:C.value,"onUpdate:modelValue":n[3]||(n[3]=y=>C.value=y),draggable:"",width:l.inline?e.unref(a).l:e.unref(a).sl,"close-on-click-modal":!1,"close-on-press-escape":!1,title:"显示字段","append-to-body":"",onOpen:z},{footer:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(d,{onClick:n[2]||(n[2]=y=>C.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("关闭"))+" ",1),e.createCommentVNode(' {{ t("action.close") }} ')]),_:1}),e.createVNode(d,{type:"primary",disabled:r.value.length<2,onClick:le},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.length<2?"至少选择一个字段":e.unref(i)("确定")),1)]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["view-fields",[l.inline?null:"un-inline"]])},[e.createElementVNode("div",{style:e.normalizeStyle({flex:l.inline?2:1})},[e.createVNode(s,{modelValue:I.value,"onUpdate:modelValue":n[0]||(n[0]=y=>I.value=y),class:"single-line",indeterminate:P.value,onChange:ee},{default:e.withCtx(()=>[e.createTextVNode(" 全选 ")]),_:1},8,["modelValue","indeterminate"]),e.createVNode(b,{modelValue:f.value,"onUpdate:modelValue":n[1]||(n[1]=y=>f.value=y),onChange:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,y=>(e.openBlock(),e.createBlock(s,{key:y.key,disabled:!y.key,label:y.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["disabled","label"]))),128))]),_:1},8,["modelValue"])],4),e.createElementVNode("div",Q,[e.createVNode(e.unref(J),{list:r.value,"item-style":{bottom:4},onChange:te},null,8,["list"])])],2)]),_:1},8,["modelValue","width"])],64)}}}),ce="",$=v(x(U,[["__scopeId","data-v-b5ed17ed"]]));_.IkBtnSetting=$,_.default=$,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils-pro"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils-pro","vuedraggable"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.index={},b.vue,b["iking-utils-pro"],b.vuedraggable))})(this,function(b,e,g,T){"use strict";const v=(a,h)=>{if(a.install=o=>{for(const t of[a,...Object.values(h??{})])o.component(t.name,t)},h)for(const[o,t]of Object.entries(h))a[o]=t;return a};/*! Element Plus Icons Vue v2.3.1 */var M=e.defineComponent({name:"DCaret",__name:"d-caret",setup(a){return(h,o)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m512 128 288 320H224zM224 576h576L512 896z"})]))}}),j=M;const x=(a,h)=>{const o=a.__vccOpts||a;for(const[t,u]of h)o[t]=u;return o},L={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},O={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},F=["xlink:href"],A=["src"],q={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},W=["xlink:href"],H=["src"],X=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},emits:["click"],setup(a,{emit:h}){const o=a,t=e.computed(()=>o),u=e.computed(()=>{const{name:l}=t.value;return/^http?:\/\//.test(l)?"img":/i-[^:]+:[^:]+/.test(l)?"unocss":l!=null&&l.startsWith("iksig")?"iksig":l!=null&&l.includes(":")?"iconify":l!=null&&l.startsWith("iksvg")?"svg":"i"}),i=e.computed(()=>{const l=[];if(t.value.flip)switch(t.value.flip){case"horizontal":l.push("rotateY(180deg)");break;case"vertical":l.push("rotateX(180deg)");break;case"both":l.push("rotateX(180deg)"),l.push("rotateY(180deg)");break}t.value.rotate&&l.push(`rotate(${t.value.rotate%360}deg)`);const p={...t.value.color&&{color:t.value.color},...t.value.size&&{fontSize:typeof t.value.size=="number"?`${t.value.size}px`:t.value.size},...l.length&&{transform:l.join(" ")},padding:t.value.showBg||t.value.bg?t.value.padding:0,...t.value.color&&u.value!=="iksig"?{"--ik-color-icon-dark":t.value.color,"--ik-color-icon-light":t.value.colorLight||g.ikColor.setOpacity(t.value.color,t.value.opacity)}:{}};return t.value.width&&(p.width=p.height=typeof t.value.width=="number"?`${t.value.width}px`:t.value.width),p}),B=h,C=l=>{t.value.disabled||B("click",l)};return(l,p)=>{const _=e.resolveComponent("el-tooltip"),m=e.resolveComponent("el-button");return t.value.tableIconType==="icon"||!t.value.tableIconType?(e.openBlock(),e.createElementBlock("span",L,[t.value.notip||!t.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,onClick:e.withModifiers(C,["stop"]),class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[l.name]:u.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:t.value.primary||t.value.type==="primary",success:l.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active,disabled:t.value.disabled}]),style:e.normalizeStyle(i.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),u.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(i.value)},null,6)):u.value==="svg"?(e.openBlock(),e.createElementBlock("svg",O,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,F)])):u.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,A)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(i.value)},null,6))],6)):(e.openBlock(),e.createBlock(_,{key:1,content:t.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[l.name]:u.value==="unocss","show-bg":t.value.showBg||t.value.bg,default:t.value.size==="default",small:t.value.size==="small",big:t.value.size==="big",warning:t.value.warning||t.value.type==="warning",primary:l.primary||t.value.type==="primary",success:l.success||t.value.type==="success",error:t.value.error||t.value.type==="error",active:t.value.active}]),onClick:e.withModifiers(C,["stop"]),style:e.normalizeStyle(i.value)},[u.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.value.name}`),style:e.normalizeStyle(i.value)},null,6)):u.value==="svg"?(e.openBlock(),e.createElementBlock("svg",q,[e.createElementVNode("use",{"xlink:href":`#${t.value.name}`},null,8,W)])):u.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.name,class:"h-[1em] w-[1em]"},null,8,H)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.value.name),style:e.normalizeStyle(i.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(m,{key:1,type:["warning","error"].includes(t.value.type)?"danger":"",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value.title),1)]),_:1},8,["type"]))}}}),oe="",Y=v(x(X,[["__scopeId","data-v-4a1004b9"]])),E={animation:200,group:"gl",disabled:!1,ghostClass:"ghost",sort:!0,delay:100,showIcon:!0,itemStyle:{radius:4,bottom:8,background:"var(--ik-sub-sidebar-menu-bg)"}},R={list:{required:!0,type:Array,default:[]},group:{type:String,default:"draggable"},sort:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},delay:{type:Number,default:0},touchStartThreshold:{type:Number,default:0},disabled:{type:Boolean,default:!1},animation:{type:Number,default:200},handle:{type:String,default:".mover"},filter:{type:String,default:".unmover"},draggable:{type:String,default:".item"},ghostClass:{type:String,default:"ghost"},chosenClass:{type:String,default:"chosen"},dragClass:{type:String,default:"drag"},forceFallback:{type:Boolean,default:!1},fallbackClass:{type:String,default:"fallback"},fallbackOnBody:{type:Boolean,default:!1},fallbackTolerance:{type:Number,default:8},scroll:{type:Boolean,default:!0},scrollFn:{type:Function,default:()=>{}},scrollFensitivity:{type:Number,default:30},scrollSpeed:{type:Number,default:30},itemClass:{type:String,default:""},groupClass:{type:String,default:""},itemStyle:{type:Object,default:()=>({radius:{type:Number,default:30},bottom:{type:Number,default:8},background:{type:String,default:"var(--ik-sub-sidebar-menu-bg)"}})}},G=e.defineComponent({__name:"IkDragList",props:R,emits:["change"],setup(a,{emit:h}){const o=a,t=h,u=e.ref([]);e.watch(()=>o.list,p=>{u.value=g._.cloneDeep(p)},{immediate:!0,deep:!0});const i=e.computed(()=>({...E,...o,itemStyle:{...E.itemStyle,...o.itemStyle}})),B=e.ref(!1),C=()=>{B.value=!0},l=p=>{B.value=!1;const _=o.list[p.oldIndex];t("change",u.value,{..._,oldIndex:p.oldIndex,newIndex:p.newIndex})};return(p,_)=>{const m=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(e.unref(T),{modelValue:u.value,"onUpdate:modelValue":_[0]||(_[0]=r=>u.value=r),class:e.normalizeClass(["list-group",[i.value.groupClass]]),tag:"ul",attrs:i.value,animation:i.value.animation,group:i.value.group,disabled:i.value.disabled,"ghost-class":i.value.ghostClass,"force-fallback":i.value.ghostClass,"item-key":"order",onStart:C,onEnd:l},{item:e.withCtx(({element:r})=>[e.createVNode(e.Transition,{type:"transition",name:"flip-list"},{default:e.withCtx(()=>[p.$slots.item?e.renderSlot(p.$slots,"item",{key:0,item:r},void 0,!0):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["list-group-item",[i.value.itemClass]]),style:e.normalizeStyle({borderRadius:`${i.value.itemStyle.radius}px`,marginBottom:`${i.value.itemStyle.bottom}px`,backgroundColor:`${i.value.itemStyle.background}`})},[i.value.showIcon&&!p.$slots.icon?(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(j))]),_:1})):e.renderSlot(p.$slots,"icon",{key:1},void 0,!0),e.createTextVNode(" "+e.toDisplayString(r.label),1)],6))]),_:2},1024)]),_:3},8,["modelValue","class","attrs","animation","group","disabled","ghost-class","force-fallback"])}}}),se="",J=v(x(G,[["__scopeId","data-v-3716c05e"]])),K=(a=>(e.pushScopeId("data-v-b5ed17ed"),a=a(),e.popScopeId(),a))(()=>e.createElementVNode("i",{class:"ik ik-shezhi"},null,-1)),Q={class:"check-right"},Z={class:"dialog-footer"},U=e.defineComponent({__name:"IkBtnSetting",props:e.mergeModels({list:{type:Array,default:()=>[]},tab:{type:[String,Number],default:""},type:{type:String,default:"primary"},btnType:{type:String,default:"icon"},circle:{type:Boolean,default:!0},inline:{type:Boolean,default:!1},role:{type:String,default:""},config:{type:Object,default:()=>({t:a=>a,dialog:{l:"700px",sl:"600px"},path:"user_0",user:{id:"111"}})}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["sort"],["update:modelValue"]),setup(a,{emit:h}){const o=a,t=h,u=e.useModel(a,"modelValue"),{t:i,dialog:B,path:C,user:l}=o.config,p=e.computed(()=>`${l==null?void 0:l.id}_${C}${o.tab!==""?`_${o.tab}`:""}`),_=e.ref([]),m=e.ref([]),r=e.ref([]),V=new Map,I=e.ref(!1),P=e.computed(()=>{const c=m.value.length&&m.value.length!==o.list.length;return!c&&m.value.length&&(I.value=!0),!!c}),N=c=>{var d;const n=g._.cloneDeep(r.value);n==null||n.forEach(s=>{var w;if(!m.value.length)r.value=[];else if(!m.value.includes(s==null?void 0:s.key)){const k=(w=r.value)==null?void 0:w.findIndex(f=>f.key===s.key);k!==-1&&r.value.splice(k,1),s.show=!1,V.set(s.key,s)}}),m.value.forEach(s=>{var k;if(((k=r.value)==null?void 0:k.findIndex(f=>(f==null?void 0:f.key)===s))===-1){const f=V.get(s);f&&(f.show=!0,r.value.push(f))}}),(d=r.value)!=null&&d.length||(r.value=g._.cloneDeep(o.list)),c===!0&&(t("sort",g._.cloneDeep(r.value)),u.value=g._.cloneDeep(r.value))},ee=c=>{if(c)m.value=o.list.map(n=>n.key);else{const n=o.list.find(d=>!d.key||d.label==="操作");m.value=n?[n.key]:[]}N()},z=()=>{const c=g.ikStore.local.getItem(p.value);try{const n=g._.cloneDeep(o==null?void 0:o.list);if((!c||!(c!=null&&c.length))&&g.ikStore.local.setItem(p.value,n.map(({show:d,type:s,key:w,label:k,width:f,minWidth:y,align:ae})=>({show:d,key:w,type:s,label:k,width:f,minWidth:y,align:ae}))),_.value=[...(n==null?void 0:n.map(d=>(V.set(d.key,d),{...d,show:d.show||!1})))||[]],c){const d=c.filter(s=>s.show).map(s=>s.key);m.value=[...d]}else{const d=_.value.filter(s=>s.show);m.value=d.map(s=>s.key)}N(!0)}catch(n){console.info("error: ",n)}};z(),e.watch(()=>o.list,()=>{z()},{deep:!0});const S=e.ref(!1),D=()=>{S.value=!0},te=c=>{r.value=c},le=()=>{S.value=!1,g.ikStore.local.setItem(p.value,r.value.map(({show:c,key:n,label:d,value:s,width:w,minWidth:k,align:f})=>({show:c,key:n,label:d,value:s,width:w,minWidth:k,align:f}))),t("sort",g._.cloneDeep(r.value)),u.value=g._.cloneDeep(r.value)};return(c,n)=>{const d=e.resolveComponent("el-button"),s=e.resolveComponent("el-checkbox"),w=e.resolveComponent("el-checkbox-group"),k=e.resolveComponent("el-dialog"),f=e.resolveDirective("role");return e.openBlock(),e.createElementBlock(e.Fragment,null,[a.btnType==="button"?e.withDirectives((e.openBlock(),e.createBlock(d,e.mergeProps({key:0},c.$attrs,{circle:a.circle,type:a.type,style:{minWidth:a.circle?"40px":"",minHeight:a.circle?"40px":""},onClick:D}),e.createSlots({icon:e.withCtx(()=>[K]),_:2},[a.circle?void 0:{name:"default",fn:e.withCtx(()=>[e.createCommentVNode(' {{ t("action.setting") }} '),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("设置")),1)]),key:"0"}]),1040,["circle","type","style"])),[[f,c.$props.role]]):e.createCommentVNode("v-if",!0),a.btnType==="icon"?e.withDirectives((e.openBlock(),e.createBlock(e.unref(Y),e.mergeProps({key:1,name:"iksvg_shezhi-daohang","show-bg":"",size:"default"},c.$attrs,{onClick:D}),null,16)),[[f,c.$props.role]]):e.createCommentVNode("v-if",!0),e.createVNode(k,{modelValue:S.value,"onUpdate:modelValue":n[3]||(n[3]=y=>S.value=y),draggable:"",width:a.inline?e.unref(B).l:e.unref(B).sl,"close-on-click-modal":!1,"close-on-press-escape":!1,title:"显示字段","append-to-body":"",onOpen:z},{footer:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(d,{onClick:n[2]||(n[2]=y=>S.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("关闭"))+" ",1),e.createCommentVNode(' {{ t("action.close") }} ')]),_:1}),e.createVNode(d,{type:"primary",disabled:r.value.length<2,onClick:le},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value.length<2?"至少选择一个字段":e.unref(i)("确定")),1)]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["view-fields",[a.inline?null:"un-inline"]])},[e.createElementVNode("div",{style:e.normalizeStyle({flex:a.inline?2:1})},[e.createVNode(s,{modelValue:I.value,"onUpdate:modelValue":n[0]||(n[0]=y=>I.value=y),class:"single-line",indeterminate:P.value,onChange:ee},{default:e.withCtx(()=>[e.createTextVNode(" 全选 ")]),_:1},8,["modelValue","indeterminate"]),e.createVNode(w,{modelValue:m.value,"onUpdate:modelValue":n[1]||(n[1]=y=>m.value=y),onChange:N},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,y=>(e.openBlock(),e.createBlock(s,{key:y.key,disabled:!y.key,label:y.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.label),1)]),_:2},1032,["disabled","label"]))),128))]),_:1},8,["modelValue"])],4),e.createElementVNode("div",Q,[e.createVNode(e.unref(J),{list:r.value,"item-style":{bottom:4},onChange:te},null,8,["list"])])],2)]),_:1},8,["modelValue","width"])],64)}}}),ce="",$=v(x(U,[["__scopeId","data-v-b5ed17ed"]]));b.IkBtnSetting=$,b.default=$,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.row-title[data-v-
|
|
1
|
+
.row-title[data-v-4a1004b9]{display:flex}.ik-svg-icon.ik-icon-span[data-v-4a1004b9]:not(:first-child){margin-left:var(--ik-margin-s-12)}.ghost[data-v-3716c05e]{opacity:.9;background:var(--el-color-primary)!important;color:var(--el-color-white)}.list-group[data-v-3716c05e]{height:100%;width:100%;color:var(--el-text-color-regular);transition:all .25s}.list-group-item[data-v-3716c05e]{cursor:move;border-radius:4px;background:var(--el-color-primary-light-9);margin-bottom:var(--base-m);padding:var(--base-p);-webkit-user-select:none;user-select:none;display:flex;align-items:center}.list-group-item[data-v-3716c05e]:hover{background:var(--el-color-primary-light-7)!important}.list-group-item i[data-v-3716c05e]{margin-right:calc(var(--base-m) / 2);cursor:pointer}.view-fields.un-inline .el-checkbox[data-v-b5ed17ed]{width:100%;background:var(--ik-sub-sidebar-menu-bg);margin:2px 0;padding:8px;border-radius:4px;height:37px}.view-fields[data-v-b5ed17ed]{display:flex;justify-content:space-between;max-height:55vh;overflow-y:auto;overflow-x:hidden}.view-fields .check-right[data-v-b5ed17ed]{margin-top:37px}.view-fields .single-line[data-v-b5ed17ed]{background-color:transparent!important}.view-fields>div[data-v-b5ed17ed]:nth-child(1){padding-right:8px;flex:2;border-right:1px solid var(--el-border-color)}.view-fields>div[data-v-b5ed17ed]:nth-child(2){flex:1;margin-left:8px}.view-fields>div:nth-child(2) .field-sort[data-v-b5ed17ed]{cursor:move;padding:calc(var(--base-p) / 2);color:var(--el-text-color-regular)}.view-fields .el-checkbox[data-v-b5ed17ed]{width:195px;margin-right:0}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ikColor as
|
|
3
|
-
const
|
|
4
|
-
if (s.install = (
|
|
1
|
+
import { defineComponent as w, computed as _, resolveComponent as m, openBlock as a, createElementBlock as n, withModifiers as k, normalizeClass as r, normalizeStyle as c, createCommentVNode as d, createElementVNode as v, createBlock as y, withCtx as p, createTextVNode as B, toDisplayString as x, mergeModels as T, useModel as j, renderSlot as b, createVNode as S, unref as V } from "vue";
|
|
2
|
+
import { ikColor as M } from "iking-utils-pro";
|
|
3
|
+
const z = (s, o) => {
|
|
4
|
+
if (s.install = (i) => {
|
|
5
5
|
for (const e of [s, ...Object.values(o ?? {})])
|
|
6
|
-
|
|
6
|
+
i.component(e.name, e);
|
|
7
7
|
}, o)
|
|
8
|
-
for (const [
|
|
9
|
-
s[
|
|
8
|
+
for (const [i, e] of Object.entries(o))
|
|
9
|
+
s[i] = e;
|
|
10
10
|
return s;
|
|
11
|
-
},
|
|
12
|
-
const
|
|
11
|
+
}, C = (s, o) => {
|
|
12
|
+
const i = s.__vccOpts || s;
|
|
13
13
|
for (const [e, t] of o)
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
},
|
|
14
|
+
i[e] = t;
|
|
15
|
+
return i;
|
|
16
|
+
}, N = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"
|
|
19
|
-
},
|
|
19
|
+
}, O = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "h-[1em] w-[1em]",
|
|
22
22
|
"aria-hidden": "true"
|
|
23
|
-
},
|
|
23
|
+
}, E = ["xlink:href"], L = ["src"], W = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "h-[1em] w-[1em]",
|
|
26
26
|
"aria-hidden": "true"
|
|
27
|
-
},
|
|
27
|
+
}, X = ["xlink:href"], Y = ["src"], q = /* @__PURE__ */ w({
|
|
28
28
|
name: "IkSvgIcon",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -50,14 +50,12 @@ const w = (s, o) => {
|
|
|
50
50
|
warning: { type: Boolean },
|
|
51
51
|
width: {}
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
...o
|
|
57
|
-
})), t = m(() => {
|
|
53
|
+
emits: ["click"],
|
|
54
|
+
setup(s, { emit: o }) {
|
|
55
|
+
const i = s, e = _(() => i), t = _(() => {
|
|
58
56
|
const { name: l } = e.value;
|
|
59
57
|
return /^http?:\/\//.test(l) ? "img" : /i-[^:]+:[^:]+/.test(l) ? "unocss" : l != null && l.startsWith("iksig") ? "iksig" : l != null && l.includes(":") ? "iconify" : l != null && l.startsWith("iksvg") ? "svg" : "i";
|
|
60
|
-
}), u =
|
|
58
|
+
}), u = _(() => {
|
|
61
59
|
const l = [];
|
|
62
60
|
if (e.value.flip)
|
|
63
61
|
switch (e.value.flip) {
|
|
@@ -72,25 +70,28 @@ const w = (s, o) => {
|
|
|
72
70
|
break;
|
|
73
71
|
}
|
|
74
72
|
e.value.rotate && l.push(`rotate(${e.value.rotate % 360}deg)`);
|
|
75
|
-
const
|
|
73
|
+
const g = {
|
|
76
74
|
...e.value.color && { color: e.value.color },
|
|
77
75
|
...e.value.size && { fontSize: typeof e.value.size == "number" ? `${e.value.size}px` : e.value.size },
|
|
78
76
|
...l.length && { transform: l.join(" ") },
|
|
79
77
|
padding: e.value.showBg || e.value.bg ? e.value.padding : 0,
|
|
80
78
|
...e.value.color && t.value !== "iksig" ? {
|
|
81
79
|
"--ik-color-icon-dark": e.value.color,
|
|
82
|
-
"--ik-color-icon-light": e.value.colorLight ||
|
|
80
|
+
"--ik-color-icon-light": e.value.colorLight || M.setOpacity(e.value.color, e.value.opacity)
|
|
83
81
|
} : {}
|
|
84
82
|
};
|
|
85
|
-
return e.value.width && (
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
return e.value.width && (g.width = g.height = typeof e.value.width == "number" ? `${e.value.width}px` : e.value.width), g;
|
|
84
|
+
}), h = o, f = (l) => {
|
|
85
|
+
e.value.disabled || h("click", l);
|
|
86
|
+
};
|
|
87
|
+
return (l, g) => {
|
|
88
|
+
const $ = m("el-tooltip"), I = m("el-button");
|
|
89
|
+
return e.value.tableIconType === "icon" || !e.value.tableIconType ? (a(), n("span", N, [
|
|
90
|
+
e.value.notip || !e.value.title ? (a(), n(
|
|
91
91
|
"i",
|
|
92
92
|
{
|
|
93
93
|
key: 0,
|
|
94
|
+
onClick: k(f, ["stop"]),
|
|
94
95
|
class: r(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
95
96
|
[l.name]: t.value === "unocss",
|
|
96
97
|
"show-bg": e.value.showBg || e.value.bg,
|
|
@@ -107,8 +108,8 @@ const w = (s, o) => {
|
|
|
107
108
|
style: c(u.value)
|
|
108
109
|
},
|
|
109
110
|
[
|
|
110
|
-
|
|
111
|
-
t.value === "iksig" ? (a(),
|
|
111
|
+
d(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
112
|
+
t.value === "iksig" ? (a(), n(
|
|
112
113
|
"i",
|
|
113
114
|
{
|
|
114
115
|
key: 0,
|
|
@@ -118,15 +119,15 @@ const w = (s, o) => {
|
|
|
118
119
|
null,
|
|
119
120
|
6
|
|
120
121
|
/* CLASS, STYLE */
|
|
121
|
-
)) : t.value === "svg" ? (a(),
|
|
122
|
+
)) : t.value === "svg" ? (a(), n("svg", O, [
|
|
122
123
|
v("use", {
|
|
123
124
|
"xlink:href": `#${e.value.name}`
|
|
124
|
-
}, null, 8,
|
|
125
|
-
])) : t.value === "img" ? (a(),
|
|
125
|
+
}, null, 8, E)
|
|
126
|
+
])) : t.value === "img" ? (a(), n("img", {
|
|
126
127
|
key: 2,
|
|
127
128
|
src: e.value.name,
|
|
128
129
|
class: "h-[1em] w-[1em]"
|
|
129
|
-
}, null, 8,
|
|
130
|
+
}, null, 8, L)) : (a(), n(
|
|
130
131
|
"i",
|
|
131
132
|
{
|
|
132
133
|
key: 3,
|
|
@@ -140,12 +141,12 @@ const w = (s, o) => {
|
|
|
140
141
|
],
|
|
141
142
|
6
|
|
142
143
|
/* CLASS, STYLE */
|
|
143
|
-
)) : (a(), y(
|
|
144
|
+
)) : (a(), y($, {
|
|
144
145
|
key: 1,
|
|
145
146
|
content: e.value.title,
|
|
146
147
|
placement: "top"
|
|
147
148
|
}, {
|
|
148
|
-
default:
|
|
149
|
+
default: p(() => [
|
|
149
150
|
v(
|
|
150
151
|
"i",
|
|
151
152
|
{
|
|
@@ -161,10 +162,11 @@ const w = (s, o) => {
|
|
|
161
162
|
error: e.value.error || e.value.type === "error",
|
|
162
163
|
active: e.value.active
|
|
163
164
|
}]),
|
|
165
|
+
onClick: k(f, ["stop"]),
|
|
164
166
|
style: c(u.value)
|
|
165
167
|
},
|
|
166
168
|
[
|
|
167
|
-
t.value === "iksig" ? (a(),
|
|
169
|
+
t.value === "iksig" ? (a(), n(
|
|
168
170
|
"i",
|
|
169
171
|
{
|
|
170
172
|
key: 0,
|
|
@@ -174,15 +176,15 @@ const w = (s, o) => {
|
|
|
174
176
|
null,
|
|
175
177
|
6
|
|
176
178
|
/* CLASS, STYLE */
|
|
177
|
-
)) : t.value === "svg" ? (a(),
|
|
179
|
+
)) : t.value === "svg" ? (a(), n("svg", W, [
|
|
178
180
|
v("use", {
|
|
179
181
|
"xlink:href": `#${e.value.name}`
|
|
180
|
-
}, null, 8,
|
|
181
|
-
])) : t.value === "img" ? (a(),
|
|
182
|
+
}, null, 8, X)
|
|
183
|
+
])) : t.value === "img" ? (a(), n("img", {
|
|
182
184
|
key: 2,
|
|
183
185
|
src: e.value.name,
|
|
184
186
|
class: "h-[1em] w-[1em]"
|
|
185
|
-
}, null, 8,
|
|
187
|
+
}, null, 8, Y)) : (a(), n(
|
|
186
188
|
"i",
|
|
187
189
|
{
|
|
188
190
|
key: 3,
|
|
@@ -201,13 +203,14 @@ const w = (s, o) => {
|
|
|
201
203
|
_: 1
|
|
202
204
|
/* STABLE */
|
|
203
205
|
}, 8, ["content"]))
|
|
204
|
-
])) : (a(), y(
|
|
206
|
+
])) : (a(), y(I, {
|
|
205
207
|
key: 1,
|
|
206
|
-
type: ["warning", "error"].includes(e.value.type) ? "danger" : ""
|
|
208
|
+
type: ["warning", "error"].includes(e.value.type) ? "danger" : "",
|
|
209
|
+
onClick: k(f, ["stop"])
|
|
207
210
|
}, {
|
|
208
|
-
default:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
default: p(() => [
|
|
212
|
+
B(
|
|
213
|
+
x(e.value.title),
|
|
211
214
|
1
|
|
212
215
|
/* TEXT */
|
|
213
216
|
)
|
|
@@ -218,9 +221,9 @@ const w = (s, o) => {
|
|
|
218
221
|
};
|
|
219
222
|
}
|
|
220
223
|
});
|
|
221
|
-
const
|
|
224
|
+
const D = /* @__PURE__ */ C(q, [["__scopeId", "data-v-4a1004b9"]]), A = z(D), F = { class: "align-center flex justify-between" }, G = { class: "align-center flex" }, H = { style: { overflow: "hidden" } }, J = /* @__PURE__ */ w({
|
|
222
225
|
__name: "index",
|
|
223
|
-
props: /* @__PURE__ */
|
|
226
|
+
props: /* @__PURE__ */ T({
|
|
224
227
|
showToggle: {
|
|
225
228
|
type: Boolean,
|
|
226
229
|
default: !0
|
|
@@ -234,36 +237,36 @@ const Y = /* @__PURE__ */ B(X, [["__scopeId", "data-v-ec9fdc8a"]]), q = w(Y), D
|
|
|
234
237
|
}),
|
|
235
238
|
emits: ["update:modelValue"],
|
|
236
239
|
setup(s) {
|
|
237
|
-
const o =
|
|
240
|
+
const o = j(s, "modelValue"), i = () => {
|
|
238
241
|
o.value = !o.value;
|
|
239
242
|
};
|
|
240
243
|
return (e, t) => {
|
|
241
|
-
const u =
|
|
242
|
-
return a(), y(
|
|
244
|
+
const u = m("el-button"), h = m("el-card");
|
|
245
|
+
return a(), y(h, {
|
|
243
246
|
class: r(["ik-collapse-box-card", o.value ? "hiddened" : ""]),
|
|
244
247
|
shadow: "hover"
|
|
245
248
|
}, {
|
|
246
|
-
header:
|
|
247
|
-
v("div",
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
v("div",
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
249
|
+
header: p(() => [
|
|
250
|
+
v("div", F, [
|
|
251
|
+
d(" card header左侧内容 "),
|
|
252
|
+
b(e.$slots, "header-leaft", {}, void 0, !0),
|
|
253
|
+
v("div", G, [
|
|
254
|
+
d(" card header右侧内容 "),
|
|
255
|
+
b(e.$slots, "header-right", {}, void 0, !0),
|
|
256
|
+
d(" 展开、收起按钮 "),
|
|
254
257
|
s.showToggle ? (a(), y(u, {
|
|
255
258
|
key: 0,
|
|
256
259
|
link: "",
|
|
257
260
|
class: "ml-[8px]",
|
|
258
|
-
onClick: t[0] || (t[0] = (
|
|
261
|
+
onClick: t[0] || (t[0] = (f) => i())
|
|
259
262
|
}, {
|
|
260
|
-
default:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
+
default: p(() => [
|
|
264
|
+
B(
|
|
265
|
+
x(o.value ? "展开" : "收起") + " ",
|
|
263
266
|
1
|
|
264
267
|
/* TEXT */
|
|
265
268
|
),
|
|
266
|
-
|
|
269
|
+
S(V(A), {
|
|
267
270
|
name: "iksvg_shouqi",
|
|
268
271
|
size: 16,
|
|
269
272
|
class: r(o.value ? "toogle" : null)
|
|
@@ -271,13 +274,13 @@ const Y = /* @__PURE__ */ B(X, [["__scopeId", "data-v-ec9fdc8a"]]), q = w(Y), D
|
|
|
271
274
|
]),
|
|
272
275
|
_: 1
|
|
273
276
|
/* STABLE */
|
|
274
|
-
})) :
|
|
277
|
+
})) : d("v-if", !0)
|
|
275
278
|
])
|
|
276
279
|
])
|
|
277
280
|
]),
|
|
278
|
-
default:
|
|
279
|
-
v("div",
|
|
280
|
-
|
|
281
|
+
default: p(() => [
|
|
282
|
+
v("div", H, [
|
|
283
|
+
b(e.$slots, "default", {}, void 0, !0)
|
|
281
284
|
])
|
|
282
285
|
]),
|
|
283
286
|
_: 3
|
|
@@ -286,8 +289,8 @@ const Y = /* @__PURE__ */ B(X, [["__scopeId", "data-v-ec9fdc8a"]]), q = w(Y), D
|
|
|
286
289
|
};
|
|
287
290
|
}
|
|
288
291
|
});
|
|
289
|
-
const
|
|
292
|
+
const K = /* @__PURE__ */ C(J, [["__scopeId", "data-v-eab56bfd"]]), R = z(K);
|
|
290
293
|
export {
|
|
291
|
-
|
|
292
|
-
|
|
294
|
+
R as IkCollapseCard,
|
|
295
|
+
R as default
|
|
293
296
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,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):(i=typeof globalThis<"u"?globalThis:i||self,e(i.index={},i.vue,i["iking-utils-pro"]))})(this,function(i,e,
|
|
1
|
+
(function(i,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):(i=typeof globalThis<"u"?globalThis:i||self,e(i.index={},i.vue,i["iking-utils-pro"]))})(this,function(i,e,k){"use strict";const u=(n,a)=>{if(n.install=s=>{for(const l of[n,...Object.values(a??{})])s.component(l.name,l)},a)for(const[s,l]of Object.entries(a))n[s]=l;return n},m=(n,a)=>{const s=n.__vccOpts||n;for(const[l,o]of a)s[l]=o;return s},y={key:0,class:"ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"},g={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},h=["xlink:href"],_=["src"],v={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},B=["xlink:href"],w=["src"],b=e.defineComponent({name:"IkSvgIcon",__name:"index",props:{active:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},color:{},colorLight:{},disabled:{type:Boolean,default:!1},error:{type:Boolean},flip:{},name:{},notip:{type:Boolean,default:!1},opacity:{default:.5},padding:{default:"6px"},primary:{type:Boolean},rotate:{},showBg:{type:Boolean,default:!1},size:{default:""},success:{type:Boolean},tableIconType:{},title:{},type:{},warning:{type:Boolean},width:{}},emits:["click"],setup(n,{emit:a}){const s=n,l=e.computed(()=>s),o=e.computed(()=>{const{name:t}=l.value;return/^http?:\/\//.test(t)?"img":/i-[^:]+:[^:]+/.test(t)?"unocss":t!=null&&t.startsWith("iksig")?"iksig":t!=null&&t.includes(":")?"iconify":t!=null&&t.startsWith("iksvg")?"svg":"i"}),r=e.computed(()=>{const t=[];if(l.value.flip)switch(l.value.flip){case"horizontal":t.push("rotateY(180deg)");break;case"vertical":t.push("rotateX(180deg)");break;case"both":t.push("rotateX(180deg)"),t.push("rotateY(180deg)");break}l.value.rotate&&t.push(`rotate(${l.value.rotate%360}deg)`);const d={...l.value.color&&{color:l.value.color},...l.value.size&&{fontSize:typeof l.value.size=="number"?`${l.value.size}px`:l.value.size},...t.length&&{transform:t.join(" ")},padding:l.value.showBg||l.value.bg?l.value.padding:0,...l.value.color&&o.value!=="iksig"?{"--ik-color-icon-dark":l.value.color,"--ik-color-icon-light":l.value.colorLight||k.ikColor.setOpacity(l.value.color,l.value.opacity)}:{}};return l.value.width&&(d.width=d.height=typeof l.value.width=="number"?`${l.value.width}px`:l.value.width),d}),p=a,c=t=>{l.value.disabled||p("click",t)};return(t,d)=>{const E=e.resolveComponent("el-tooltip"),I=e.resolveComponent("el-button");return l.value.tableIconType==="icon"||!l.value.tableIconType?(e.openBlock(),e.createElementBlock("span",y,[l.value.notip||!l.value.title?(e.openBlock(),e.createElementBlock("i",{key:0,onClick:e.withModifiers(c,["stop"]),class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[t.name]:o.value==="unocss","show-bg":l.value.showBg||l.value.bg,default:l.value.size==="default",small:l.value.size==="small",big:l.value.size==="big",warning:l.value.warning||l.value.type==="warning",primary:l.value.primary||l.value.type==="primary",success:t.success||l.value.type==="success",error:l.value.error||l.value.type==="error",active:l.value.active,disabled:l.value.disabled}]),style:e.normalizeStyle(r.value)},[e.createCommentVNode(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),o.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${l.value.name}`),style:e.normalizeStyle(r.value)},null,6)):o.value==="svg"?(e.openBlock(),e.createElementBlock("svg",g,[e.createElementVNode("use",{"xlink:href":`#${l.value.name}`},null,8,h)])):o.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:l.value.name,class:"h-[1em] w-[1em]"},null,8,_)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(l.value.name),style:e.normalizeStyle(r.value)},null,6))],6)):(e.openBlock(),e.createBlock(E,{key:1,content:l.value.title,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition",{[t.name]:o.value==="unocss","show-bg":l.value.showBg||l.value.bg,default:l.value.size==="default",small:l.value.size==="small",big:l.value.size==="big",warning:l.value.warning||l.value.type==="warning",primary:t.primary||l.value.type==="primary",success:t.success||l.value.type==="success",error:l.value.error||l.value.type==="error",active:l.value.active}]),onClick:e.withModifiers(c,["stop"]),style:e.normalizeStyle(r.value)},[o.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${l.value.name}`),style:e.normalizeStyle(r.value)},null,6)):o.value==="svg"?(e.openBlock(),e.createElementBlock("svg",v,[e.createElementVNode("use",{"xlink:href":`#${l.value.name}`},null,8,B)])):o.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:l.value.name,class:"h-[1em] w-[1em]"},null,8,w)):(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(l.value.name),style:e.normalizeStyle(r.value)},null,6))],6)]),_:1},8,["content"]))])):(e.openBlock(),e.createBlock(I,{key:1,type:["warning","error"].includes(l.value.type)?"danger":"",onClick:e.withModifiers(c,["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value.title),1)]),_:1},8,["type"]))}}}),$="",C=u(m(b,[["__scopeId","data-v-4a1004b9"]])),z={class:"align-center flex justify-between"},x={class:"align-center flex"},S={style:{overflow:"hidden"}},V=e.defineComponent({__name:"index",props:e.mergeModels({showToggle:{type:Boolean,default:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const a=e.useModel(n,"modelValue"),s=()=>{a.value=!a.value};return(l,o)=>{const r=e.resolveComponent("el-button"),p=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(p,{class:e.normalizeClass(["ik-collapse-box-card",a.value?"hiddened":""]),shadow:"hover"},{header:e.withCtx(()=>[e.createElementVNode("div",z,[e.createCommentVNode(" card header左侧内容 "),e.renderSlot(l.$slots,"header-leaft",{},void 0,!0),e.createElementVNode("div",x,[e.createCommentVNode(" card header右侧内容 "),e.renderSlot(l.$slots,"header-right",{},void 0,!0),e.createCommentVNode(" 展开、收起按钮 "),n.showToggle?(e.openBlock(),e.createBlock(r,{key:0,link:"",class:"ml-[8px]",onClick:o[0]||(o[0]=c=>s())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?"展开":"收起")+" ",1),e.createVNode(e.unref(C),{name:"iksvg_shouqi",size:16,class:e.normalizeClass(a.value?"toogle":null)},null,8,["class"])]),_:1})):e.createCommentVNode("v-if",!0)])])]),default:e.withCtx(()=>[e.createElementVNode("div",S,[e.renderSlot(l.$slots,"default",{},void 0,!0)])]),_:3},8,["class"])}}}),T="",f=u(m(V,[["__scopeId","data-v-eab56bfd"]]));i.IkCollapseCard=f,i.default=f,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.row-title[data-v-
|
|
1
|
+
.row-title[data-v-4a1004b9]{display:flex}.ik-svg-icon.ik-icon-span[data-v-4a1004b9]:not(:first-child){margin-left:var(--ik-margin-s-12)}.ik-collapse-box-card[data-v-eab56bfd]{flex:1;margin-bottom:20px;--el-card-border-radius: 0}.ik-collapse-box-card[data-v-eab56bfd] .el-card__header{padding-right:0;color:var(--el-text-color-regular);background-color:var(--el-bg-color-page);border-bottom:none}.ik-collapse-box-card[data-v-eab56bfd] .el-card__header .el-button.is-link:hover{--ik-color-icon-dark: var(--ik-color-tag-primary);--ik-color-icon-light: var(--ik-color-icon-light-hover)}.ik-collapse-box-card[data-v-eab56bfd] .ik-svg-icon{transition:all .25s}.ik-collapse-box-card[data-v-eab56bfd] .ik-svg-icon.toogle{transform:rotate(-90deg)}.ik-collapse-box-card.hiddened[data-v-eab56bfd] .el-card__body{grid-template-rows:0fr;padding-top:0!important;padding-bottom:0!important;overflow:hidden;opacity:0}.ik-collapse-box-card[data-v-eab56bfd] .el-card__body{display:grid;grid-template-rows:1fr;padding:0;overflow:hidden!important;opacity:1;transition:all .25s ease}.ik-collapse-box-card[data-v-eab56bfd] .el-card__body table>tbody>tr>td>.cell .cell-icon{font-size:14px}.ik-collapse-box-card[data-v-eab56bfd] .el-card__body table>tbody>tr>td>.cell .el-button span{margin-left:3px}
|