iking-web-ui-pro 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IKApprovalProcess/index.es.js +1 -1
- package/dist/IKApprovalProcess/index.umd.js +1 -1
- package/dist/IKApprovalProcess/style.css +1 -1
- package/dist/IKApprovalProcessDetail/style.css +1 -1
- package/dist/IKCalendar/index.es.js +1 -1
- package/dist/IKCalendar/index.umd.js +1 -1
- package/dist/IKCalendar/style.css +1 -1
- package/dist/IKDetailPreviewFiles/index.es.js +244 -1424
- package/dist/IKDetailPreviewFiles/index.umd.js +1 -1
- package/dist/IKDetailPreviewFiles/style.css +1 -1
- package/dist/IKExpandCollapse/index.es.js +143 -1323
- package/dist/IKExpandCollapse/index.umd.js +1 -1
- package/dist/IKExpandCollapse/style.css +1 -1
- package/dist/IKSearch/index.es.js +1 -1
- package/dist/IKSearch/index.umd.js +1 -1
- package/dist/IKSearch/style.css +1 -1
- package/dist/IKVerticalStepBar/index.es.js +190 -1370
- package/dist/IKVerticalStepBar/index.umd.js +3 -3
- package/dist/IKVerticalStepBar/style.css +1 -1
- package/dist/IkBaseDialog/index.es.js +234 -0
- package/dist/IkBaseDialog/index.umd.js +1 -0
- package/dist/IkBaseDialog/style.css +1 -0
- package/dist/IkBtnSetting/index.es.js +336 -1517
- package/dist/IkBtnSetting/index.umd.js +1 -1
- package/dist/IkBtnSetting/style.css +1 -1
- package/dist/IkIconPicker/index.es.js +2885 -1449
- package/dist/IkIconPicker/index.umd.js +5 -1
- package/dist/IkIconPicker/style.css +1 -1
- package/dist/IkPageFull/index.es.js +1678 -2859
- package/dist/IkPageFull/index.umd.js +3 -3
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPicker/index.es.js +1 -1
- package/dist/IkPicker/index.umd.js +1 -1
- package/dist/IkPicker/style.css +1 -1
- package/dist/IkPickerUser/index.es.js +255 -237
- package/dist/IkPickerUser/index.umd.js +1 -1
- package/dist/IkPickerUser/style.css +1 -1
- package/dist/IkSchedule/index.es.js +2181 -3362
- package/dist/IkSchedule/index.umd.js +1 -1
- package/dist/IkSchedule/style.css +1 -1
- package/dist/IkSvgIcon/index.es.js +125 -1310
- package/dist/IkSvgIcon/index.umd.js +1 -1
- package/dist/IkUploadFile/index.es.js +955 -596
- package/dist/IkUploadFile/index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/index.es.js +113 -110
- package/dist/IkUploadImage/index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +12914 -11169
- package/dist/index.umd.js +10 -6
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/IkSvgIcon/style.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(T,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("iking-utils"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils","vuedraggable"],s):(T=typeof globalThis<"u"?globalThis:T||self,s(T.index={},T.Vue,T["iking-utils"],T.vuedraggable))})(this,function(T,s,v,He){"use strict";const K=(e,n)=>{if(e.install=t=>{for(const i of[e,...Object.values(n??{})])t.component(i.name,i)},n)for(const[t,i]of Object.entries(n))e[t]=i;return e};/*! Element Plus Icons Vue v2.3.1 */var Re=s.defineComponent({name:"DCaret",__name:"d-caret",setup(e){return(n,t)=>(s.openBlock(),s.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[s.createElementVNode("path",{fill:"currentColor",d:"m512 128 288 320H224zM224 576h576L512 896z"})]))}}),qe=Re;const G=(e,n)=>{const t=e.__vccOpts||e;for(const[i,o]of n)t[i]=o;return t},M=/^[a-z0-9]+(-[a-z0-9]+)*$/,D=(e,n,t,i="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),f=o.pop(),c={provider:o.length>0?o[0]:i,prefix:f,name:a};return n&&!z(c)?null:c}const r=o[0],l=r.split("-");if(l.length>1){const a={provider:i,prefix:l.shift(),name:l.join("-")};return n&&!z(a)?null:a}if(t&&i===""){const a={provider:i,prefix:"",name:r};return n&&!z(a,t)?null:a}return null},z=(e,n)=>e?!!((e.provider===""||e.provider.match(M))&&(n&&e.prefix===""||e.prefix.match(M))&&e.name.match(M)):!1,fe=Object.freeze({left:0,top:0,width:16,height:16}),$=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({...fe,...$}),U=Object.freeze({...A,body:"",hidden:!1});function Qe(e,n){const t={};!e.hFlip!=!n.hFlip&&(t.hFlip=!0),!e.vFlip!=!n.vFlip&&(t.vFlip=!0);const i=((e.rotate||0)+(n.rotate||0))%4;return i&&(t.rotate=i),t}function ue(e,n){const t=Qe(e,n);for(const i in U)i in $?i in e&&!(i in t)&&(t[i]=$[i]):i in n?t[i]=n[i]:i in e&&(t[i]=e[i]);return t}function We(e,n){const t=e.icons,i=e.aliases||Object.create(null),o=Object.create(null);function r(l){if(t[l])return o[l]=[];if(!(l in o)){o[l]=null;const a=i[l]&&i[l].parent,f=a&&r(a);f&&(o[l]=[a].concat(f))}return o[l]}return(n||Object.keys(t).concat(Object.keys(i))).forEach(r),o}function Ke(e,n,t){const i=e.icons,o=e.aliases||Object.create(null);let r={};function l(a){r=ue(i[a]||o[a],r)}return l(n),t.forEach(l),ue(e,r)}function de(e,n){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(o=>{n(o,null),t.push(o)});const i=We(e);for(const o in i){const r=i[o];r&&(n(o,Ke(e,o,r)),t.push(o))}return t}const Ge={provider:"",aliases:{},not_found:{},...fe};function J(e,n){for(const t in n)if(t in e&&typeof e[t]!=typeof n[t])return!1;return!0}function pe(e){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.prefix!="string"||!e.icons||typeof e.icons!="object"||!J(e,Ge))return null;const t=n.icons;for(const o in t){const r=t[o];if(!o.match(M)||typeof r.body!="string"||!J(r,U))return null}const i=n.aliases||Object.create(null);for(const o in i){const r=i[o],l=r.parent;if(!o.match(M)||typeof l!="string"||!t[l]&&!i[l]||!J(r,U))return null}return n}const he=Object.create(null);function Ue(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}function j(e,n){const t=he[e]||(he[e]=Object.create(null));return t[n]||(t[n]=Ue(e,n))}function X(e,n){return pe(n)?de(n,(t,i)=>{i?e.icons[t]=i:e.missing.add(t)}):[]}function Je(e,n,t){try{if(typeof t.body=="string")return e.icons[n]={...t},!0}catch{}return!1}let L=!1;function ge(e){return typeof e=="boolean"&&(L=e),L}function Xe(e){const n=typeof e=="string"?D(e,!0,L):e;if(n){const t=j(n.provider,n.prefix),i=n.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function Ye(e,n){const t=D(e,!0,L);if(!t)return!1;const i=j(t.provider,t.prefix);return Je(i,t.name,n)}function Ze(e,n){if(typeof e!="object")return!1;if(typeof n!="string"&&(n=e.provider||""),L&&!n&&!e.prefix){let o=!1;return pe(e)&&(e.prefix="",de(e,(r,l)=>{l&&Ye(r,l)&&(o=!0)})),o}const t=e.prefix;if(!z({provider:n,prefix:t,name:"a"}))return!1;const i=j(n,t);return!!X(i,e)}const me=Object.freeze({width:null,height:null}),ye=Object.freeze({...me,...$}),et=/(-?[0-9.]*[0-9]+[0-9.]*)/g,tt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function be(e,n,t){if(n===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*n*t)/t;if(typeof e!="string")return e;const i=e.split(et);if(i===null||!i.length)return e;const o=[];let r=i.shift(),l=tt.test(r);for(;;){if(l){const a=parseFloat(r);isNaN(a)?o.push(r):o.push(Math.ceil(a*n*t)/t)}else o.push(r);if(r=i.shift(),r===void 0)return o.join("");l=!l}}const nt=e=>e==="unset"||e==="undefined"||e==="none";function ot(e,n){const t={...A,...e},i={...ye,...n},o={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,i].forEach(C=>{const b=[],y=C.hFlip,N=C.vFlip;let x=C.rotate;y?N?x+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):N&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let S;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:S=o.height/2+o.top,b.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,b.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}x%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),b.length&&(r='<g transform="'+b.join(" ")+'">'+r+"</g>")});const l=i.width,a=i.height,f=o.width,c=o.height;let u,p;l===null?(p=a===null?"1em":a==="auto"?c:a,u=be(p,f/c)):(u=l==="auto"?f:l,p=a===null?be(u,c/f):a==="auto"?c:a);const d={},I=(C,b)=>{nt(b)||(d[C]=b.toString())};return I("width",u),I("height",p),d.viewBox=o.left.toString()+" "+o.top.toString()+" "+f.toString()+" "+c.toString(),{attributes:d,body:r}}const rt=/\sid="(\S+)"/g,it="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let st=0;function lt(e,n=it){const t=[];let i;for(;i=rt.exec(e);)t.push(i[1]);if(!t.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(r=>{const l=typeof n=="function"?n(r):n+(st++).toString(),a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+l+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const Y=Object.create(null);function at(e,n){Y[e]=n}function Z(e){return Y[e]||Y[""]}function ee(e){let n;if(typeof e.resources=="string")n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const te=Object.create(null),P=["https://api.simplesvg.com","https://api.unisvg.com"],H=[];for(;P.length>0;)P.length===1||Math.random()>.5?H.push(P.shift()):H.push(P.pop());te[""]=ee({resources:["https://api.iconify.design"].concat(H)});function ct(e,n){const t=ee(n);return t===null?!1:(te[e]=t,!0)}function ne(e){return te[e]}let ke=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function ft(e,n){const t=ne(e);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let o=0;t.resources.forEach(l=>{o=Math.max(o,l.length)});const r=n+".json?icons=";i=t.maxURL-o-t.path.length-r.length}return i}function ut(e){return e===404}const dt=(e,n,t)=>{const i=[],o=ft(e,n),r="icons";let l={type:r,provider:e,prefix:n,icons:[]},a=0;return t.forEach((f,c)=>{a+=f.length+1,a>=o&&c>0&&(i.push(l),l={type:r,provider:e,prefix:n,icons:[]},a=f.length),l.icons.push(f)}),i.push(l),i};function pt(e){if(typeof e=="string"){const n=ne(e);if(n)return n.path}return"/"}const ht={prepare:dt,send:(e,n,t)=>{if(!ke){t("abort",424);return}let i=pt(n.provider);switch(n.type){case"icons":{const r=n.prefix,a=n.icons.join(","),f=new URLSearchParams({icons:a});i+=r+".json?"+f.toString();break}case"custom":{const r=n.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:t("abort",400);return}let o=503;ke(e+i).then(r=>{const l=r.status;if(l!==200){setTimeout(()=>{t(ut(l)?"abort":"next",l)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?t("abort",r):t("next",o)});return}setTimeout(()=>{t("success",r)})}).catch(()=>{t("next",o)})}};function gt(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return e.forEach(o=>{if(i.name===o.name&&i.prefix===o.prefix&&i.provider===o.provider)return;i=o;const r=o.provider,l=o.prefix,a=o.name,f=t[r]||(t[r]=Object.create(null)),c=f[l]||(f[l]=j(r,l));let u;a in c.icons?u=n.loaded:l===""||c.missing.has(a)?u=n.missing:u=n.pending;const p={provider:r,prefix:l,name:a};u.push(p)}),n}function we(e,n){e.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(o=>o.id!==n))})}function mt(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const i=e.provider,o=e.prefix;n.forEach(r=>{const l=r.icons,a=l.pending.length;l.pending=l.pending.filter(f=>{if(f.prefix!==o)return!0;const c=f.name;if(e.icons[c])l.loaded.push({provider:i,prefix:o,name:c});else if(e.missing.has(c))l.missing.push({provider:i,prefix:o,name:c});else return t=!0,!0;return!1}),l.pending.length!==a&&(t||we([e],r.id),r.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),r.abort))})}))}let yt=0;function bt(e,n,t){const i=yt++,o=we.bind(null,t,i);if(!n.pending.length)return o;const r={id:i,icons:n,callback:e,abort:o};return t.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(r)}),o}function kt(e,n=!0,t=!1){const i=[];return e.forEach(o=>{const r=typeof o=="string"?D(o,n,t):o;r&&i.push(r)}),i}var wt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function St(e,n,t,i){const o=e.resources.length,r=e.random?Math.floor(Math.random()*o):e.index;let l;if(e.random){let k=e.resources.slice(0);for(l=[];k.length>1;){const h=Math.floor(Math.random()*k.length);l.push(k[h]),k=k.slice(0,h).concat(k.slice(h+1))}l=l.concat(k)}else l=e.resources.slice(r).concat(e.resources.slice(0,r));const a=Date.now();let f="pending",c=0,u,p=null,d=[],I=[];typeof i=="function"&&I.push(i);function C(){p&&(clearTimeout(p),p=null)}function b(){f==="pending"&&(f="aborted"),C(),d.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),d=[]}function y(k,h){h&&(I=[]),typeof k=="function"&&I.push(k)}function N(){return{startTime:a,payload:n,status:f,queriesSent:c,queriesPending:d.length,subscribe:y,abort:b}}function x(){f="failed",I.forEach(k=>{k(void 0,u)})}function S(){d.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),d=[]}function W(k,h,m){const w=h!=="success";switch(d=d.filter(g=>g!==k),f){case"pending":break;case"failed":if(w||!e.dataAfterTimeout)return;break;default:return}if(h==="abort"){u=m,x();return}if(w){u=m,d.length||(l.length?F():x());return}if(C(),S(),!e.random){const g=e.resources.indexOf(k.resource);g!==-1&&g!==e.index&&(e.index=g)}f="completed",I.forEach(g=>{g(m)})}function F(){if(f!=="pending")return;C();const k=l.shift();if(k===void 0){if(d.length){p=setTimeout(()=>{C(),f==="pending"&&(S(),x())},e.timeout);return}x();return}const h={status:"pending",resource:k,callback:(m,w)=>{W(h,m,w)}};d.push(h),c++,p=setTimeout(F,e.rotate),t(k,n,h.callback)}return setTimeout(F),N}function Se(e){const n={...wt,...e};let t=[];function i(){t=t.filter(a=>a().status==="pending")}function o(a,f,c){const u=St(n,a,f,(p,d)=>{i(),c&&c(p,d)});return t.push(u),u}function r(a){return t.find(f=>a(f))||null}return{query:o,find:r,setIndex:a=>{n.index=a},getIndex:()=>n.index,cleanup:i}}function Ie(){}const oe=Object.create(null);function It(e){if(!oe[e]){const n=ne(e);if(!n)return;const t=Se(n),i={config:n,redundancy:t};oe[e]=i}return oe[e]}function xt(e,n,t){let i,o;if(typeof e=="string"){const r=Z(e);if(!r)return t(void 0,424),Ie;o=r.send;const l=It(e);l&&(i=l.redundancy)}else{const r=ee(e);if(r){i=Se(r);const l=e.resources?e.resources[0]:"",a=Z(l);a&&(o=a.send)}}return!i||!o?(t(void 0,424),Ie):i.query(n,o,t)().abort}const xe="iconify2",O="iconify",Ce=O+"-count",_e=O+"-version",Be=36e5,Ct=168;function re(e,n){try{return e.getItem(n)}catch{}}function ie(e,n,t){try{return e.setItem(n,t),!0}catch{}}function ve(e,n){try{e.removeItem(n)}catch{}}function se(e,n){return ie(e,Ce,n.toString())}function le(e){return parseInt(re(e,Ce))||0}const R={local:!0,session:!0},Ee={local:new Set,session:new Set};let ae=!1;function _t(e){ae=e}let q=typeof window>"u"?{}:window;function Te(e){const n=e+"Storage";try{if(q&&q[n]&&typeof q[n].length=="number")return q[n]}catch{}R[e]=!1}function Ne(e,n){const t=Te(e);if(!t)return;const i=re(t,_e);if(i!==xe){if(i){const a=le(t);for(let f=0;f<a;f++)ve(t,O+f.toString())}ie(t,_e,xe),se(t,0);return}const o=Math.floor(Date.now()/Be)-Ct,r=a=>{const f=O+a.toString(),c=re(t,f);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&n(u,a))return!0}catch{}ve(t,f)}};let l=le(t);for(let a=l-1;a>=0;a--)r(a)||(a===l-1?(l--,se(t,l)):Ee[e].add(a))}function Ve(){if(!ae){_t(!0);for(const e in R)Ne(e,n=>{const t=n.data,i=n.provider,o=t.prefix,r=j(i,o);if(!X(r,t).length)return!1;const l=t.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,l):l,!0})}}function Bt(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const i in R)Ne(i,o=>{const r=o.data;return o.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===n});return!0}function vt(e,n){ae||Ve();function t(i){let o;if(!R[i]||!(o=Te(i)))return;const r=Ee[i];let l;if(r.size)r.delete(l=Array.from(r).shift());else if(l=le(o),!se(o,l+1))return;const a={cached:Math.floor(Date.now()/Be),provider:e.provider,data:n};return ie(o,O+l.toString(),JSON.stringify(a))}n.lastModified&&!Bt(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&(n=Object.assign({},n),delete n.not_found),t("local")||t("session"))}function je(){}function Et(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,mt(e)}))}function Tt(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:i}=e,o=e.iconsToLoad;delete e.iconsToLoad;let r;if(!o||!(r=Z(t)))return;r.prepare(t,i,o).forEach(a=>{xt(t,a,f=>{if(typeof f!="object")a.icons.forEach(c=>{e.missing.add(c)});else try{const c=X(e,f);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(p=>{u.delete(p)}),vt(e,f)}catch(c){console.error(c)}Et(e)})})}))}const Nt=(e,n)=>{const t=kt(e,!0,ge()),i=gt(t);if(!i.pending.length){let f=!0;return n&&setTimeout(()=>{f&&n(i.loaded,i.missing,i.pending,je)}),()=>{f=!1}}const o=Object.create(null),r=[];let l,a;return i.pending.forEach(f=>{const{provider:c,prefix:u}=f;if(u===a&&c===l)return;l=c,a=u,r.push(j(c,u));const p=o[c]||(o[c]=Object.create(null));p[u]||(p[u]=[])}),i.pending.forEach(f=>{const{provider:c,prefix:u,name:p}=f,d=j(c,u),I=d.pendingIcons||(d.pendingIcons=new Set);I.has(p)||(I.add(p),o[c][u].push(p))}),r.forEach(f=>{const{provider:c,prefix:u}=f;o[c][u].length&&Tt(f,o[c][u])}),n?bt(n,i,r):je};function Vt(e,n){const t={...e};for(const i in n){const o=n[i],r=typeof o;i in me?(o===null||o&&(r==="string"||r==="number"))&&(t[i]=o):r===typeof t[i]&&(t[i]=i==="rotate"?o%4:o)}return t}const jt=/[\s,]+/;function Mt(e,n){n.split(jt).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Lt(e,n=0){const t=e.replace(/^-?[0-9.]*/,"");function i(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:i(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(e.slice(0,e.length-t.length));return isNaN(r)?0:(r=r/o,r%1===0?i(r):0)}}return n}function Pt(e,n){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in n)t+=" "+i+'="'+n[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function Ot(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ft(e){return"data:image/svg+xml,"+Ot(e)}function Dt(e){return'url("'+Ft(e)+'")'}const Me={...ye,inline:!1},zt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},$t={display:"inline-block"},ce={backgroundColor:"currentColor"},Le={backgroundColor:"transparent"},Pe={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Oe={webkitMask:ce,mask:ce,background:Le};for(const e in Oe){const n=Oe[e];for(const t in Pe)n[e+t]=Pe[t]}const Q={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";Q[e+"-flip"]=n,Q[e.slice(0,1)+"-flip"]=n,Q[e+"Flip"]=n});function Fe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const De=(e,n)=>{const t=Vt(Me,n),i={...zt},o=n.mode||"svg",r={},l=n.style,a=typeof l=="object"&&!(l instanceof Array)?l:{};for(let b in n){const y=n[b];if(y!==void 0)switch(b){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":t[b]=y===!0||y==="true"||y===1;break;case"flip":typeof y=="string"&&Mt(t,y);break;case"color":r.color=y;break;case"rotate":typeof y=="string"?t[b]=Lt(y):typeof y=="number"&&(t[b]=y);break;case"ariaHidden":case"aria-hidden":y!==!0&&y!=="true"&&delete i["aria-hidden"];break;default:{const N=Q[b];N?(y===!0||y==="true"||y===1)&&(t[N]=!0):Me[b]===void 0&&(i[b]=y)}}}const f=ot(e,t),c=f.attributes;if(t.inline&&(r.verticalAlign="-0.125em"),o==="svg"){i.style={...r,...a},Object.assign(i,c);let b=0,y=n.id;return typeof y=="string"&&(y=y.replace(/-/g,"_")),i.innerHTML=lt(f.body,y?()=>y+"ID"+b++:"iconifyVue"),s.h("svg",i)}const{body:u,width:p,height:d}=e,I=o==="mask"||(o==="bg"?!1:u.indexOf("currentColor")!==-1),C=Pt(u,{...c,width:p+"",height:d+""});return i.style={...r,"--svg":Dt(C),width:Fe(c.width),height:Fe(c.height),...$t,...I?ce:Le,...a},s.h("span",i)};if(ge(!0),at("",ht),typeof document<"u"&&typeof window<"u"){Ve();const e=window;if(e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Ze(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(let t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;ct(t,o)||console.error(i)}catch{console.error(i)}}}}const At={...A,body:""},ze=s.defineComponent({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,n){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let t;if(typeof e!="string"||(t=D(e,!1,!0))===null)return this.abortLoading(),null;const i=Xe(t);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:e,abort:Nt([t],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,n&&n(e));const o=["iconify"];return t.prefix!==""&&o.push("iconify--"+t.prefix),t.provider!==""&&o.push("iconify--"+t.provider),{data:i,classes:o}}},render(){this.counter;const e=this.$attrs,n=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!n)return De(At,e);let t=e;return n.classes&&(t={...e,class:(typeof e.class=="string"?e.class+" ":"")+n.classes.join(" ")}),De({...A,...n.data},t)}}),Ht={key:1,class:"basicHeight basicWidth","aria-hidden":"true"},Rt=["xlink:href"],qt=["src"],Qt={key:1,class:"basicHeight basicWidth","aria-hidden":"true"},Wt=["xlink:href"],Kt=["src"],Gt=s.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{}},setup(e){const n=e,t=s.computed(()=>{var r;return/^http?:\/\//.test(n.name)?"img":/i-[^:]+:[^:]+/.test(n.name)?"unocss":(r=n.name)!=null&&r.includes(":")?"iconify":"svg"}),i=s.computed(()=>{const r=[];if(n.flip)switch(n.flip){case"horizontal":r.push("rotateY(180deg)");break;case"vertical":r.push("rotateX(180deg)");break;case"both":r.push("rotateX(180deg)"),r.push("rotateY(180deg)");break}return n.rotate&&r.push(`rotate(${n.rotate%360}deg)`),{...n.color&&{color:n.color},...n.size&&{fontSize:typeof n.size=="number"?`${n.size}px`:n.size},...r.length&&{transform:r.join(" ")},padding:n.padding}}),o=s.computed(()=>document.body.getAttribute("data-theme")==="dark");return(r,l)=>{const a=s.resolveComponent("el-tooltip");return r.notip||!r.title?(s.openBlock(),s.createElementBlock("i",{key:0,class:s.normalizeClass(["ik-svg-icon ik-icon relative basicHeight basicWidth flex-inline items-center justify-center fill-current leading-[1em] transition",{[r.name]:t.value==="unocss","show-bg":r.showBg||r.bg,default:r.size==="default",small:r.size==="small",big:r.size==="big",warning:r.warning}]),style:s.normalizeStyle(i.value)},[t.value==="iconify"?(s.openBlock(),s.createBlock(s.unref(ze),{key:0,icon:r.name},null,8,["icon"])):t.value==="svg"?(s.openBlock(),s.createElementBlock("svg",Ht,[s.createElementVNode("use",{"xlink:href":`#${r.name}`},null,8,Rt)])):t.value==="img"?(s.openBlock(),s.createElementBlock("img",{key:2,src:r.name,class:"basicHeight basicWidth"},null,8,qt)):s.createCommentVNode("v-if",!0)],6)):(s.openBlock(),s.createBlock(a,{key:1,effect:o.value?"dark":"light",content:r.title},{default:s.withCtx(()=>[s.createElementVNode("i",s.mergeProps({class:["ik-svg-icon ik-icon relative basicHeight basicWidth flex-inline items-center justify-center fill-current leading-[1em] transition",{[r.name]:t.value==="unocss","show-bg":r.showBg||r.bg,default:r.size==="default",small:r.size==="small",big:r.size==="big",warning:r.warning}],style:i.value},r.$attrs),[t.value==="iconify"?(s.openBlock(),s.createBlock(s.unref(ze),{key:0,icon:r.name},null,8,["icon"])):t.value==="svg"?(s.openBlock(),s.createElementBlock("svg",Qt,[s.createElementVNode("use",{"xlink:href":`#${r.name}`},null,8,Wt)])):t.value==="img"?(s.openBlock(),s.createElementBlock("img",{key:2,src:r.name,class:"basicHeight basicWidth"},null,8,Kt)):s.createCommentVNode("v-if",!0)],16)]),_:1},8,["effect","content"]))}}}),ln="",Ut=K(G(Gt,[["__scopeId","data-v-1957ff53"]])),$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)"}},Jt={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)"}})}},Xt=s.defineComponent({__name:"IkDragList",props:Jt,emits:["change"],setup(e,{emit:n}){const t=e,i=n,o=s.ref([]);s.watch(()=>t.list,c=>{o.value=v._.cloneDeep(c)},{immediate:!0,deep:!0});const r=s.computed(()=>({...$e,...t,itemStyle:{...$e.itemStyle,...t.itemStyle}})),l=s.ref(!1),a=()=>{l.value=!0},f=c=>{l.value=!1;const u=t.list[c.oldIndex];i("change",o.value,{...u,oldIndex:c.oldIndex,newIndex:c.newIndex})};return(c,u)=>{const p=s.resolveComponent("el-icon");return s.openBlock(),s.createBlock(s.unref(He),{modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=d=>o.value=d),class:s.normalizeClass(["list-group",[r.value.groupClass]]),tag:"ul",attrs:r.value,animation:r.value.animation,group:r.value.group,disabled:r.value.disabled,"ghost-class":r.value.ghostClass,"force-fallback":r.value.ghostClass,"item-key":"order",onStart:a,onEnd:f},{item:s.withCtx(({element:d})=>[s.createVNode(s.Transition,{type:"transition",name:"flip-list"},{default:s.withCtx(()=>[c.$slots.item?s.renderSlot(c.$slots,"item",{key:0,item:d},void 0,!0):(s.openBlock(),s.createElementBlock("li",{key:1,class:s.normalizeClass(["list-group-item",[r.value.itemClass]]),style:s.normalizeStyle({borderRadius:`${r.value.itemStyle.radius}px`,marginBottom:`${r.value.itemStyle.bottom}px`,backgroundColor:`${r.value.itemStyle.background}`})},[r.value.showIcon&&!c.$slots.icon?(s.openBlock(),s.createBlock(p,{key:0},{default:s.withCtx(()=>[s.createVNode(s.unref(qe))]),_:1})):s.renderSlot(c.$slots,"icon",{key:1},void 0,!0),s.createTextVNode(" "+s.toDisplayString(d.label),1)],6))]),_:2},1024)]),_:3},8,["modelValue","class","attrs","animation","group","disabled","ghost-class","force-fallback"])}}}),cn="",Yt=K(G(Xt,[["__scopeId","data-v-d2a34939"]])),Zt=(e=>(s.pushScopeId("data-v-b848b0c7"),e=e(),s.popScopeId(),e))(()=>s.createElementVNode("i",{class:"ik ik-shezhi"},null,-1)),en={class:"check-right"},tn={class:"dialog-footer"},nn=s.defineComponent({__name:"IkBtnSetting",props:s.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:e=>e,dialog:{l:"700px",sl:"600px"},path:"user_0",user:{id:"111"}})}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:s.mergeModels(["sort"],["update:modelValue"]),setup(e,{emit:n}){const t=e,i=n,o=s.useModel(e,"modelValue"),{t:r,dialog:l,path:a,user:f}=t.config,c=s.computed(()=>`${f==null?void 0:f.id}_${a}${t.tab!==""?`_${t.tab}`:""}`),u=s.ref([]),p=s.ref([]),d=s.ref([]),I=new Map,C=s.ref(!1),b=s.computed(()=>{const h=p.value.length&&p.value.length!==t.list.length;return!h&&p.value.length&&(C.value=!0),!!h}),y=h=>{var w;const m=v._.cloneDeep(d.value);m==null||m.forEach(g=>{var V;if(!p.value.length)d.value=[];else if(!p.value.includes(g==null?void 0:g.key)){const E=(V=d.value)==null?void 0:V.findIndex(_=>_.key===g.key);E!==-1&&d.value.splice(E,1),g.show=!1,I.set(g.key,g)}}),p.value.forEach(g=>{var E;if(((E=d.value)==null?void 0:E.findIndex(_=>(_==null?void 0:_.key)===g))===-1){const _=I.get(g);_&&(_.show=!0,d.value.push(_))}}),(w=d.value)!=null&&w.length||(d.value=v._.cloneDeep(t.list)),h===!0&&(i("sort",v._.cloneDeep(d.value)),o.value=v._.cloneDeep(d.value))},N=h=>{if(h)p.value=t.list.map(m=>m.key);else{const m=t.list.find(w=>!w.key||w.label==="操作");p.value=m?[m.key]:[]}y()},x=()=>{const h=v.ikStore.local.getItem(c.value);try{const m=v._.cloneDeep(t==null?void 0:t.list);if((!h||!(h!=null&&h.length))&&v.ikStore.local.setItem(c.value,m.map(({show:w,type:g,key:V,label:E,width:_,minWidth:B,align:on})=>({show:w,key:V,type:g,label:E,width:_,minWidth:B,align:on}))),u.value=[...(m==null?void 0:m.map(w=>(I.set(w.key,w),{...w,show:w.show||!1})))||[]],h){const w=h.filter(g=>g.show).map(g=>g.key);p.value=[...w]}else{const w=u.value.filter(g=>g.show);p.value=w.map(g=>g.key)}y(!0)}catch(m){console.info("error: ",m)}};x(),s.watch(()=>t.list,()=>{x()},{deep:!0});const S=s.ref(!1),W=()=>{S.value=!0},F=h=>{d.value=h},k=()=>{S.value=!1,v.ikStore.local.setItem(c.value,d.value.map(({show:h,key:m,label:w,value:g,width:V,minWidth:E,align:_})=>({show:h,key:m,label:w,value:g,width:V,minWidth:E,align:_}))),console.log("sortList ",d),i("sort",v._.cloneDeep(d.value)),o.value=v._.cloneDeep(d.value)};return(h,m)=>{const w=s.resolveComponent("el-button"),g=s.resolveComponent("el-checkbox"),V=s.resolveComponent("el-checkbox-group"),E=s.resolveComponent("el-dialog"),_=s.resolveDirective("role");return s.openBlock(),s.createElementBlock(s.Fragment,null,[e.btnType==="button"?s.withDirectives((s.openBlock(),s.createBlock(w,s.mergeProps({key:0},h.$attrs,{circle:e.circle,type:e.type,style:{minWidth:e.circle?"40px":"",minHeight:e.circle?"40px":""},onClick:W}),s.createSlots({icon:s.withCtx(()=>[Zt]),_:2},[e.circle?void 0:{name:"default",fn:s.withCtx(()=>[s.createCommentVNode(' {{ t("action.setting") }} '),s.createTextVNode(" "+s.toDisplayString(s.unref(r)("设置")),1)]),key:"0"}]),1040,["circle","type","style"])),[[_,h.$props.role]]):s.createCommentVNode("v-if",!0),e.btnType==="icon"?s.withDirectives((s.openBlock(),s.createBlock(s.unref(Ut),s.mergeProps({key:1,name:"iksvg_shezhi-daohang","show-bg":"",size:"default"},h.$attrs,{onClick:W}),null,16)),[[_,h.$props.role]]):s.createCommentVNode("v-if",!0),s.createVNode(E,{modelValue:S.value,"onUpdate:modelValue":m[3]||(m[3]=B=>S.value=B),draggable:"",width:e.inline?s.unref(l).l:s.unref(l).sl,"close-on-click-modal":!1,"close-on-press-escape":!1,title:"显示字段","append-to-body":"",onOpen:x},{footer:s.withCtx(()=>[s.createElementVNode("div",tn,[s.createVNode(w,{onClick:m[2]||(m[2]=B=>S.value=!1)},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(s.unref(r)("关闭"))+" ",1),s.createCommentVNode(' {{ t("action.close") }} ')]),_:1}),s.createVNode(w,{type:"primary",disabled:d.value.length<2,onClick:k},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d.value.length<2?"至少选择一个字段":s.unref(r)("确定")),1)]),_:1},8,["disabled"])])]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["view-fields",[e.inline?null:"un-inline"]])},[s.createElementVNode("div",{style:s.normalizeStyle({flex:e.inline?2:1})},[s.createVNode(g,{modelValue:C.value,"onUpdate:modelValue":m[0]||(m[0]=B=>C.value=B),class:"single-line",indeterminate:b.value,onChange:N},{default:s.withCtx(()=>[s.createTextVNode(" 全选 ")]),_:1},8,["modelValue","indeterminate"]),s.createVNode(V,{modelValue:p.value,"onUpdate:modelValue":m[1]||(m[1]=B=>p.value=B),onChange:y},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.value,B=>(s.openBlock(),s.createBlock(g,{key:B.key,disabled:!B.key,label:B.key},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(B.label),1)]),_:2},1032,["disabled","label"]))),128))]),_:1},8,["modelValue"])],4),s.createElementVNode("div",en,[s.createVNode(s.unref(Yt),{list:d.value,"item-style":{bottom:4},onChange:F},null,8,["list"])])],2)]),_:1},8,["modelValue","width"])],64)}}}),dn="",Ae=K(G(nn,[["__scopeId","data-v-b848b0c7"]]));T.IkBtnSetting=Ae,T.default=Ae,Object.defineProperties(T,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(k,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("iking-utils"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","iking-utils","vuedraggable"],e):(k=typeof globalThis<"u"?globalThis:k||self,e(k.index={},k.Vue,k["iking-utils"],k.vuedraggable))})(this,function(k,e,y,j){"use strict";const w=(o,a)=>{if(o.install=l=>{for(const m of[o,...Object.values(a??{})])l.component(m.name,m)},a)for(const[l,m]of Object.entries(a))o[l]=m;return o};/*! Element Plus Icons Vue v2.3.1 */var O=e.defineComponent({name:"DCaret",__name:"d-caret",setup(o){return(a,l)=>(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=O;const $=(o,a)=>{const l=o.__vccOpts||o;for(const[m,t]of a)l[m]=t;return l},M={class:"inline-block ik-svg-icon ik-icon line-height-[0] inline-flex justify-center"},F={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},A=["xlink:href"],q=["src"],P={key:1,class:"h-[1em] w-[1em]","aria-hidden":"true"},H=["xlink:href"],W=["src"],X=w(e.defineComponent({name:"IkSvgIcon",__name:"index",props:{name:{},flip:{},rotate:{},color:{},opacity:{default:.5},size:{default:""},bg:{type:Boolean,default:!1},showBg:{type:Boolean,default:!1},padding:{default:"0"},warning:{type:Boolean},notip:{type:Boolean,default:!1},title:{}},setup(o){const a=o,l=e.computed(()=>{var t;return/^http?:\/\//.test(a.name)?"img":/i-[^:]+:[^:]+/.test(a.name)?"unocss":a.name.startsWith("iksig")?"iksig":(t=a.name)!=null&&t.includes(":")?"iconify":"svg"}),m=e.computed(()=>{const t=[];if(a.flip)switch(a.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}return a.rotate&&t.push(`rotate(${a.rotate%360}deg)`),{...a.color&&{color:a.color},...a.size&&{fontSize:typeof a.size=="number"?`${a.size}px`:a.size},...t.length&&{transform:t.join(" ")},padding:a.padding,...a.color&&l.value!=="iksig"?{"--ik-color-icon-dark":a.color,"--ik-color-icon-light":y.ikColor.setOpacity(a.color,a.opacity||.4)}:{}}});return(t,d)=>{const C=e.resolveComponent("el-tooltip");return e.openBlock(),e.createElementBlock("span",M,[t.notip||!t.title?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[t.name]:l.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning}]),style:e.normalizeStyle(m.value)},[l.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(m.value)},null,6)):l.value==="svg"?(e.openBlock(),e.createElementBlock("svg",F,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,A)])):l.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,q)):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(C,{key:1,content:t.title},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ik-svg-icon ik-icon relative h-[1em] w-[1em] flex-inline items-center justify-center fill-current leading-[1em] transition",{[t.name]:l.value==="unocss","show-bg":t.showBg||t.bg,default:t.size==="default",small:t.size==="small",big:t.size==="big",warning:t.warning}]),style:e.normalizeStyle(m.value)},[l.value==="iksig"?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(`iksig ${t.name}`),style:e.normalizeStyle(m.value)},null,6)):l.value==="svg"?(e.openBlock(),e.createElementBlock("svg",P,[e.createElementVNode("use",{"xlink:href":`#${t.name}`},null,8,H)])):l.value==="img"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"h-[1em] w-[1em]"},null,8,W)):e.createCommentVNode("v-if",!0)],6)]),_:1},8,["content"]))])}}})),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)"}},Y={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)"}})}},R=e.defineComponent({__name:"IkDragList",props:Y,emits:["change"],setup(o,{emit:a}){const l=o,m=a,t=e.ref([]);e.watch(()=>l.list,f=>{t.value=y._.cloneDeep(f)},{immediate:!0,deep:!0});const d=e.computed(()=>({...E,...l,itemStyle:{...E.itemStyle,...l.itemStyle}})),C=e.ref(!1),V=()=>{C.value=!0},S=f=>{C.value=!1;const _=l.list[f.oldIndex];m("change",t.value,{..._,oldIndex:f.oldIndex,newIndex:f.newIndex})};return(f,_)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(e.unref(j),{modelValue:t.value,"onUpdate:modelValue":_[0]||(_[0]=i=>t.value=i),class:e.normalizeClass(["list-group",[d.value.groupClass]]),tag:"ul",attrs:d.value,animation:d.value.animation,group:d.value.group,disabled:d.value.disabled,"ghost-class":d.value.ghostClass,"force-fallback":d.value.ghostClass,"item-key":"order",onStart:V,onEnd:S},{item:e.withCtx(({element:i})=>[e.createVNode(e.Transition,{type:"transition",name:"flip-list"},{default:e.withCtx(()=>[f.$slots.item?e.renderSlot(f.$slots,"item",{key:0,item:i},void 0,!0):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["list-group-item",[d.value.itemClass]]),style:e.normalizeStyle({borderRadius:`${d.value.itemStyle.radius}px`,marginBottom:`${d.value.itemStyle.bottom}px`,backgroundColor:`${d.value.itemStyle.background}`})},[d.value.showIcon&&!f.$slots.icon?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(L))]),_:1})):e.renderSlot(f.$slots,"icon",{key:1},void 0,!0),e.createTextVNode(" "+e.toDisplayString(i.label),1)],6))]),_:2},1024)]),_:3},8,["modelValue","class","attrs","animation","group","disabled","ghost-class","force-fallback"])}}}),ae="",G=w($(R,[["__scopeId","data-v-d2a34939"]])),J=(o=>(e.pushScopeId("data-v-b848b0c7"),o=o(),e.popScopeId(),o))(()=>e.createElementVNode("i",{class:"ik ik-shezhi"},null,-1)),K={class:"check-right"},Q={class:"dialog-footer"},Z=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:o=>o,dialog:{l:"700px",sl:"600px"},path:"user_0",user:{id:"111"}})}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:e.mergeModels(["sort"],["update:modelValue"]),setup(o,{emit:a}){const l=o,m=a,t=e.useModel(o,"modelValue"),{t:d,dialog:C,path:V,user:S}=l.config,f=e.computed(()=>`${S==null?void 0:S.id}_${V}${l.tab!==""?`_${l.tab}`:""}`),_=e.ref([]),u=e.ref([]),i=e.ref([]),N=new Map,I=e.ref(!1),v=e.computed(()=>{const r=u.value.length&&u.value.length!==l.list.length;return!r&&u.value.length&&(I.value=!0),!!r}),z=r=>{var c;const n=y._.cloneDeep(i.value);n==null||n.forEach(s=>{var b;if(!u.value.length)i.value=[];else if(!u.value.includes(s==null?void 0:s.key)){const h=(b=i.value)==null?void 0:b.findIndex(p=>p.key===s.key);h!==-1&&i.value.splice(h,1),s.show=!1,N.set(s.key,s)}}),u.value.forEach(s=>{var h;if(((h=i.value)==null?void 0:h.findIndex(p=>(p==null?void 0:p.key)===s))===-1){const p=N.get(s);p&&(p.show=!0,i.value.push(p))}}),(c=i.value)!=null&&c.length||(i.value=y._.cloneDeep(l.list)),r===!0&&(m("sort",y._.cloneDeep(i.value)),t.value=y._.cloneDeep(i.value))},U=r=>{if(r)u.value=l.list.map(n=>n.key);else{const n=l.list.find(c=>!c.key||c.label==="操作");u.value=n?[n.key]:[]}z()},x=()=>{const r=y.ikStore.local.getItem(f.value);try{const n=y._.cloneDeep(l==null?void 0:l.list);if((!r||!(r!=null&&r.length))&&y.ikStore.local.setItem(f.value,n.map(({show:c,type:s,key:b,label:h,width:p,minWidth:g,align:le})=>({show:c,key:b,type:s,label:h,width:p,minWidth:g,align:le}))),_.value=[...(n==null?void 0:n.map(c=>(N.set(c.key,c),{...c,show:c.show||!1})))||[]],r){const c=r.filter(s=>s.show).map(s=>s.key);u.value=[...c]}else{const c=_.value.filter(s=>s.show);u.value=c.map(s=>s.key)}z(!0)}catch(n){console.info("error: ",n)}};x(),e.watch(()=>l.list,()=>{x()},{deep:!0});const B=e.ref(!1),T=()=>{B.value=!0},ee=r=>{i.value=r},te=()=>{B.value=!1,y.ikStore.local.setItem(f.value,i.value.map(({show:r,key:n,label:c,value:s,width:b,minWidth:h,align:p})=>({show:r,key:n,label:c,value:s,width:b,minWidth:h,align:p}))),console.log("sortList ",i),m("sort",y._.cloneDeep(i.value)),t.value=y._.cloneDeep(i.value)};return(r,n)=>{const c=e.resolveComponent("el-button"),s=e.resolveComponent("el-checkbox"),b=e.resolveComponent("el-checkbox-group"),h=e.resolveComponent("el-dialog"),p=e.resolveDirective("role");return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.btnType==="button"?e.withDirectives((e.openBlock(),e.createBlock(c,e.mergeProps({key:0},r.$attrs,{circle:o.circle,type:o.type,style:{minWidth:o.circle?"40px":"",minHeight:o.circle?"40px":""},onClick:T}),e.createSlots({icon:e.withCtx(()=>[J]),_:2},[o.circle?void 0:{name:"default",fn:e.withCtx(()=>[e.createCommentVNode(' {{ t("action.setting") }} '),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("设置")),1)]),key:"0"}]),1040,["circle","type","style"])),[[p,r.$props.role]]):e.createCommentVNode("v-if",!0),o.btnType==="icon"?e.withDirectives((e.openBlock(),e.createBlock(e.unref(X),e.mergeProps({key:1,name:"iksvg_shezhi-daohang","show-bg":"",size:"default"},r.$attrs,{onClick:T}),null,16)),[[p,r.$props.role]]):e.createCommentVNode("v-if",!0),e.createVNode(h,{modelValue:B.value,"onUpdate:modelValue":n[3]||(n[3]=g=>B.value=g),draggable:"",width:o.inline?e.unref(C).l:e.unref(C).sl,"close-on-click-modal":!1,"close-on-press-escape":!1,title:"显示字段","append-to-body":"",onOpen:x},{footer:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(c,{onClick:n[2]||(n[2]=g=>B.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("关闭"))+" ",1),e.createCommentVNode(' {{ t("action.close") }} ')]),_:1}),e.createVNode(c,{type:"primary",disabled:i.value.length<2,onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.length<2?"至少选择一个字段":e.unref(d)("确定")),1)]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["view-fields",[o.inline?null:"un-inline"]])},[e.createElementVNode("div",{style:e.normalizeStyle({flex:o.inline?2:1})},[e.createVNode(s,{modelValue:I.value,"onUpdate:modelValue":n[0]||(n[0]=g=>I.value=g),class:"single-line",indeterminate:v.value,onChange:U},{default:e.withCtx(()=>[e.createTextVNode(" 全选 ")]),_:1},8,["modelValue","indeterminate"]),e.createVNode(b,{modelValue:u.value,"onUpdate:modelValue":n[1]||(n[1]=g=>u.value=g),onChange:z},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,g=>(e.openBlock(),e.createBlock(s,{key:g.key,disabled:!g.key,label:g.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.label),1)]),_:2},1032,["disabled","label"]))),128))]),_:1},8,["modelValue"])],4),e.createElementVNode("div",K,[e.createVNode(e.unref(G),{list:i.value,"item-style":{bottom:4},onChange:ee},null,8,["list"])])],2)]),_:1},8,["modelValue","width"])],64)}}}),ie="",D=w($(Z,[["__scopeId","data-v-b848b0c7"]]));k.IkBtnSetting=D,k.default=D,Object.defineProperties(k,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.ghost[data-v-d2a34939]{opacity:.9;background:var(--el-color-primary)!important;color:var(--el-color-white)}.list-group[data-v-d2a34939]{height:100%;width:100%;color:var(--el-text-color-regular);transition:all .25s}.list-group-item[data-v-d2a34939]{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-d2a34939]:hover{background:var(--el-color-primary-light-7)!important}.list-group-item i[data-v-d2a34939]{margin-right:calc(var(--base-m) / 2);cursor:pointer}.view-fields.un-inline .el-checkbox[data-v-b848b0c7]{width:100%;background:var(--ik-sub-sidebar-menu-bg);margin:2px 0;padding:8px;border-radius:4px;height:37px}.view-fields[data-v-b848b0c7]{display:flex;justify-content:space-between;max-height:55vh;overflow-y:auto;overflow-x:hidden}.view-fields .check-right[data-v-b848b0c7]{margin-top:37px}.view-fields .single-line[data-v-b848b0c7]{background-color:transparent!important}.view-fields>div[data-v-b848b0c7]:nth-child(1){padding-right:8px;flex:2;border-right:1px solid var(--el-border-color)}.view-fields>div[data-v-b848b0c7]:nth-child(2){flex:1;margin-left:8px}.view-fields>div:nth-child(2) .field-sort[data-v-b848b0c7]{cursor:move;padding:calc(var(--base-p) / 2);color:var(--el-text-color-regular)}.view-fields .el-checkbox[data-v-b848b0c7]{width:195px;margin-right:0}
|