mic-org 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +414 -26
- package/dist/mic.css +1 -1
- package/dist/mic.es.js +658 -266
- package/dist/mic.umd.js +2 -2
- package/package.json +1 -1
- package/src/index.d.ts +15 -10
- package/src/styles/mic-variable.scss +1 -7
package/dist/mic.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r["mic-org"]={},r.Vue))})(this,(function(r,e){"use strict";var S=document.createElement("style");S.textContent=`@charset "UTF-8";:root{--mic-search-color:#333;--mic-search-background:#fff;--mic-search-interval:1px solid #ddd;--mic-menu-width:200px;--mic-header-height:60px;--mic-footer-height:40px}.f-10[data-v-bb327344]{font-size:10px}.f-11[data-v-bb327344]{font-size:11px}.f-12[data-v-bb327344]{font-size:12px}.f-13[data-v-bb327344]{font-size:13px}.f-14[data-v-bb327344]{font-size:14px}.f-15[data-v-bb327344]{font-size:15px}.f-16[data-v-bb327344]{font-size:16px}.f-17[data-v-bb327344]{font-size:17px}.f-18[data-v-bb327344]{font-size:18px}.f-19[data-v-bb327344]{font-size:19px}.f-20[data-v-bb327344]{font-size:20px}.f-21[data-v-bb327344]{font-size:21px}.f-22[data-v-bb327344]{font-size:22px}.f-23[data-v-bb327344]{font-size:23px}.f-24[data-v-bb327344]{font-size:24px}.f-25[data-v-bb327344]{font-size:25px}.f-26[data-v-bb327344]{font-size:26px}.f-27[data-v-bb327344]{font-size:27px}.f-28[data-v-bb327344]{font-size:28px}.f-29[data-v-bb327344]{font-size:29px}.f-30[data-v-bb327344]{font-size:30px}.f-31[data-v-bb327344]{font-size:31px}.f-32[data-v-bb327344]{font-size:32px}.f-33[data-v-bb327344]{font-size:33px}.f-34[data-v-bb327344]{font-size:34px}.f-35[data-v-bb327344]{font-size:35px}.f-36[data-v-bb327344]{font-size:36px}.f-37[data-v-bb327344]{font-size:37px}.f-38[data-v-bb327344]{font-size:38px}.f-39[data-v-bb327344]{font-size:39px}.f-40[data-v-bb327344]{font-size:40px}.f-41[data-v-bb327344]{font-size:41px}.f-42[data-v-bb327344]{font-size:42px}.f-43[data-v-bb327344]{font-size:43px}.f-44[data-v-bb327344]{font-size:44px}.f-45[data-v-bb327344]{font-size:45px}.f-46[data-v-bb327344]{font-size:46px}.f-47[data-v-bb327344]{font-size:47px}.f-48[data-v-bb327344]{font-size:48px}.f-49[data-v-bb327344]{font-size:49px}.f-50[data-v-bb327344]{font-size:50px}.f-51[data-v-bb327344]{font-size:51px}.f-52[data-v-bb327344]{font-size:52px}.f-53[data-v-bb327344]{font-size:53px}.f-54[data-v-bb327344]{font-size:54px}.f-55[data-v-bb327344]{font-size:55px}.f-56[data-v-bb327344]{font-size:56px}.f-57[data-v-bb327344]{font-size:57px}.f-58[data-v-bb327344]{font-size:58px}.f-59[data-v-bb327344]{font-size:59px}.f-60[data-v-bb327344]{font-size:60px}.mic-date[data-v-bb327344]{box-sizing:border-box;width:100%;height:100%;border-radius:4px;overflow:hidden;background-color:var(--mic-search-background);display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.mic-date-left[data-v-bb327344]{height:70%;border-right:var(--mic-search-interval);color:var(--mic-search-color);padding:0 6px;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center}.mic-date-right[data-v-bb327344]{flex:1}.mic-date[data-v-bb327344] .el-date-editor{width:100%!important;height:100%!important}.mic-date[data-v-bb327344] .el-input__wrapper{box-shadow:none;padding:1px 6px}.mic-date[data-v-bb327344] .el-range__icon,.mic-date[data-v-bb327344] .el-input__prefix{display:none}.mic-date[data-v-bb327344] .is-focus{box-shadow:none!important}.f-10[data-v-d35be4c9]{font-size:10px}.f-11[data-v-d35be4c9]{font-size:11px}.f-12[data-v-d35be4c9]{font-size:12px}.f-13[data-v-d35be4c9]{font-size:13px}.f-14[data-v-d35be4c9]{font-size:14px}.f-15[data-v-d35be4c9]{font-size:15px}.f-16[data-v-d35be4c9]{font-size:16px}.f-17[data-v-d35be4c9]{font-size:17px}.f-18[data-v-d35be4c9]{font-size:18px}.f-19[data-v-d35be4c9]{font-size:19px}.f-20[data-v-d35be4c9]{font-size:20px}.f-21[data-v-d35be4c9]{font-size:21px}.f-22[data-v-d35be4c9]{font-size:22px}.f-23[data-v-d35be4c9]{font-size:23px}.f-24[data-v-d35be4c9]{font-size:24px}.f-25[data-v-d35be4c9]{font-size:25px}.f-26[data-v-d35be4c9]{font-size:26px}.f-27[data-v-d35be4c9]{font-size:27px}.f-28[data-v-d35be4c9]{font-size:28px}.f-29[data-v-d35be4c9]{font-size:29px}.f-30[data-v-d35be4c9]{font-size:30px}.f-31[data-v-d35be4c9]{font-size:31px}.f-32[data-v-d35be4c9]{font-size:32px}.f-33[data-v-d35be4c9]{font-size:33px}.f-34[data-v-d35be4c9]{font-size:34px}.f-35[data-v-d35be4c9]{font-size:35px}.f-36[data-v-d35be4c9]{font-size:36px}.f-37[data-v-d35be4c9]{font-size:37px}.f-38[data-v-d35be4c9]{font-size:38px}.f-39[data-v-d35be4c9]{font-size:39px}.f-40[data-v-d35be4c9]{font-size:40px}.f-41[data-v-d35be4c9]{font-size:41px}.f-42[data-v-d35be4c9]{font-size:42px}.f-43[data-v-d35be4c9]{font-size:43px}.f-44[data-v-d35be4c9]{font-size:44px}.f-45[data-v-d35be4c9]{font-size:45px}.f-46[data-v-d35be4c9]{font-size:46px}.f-47[data-v-d35be4c9]{font-size:47px}.f-48[data-v-d35be4c9]{font-size:48px}.f-49[data-v-d35be4c9]{font-size:49px}.f-50[data-v-d35be4c9]{font-size:50px}.f-51[data-v-d35be4c9]{font-size:51px}.f-52[data-v-d35be4c9]{font-size:52px}.f-53[data-v-d35be4c9]{font-size:53px}.f-54[data-v-d35be4c9]{font-size:54px}.f-55[data-v-d35be4c9]{font-size:55px}.f-56[data-v-d35be4c9]{font-size:56px}.f-57[data-v-d35be4c9]{font-size:57px}.f-58[data-v-d35be4c9]{font-size:58px}.f-59[data-v-d35be4c9]{font-size:59px}.f-60[data-v-d35be4c9]{font-size:60px}.mic-input[data-v-d35be4c9]{box-sizing:border-box;width:100%;height:100%;border-radius:4px;overflow:hidden;background-color:var(--mic-search-background);display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.mic-input-left[data-v-d35be4c9]{height:70%;border-right:var(--mic-search-interval);color:var(--mic-search-color);padding:0 6px;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center}.mic-input-right[data-v-d35be4c9]{flex:1}.mic-input[data-v-d35be4c9] .el-input{width:100%!important;height:100%!important}.mic-input[data-v-d35be4c9] .el-input__wrapper{box-shadow:none;padding:1px 6px}.mic-input[data-v-d35be4c9] .el-input-group__append{border:none;background:none;box-shadow:none}.mic-input[data-v-d35be4c9] .el-input.is-disabled .el-input__wrapper{background:none}.mic-layout[data-v-9993530d]{display:grid;background-color:#f1f2f6;grid-template-columns:var(--mic-menu-width) calc(100vw - var(--mic-menu-width));grid-template-rows:var(--mic-header-height) calc(100vh - var(--mic-header-height) - var(--mic-footer-height)) var(--mic-footer-height);grid-template-areas:"header header" "menu contain" "menu footer"}.mic-layout-header[data-v-9993530d]{grid-area:header}.mic-layout-contain[data-v-9993530d]{grid-area:contain;overflow:auto}.mic-layout-menu[data-v-9993530d]{grid-area:menu;overflow:auto}.mic-layout-footer[data-v-9993530d]{grid-area:footer}.mic-search-box[data-v-9003d058]{width:100%;display:grid;grid-gap:14px 12px;grid-auto-rows:34px;grid-auto-flow:row dense}.f-10[data-v-fb2f025a]{font-size:10px}.f-11[data-v-fb2f025a]{font-size:11px}.f-12[data-v-fb2f025a]{font-size:12px}.f-13[data-v-fb2f025a]{font-size:13px}.f-14[data-v-fb2f025a]{font-size:14px}.f-15[data-v-fb2f025a]{font-size:15px}.f-16[data-v-fb2f025a]{font-size:16px}.f-17[data-v-fb2f025a]{font-size:17px}.f-18[data-v-fb2f025a]{font-size:18px}.f-19[data-v-fb2f025a]{font-size:19px}.f-20[data-v-fb2f025a]{font-size:20px}.f-21[data-v-fb2f025a]{font-size:21px}.f-22[data-v-fb2f025a]{font-size:22px}.f-23[data-v-fb2f025a]{font-size:23px}.f-24[data-v-fb2f025a]{font-size:24px}.f-25[data-v-fb2f025a]{font-size:25px}.f-26[data-v-fb2f025a]{font-size:26px}.f-27[data-v-fb2f025a]{font-size:27px}.f-28[data-v-fb2f025a]{font-size:28px}.f-29[data-v-fb2f025a]{font-size:29px}.f-30[data-v-fb2f025a]{font-size:30px}.f-31[data-v-fb2f025a]{font-size:31px}.f-32[data-v-fb2f025a]{font-size:32px}.f-33[data-v-fb2f025a]{font-size:33px}.f-34[data-v-fb2f025a]{font-size:34px}.f-35[data-v-fb2f025a]{font-size:35px}.f-36[data-v-fb2f025a]{font-size:36px}.f-37[data-v-fb2f025a]{font-size:37px}.f-38[data-v-fb2f025a]{font-size:38px}.f-39[data-v-fb2f025a]{font-size:39px}.f-40[data-v-fb2f025a]{font-size:40px}.f-41[data-v-fb2f025a]{font-size:41px}.f-42[data-v-fb2f025a]{font-size:42px}.f-43[data-v-fb2f025a]{font-size:43px}.f-44[data-v-fb2f025a]{font-size:44px}.f-45[data-v-fb2f025a]{font-size:45px}.f-46[data-v-fb2f025a]{font-size:46px}.f-47[data-v-fb2f025a]{font-size:47px}.f-48[data-v-fb2f025a]{font-size:48px}.f-49[data-v-fb2f025a]{font-size:49px}.f-50[data-v-fb2f025a]{font-size:50px}.f-51[data-v-fb2f025a]{font-size:51px}.f-52[data-v-fb2f025a]{font-size:52px}.f-53[data-v-fb2f025a]{font-size:53px}.f-54[data-v-fb2f025a]{font-size:54px}.f-55[data-v-fb2f025a]{font-size:55px}.f-56[data-v-fb2f025a]{font-size:56px}.f-57[data-v-fb2f025a]{font-size:57px}.f-58[data-v-fb2f025a]{font-size:58px}.f-59[data-v-fb2f025a]{font-size:59px}.f-60[data-v-fb2f025a]{font-size:60px}.mic-select[data-v-fb2f025a]{box-sizing:border-box;width:100%;height:100%;border-radius:4px;overflow:hidden;background-color:var(--mic-search-background);display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.mic-select-left[data-v-fb2f025a]{height:70%;border-right:var(--mic-search-interval);color:var(--mic-search-color);padding:0 6px;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center}.mic-select-right[data-v-fb2f025a]{flex:1}.mic-select[data-v-fb2f025a] .el-select{width:100%!important;height:100%!important}.mic-select[data-v-fb2f025a] .el-select__wrapper{box-shadow:none;padding:1px 6px}.mic-select[data-v-fb2f025a] .is-focus,.mic-select[data-v-fb2f025a] .is-hovering{box-shadow:none!important}.f-10[data-v-101c3479]{font-size:10px}.f-11[data-v-101c3479]{font-size:11px}.f-12[data-v-101c3479]{font-size:12px}.f-13[data-v-101c3479]{font-size:13px}.f-14[data-v-101c3479]{font-size:14px}.f-15[data-v-101c3479]{font-size:15px}.f-16[data-v-101c3479]{font-size:16px}.f-17[data-v-101c3479]{font-size:17px}.f-18[data-v-101c3479]{font-size:18px}.f-19[data-v-101c3479]{font-size:19px}.f-20[data-v-101c3479]{font-size:20px}.f-21[data-v-101c3479]{font-size:21px}.f-22[data-v-101c3479]{font-size:22px}.f-23[data-v-101c3479]{font-size:23px}.f-24[data-v-101c3479]{font-size:24px}.f-25[data-v-101c3479]{font-size:25px}.f-26[data-v-101c3479]{font-size:26px}.f-27[data-v-101c3479]{font-size:27px}.f-28[data-v-101c3479]{font-size:28px}.f-29[data-v-101c3479]{font-size:29px}.f-30[data-v-101c3479]{font-size:30px}.f-31[data-v-101c3479]{font-size:31px}.f-32[data-v-101c3479]{font-size:32px}.f-33[data-v-101c3479]{font-size:33px}.f-34[data-v-101c3479]{font-size:34px}.f-35[data-v-101c3479]{font-size:35px}.f-36[data-v-101c3479]{font-size:36px}.f-37[data-v-101c3479]{font-size:37px}.f-38[data-v-101c3479]{font-size:38px}.f-39[data-v-101c3479]{font-size:39px}.f-40[data-v-101c3479]{font-size:40px}.f-41[data-v-101c3479]{font-size:41px}.f-42[data-v-101c3479]{font-size:42px}.f-43[data-v-101c3479]{font-size:43px}.f-44[data-v-101c3479]{font-size:44px}.f-45[data-v-101c3479]{font-size:45px}.f-46[data-v-101c3479]{font-size:46px}.f-47[data-v-101c3479]{font-size:47px}.f-48[data-v-101c3479]{font-size:48px}.f-49[data-v-101c3479]{font-size:49px}.f-50[data-v-101c3479]{font-size:50px}.f-51[data-v-101c3479]{font-size:51px}.f-52[data-v-101c3479]{font-size:52px}.f-53[data-v-101c3479]{font-size:53px}.f-54[data-v-101c3479]{font-size:54px}.f-55[data-v-101c3479]{font-size:55px}.f-56[data-v-101c3479]{font-size:56px}.f-57[data-v-101c3479]{font-size:57px}.f-58[data-v-101c3479]{font-size:58px}.f-59[data-v-101c3479]{font-size:59px}.f-60[data-v-101c3479]{font-size:60px}.mic-vac[data-v-101c3479]{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(S);const L=new Map([["String",""],["Number",0],["Null",""],["Undefined",""],["Boolean",!1],["Array",[]]]),$=t=>Object.prototype.toString.call(t).replace(/^\[object (\S+)\]$/,"$1"),R=(t,a)=>$(t)==a,k=(t,a)=>{const n=$(t);if(["String","Number","Null","Undefined","Boolean","Array"].includes(n))return a??L.get(n);{const d=t,f=a,o={};return Object.keys(d).forEach(c=>{o[c]=k(d[c],f?.[c])}),o}};/*! Element Plus Icons Vue v2.3.2 */var O=e.defineComponent({name:"Loading",__name:"loading",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),V=O;const D=(t,{className:a,loadStyle:n,loadComponent:i})=>{let d={color:"#409EFF",bgColor:"rgba(255,255,255,.8)"},f,o,c;return async b=>{f=document.getElementsByClassName(a)?.[0],o=document.createElement("div"),o.style.display="flex",o.style.flexDirection="row",o.style.alignItems="center",o.style.justifyContent="center",o.style.cursor="not-allowed",o.style.backgroundColor=n?.bgColor??d.bgColor;const v=s=>{s.stopPropagation(),s.preventDefault()};o.addEventListener("click",v);try{if(f){f.style.position="relative",o.style.position="absolute",o.style.left="-1px",o.style.top="-1px",o.style.zIndex="10",o.style.width="calc(100% + 2px)",o.style.height="calc(100% + 2px)";const s=i?e.h(i):e.h(V,{class:"loader",style:{color:n?.color??d.color,width:"14px",height:"14px"}});e.render(s,o),f.appendChild(o)}else{c=document.body.style.overflow,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",o.style.position="fixed",o.style.zIndex="999",o.style.left="0",o.style.top="0",o.style.width="100vw",o.style.height="100vh";const s=i?e.h(i):e.h(V,{class:"loader",style:{color:n?.color??d.color,width:"14px",height:"14px"}});e.render(s,o),document.body.appendChild(o)}await t(b)}catch(s){console.error("~~ ==== 💥💥💥💥 ==== ~ Load ~~",s)}finally{o.removeEventListener("click",v),f?f.removeChild(o):(document.body.style.overflow=c,document.documentElement.style.overflow=c,document.body.removeChild(o)),o=null,f=null}}},P=t=>{const a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],n=["","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟"],i=["角","分"],d=/^(\d{1,12})(\.(\d{1,2}))?$/;if(t==null)return"零元整";const f=String(t).trim().replace(/,/g,"");if(!d.test(f))throw new Error("金额格式错误!仅支持12位整数+2位小数");const[o="",c=""]=f.split("."),b=parseInt(o,10),v=c.padEnd(2,"0");function s(l){let p="",u=!1;const y=l.length;for(let w=0;w<y;w++){const A=parseInt(l[w],10),ce=y-1-w,M=n[ce];A===0?(u=!0,(M==="万"||M==="亿")&&(p+=M,u=!1)):(u&&(p+="零"),p+=a[A]+M,u=!1)}return p=p.replace(/亿万/,"亿"),p||"零"}function x(l){let p="";const u=parseInt(l[0],10),y=parseInt(l[1],10);return u!==0&&(p+=a[u]+i[0],y===0&&(p+="整")),y!==0&&(u===0&&b!==0&&(p+="零"),p+=a[y]+i[1]),p}const m=s(o),z=x(v);return z?`${m}元${z}`:`${m}元整`},_=(t,a)=>{const n=Object.prototype.toString.call(t).replace(/^\[object (\S+)\]$/,"$1"),i=Object.prototype.toString.call(a).replace(/^\[object (\S+)\]$/,"$1");if(n!=i)return!1;if(["String","Number","Null","Undefined","Boolean"].includes(n))return t===a;if(n==="File"){let f=["name","size","type","lastModified"];for(let o of f)if(!_(t[o],a[o]))return!1}if(n=="Object"){for(let[f,o]of Object.entries(t))if(!_(o,a[f]))return!1}if(n=="Array"){if(t.length!=a.length)return!1;for(let f=0;f<t.length;f++)if(!_(t[f],a[f]))return!1}return!0},T={check:$,reset:k,isType:R,capital:P,equal:_,load:D},U=()=>{const t=Array.prototype;t?.equal||(t.equal=function(a){if(this.length===0||!a)return{result:!1,data:[]};const n=Array.isArray(a)?a:new Array(a),i=this[0];return n.every(f=>this.every(o=>o[f]===i[f]))?{result:!0,data:n.map(f=>i[f])}:{result:!1,data:[]}})},F=()=>{const t=Array.prototype;t?.deepIncludes||(t.deepIncludes=function(a){if(this.length===0||!a)return!1;for(let n of this)if(Object.entries(a).every(([d,f])=>n[d]==f))return!0;return!1})},K=()=>{const t=Array.prototype,a=n=>n===null||typeof n!="object"?String(n):`{${Object.keys(n).sort().map(f=>`${f}:${a(n[f])}`).join()}}`;t?.noRepeat||(t.noRepeat=function(n){const i=new Map;return this.forEach(d=>{n?i.set(a(d?.[n]),d):i.set(a(d),d)}),Array.from(i.values())})},H=()=>{"exact"in Math||Object.defineProperty(Math,"exact",{value:function(t,a,n){let i=new Array(2).fill(0),d=[],f=[];`${t}`.includes(".")&&(d=`${t}`.split("."),i[0]=d?.[1]?.length??0,t=Number(d.join(""))),`${a}`.includes(".")&&(f=`${a}`.split("."),i[1]=f?.[1]?.length,a=Number(f.join("")));let o=Math.max(...i);switch(n){case"*":return t*a/Math.pow(10,i.reduce((c,b)=>c+b,0));case"/":return t*Math.pow(10,o-i[0])/(a*Math.pow(10,o-i[1]));case"+":return(t*Math.pow(10,o-i[0])+a*Math.pow(10,o-i[1]))/Math.pow(10,o);case"-":return(t*Math.pow(10,o-i[0])-a*Math.pow(10,o-i[1]))/Math.pow(10,o)}},writable:!0,configurable:!0,enumerable:!1})};U(),F(),K(),H();const G={class:"mic-date-right"},J=e.defineComponent({name:"MicDate",__name:"index",props:e.mergeModels({label:{type:String,required:!0},format:{type:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:a}){const n=e.useModel(t,"modelValue"),i=t,{label:d,type:f,format:o,border:c,width:b}=e.toRefs(i),v=a,s=x=>{v("change",x)};return(x,m)=>{const z=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"mic-date",style:e.normalizeStyle({border:e.unref(c)})},[e.createElementVNode("div",{class:"mic-date-left f-14",style:e.normalizeStyle({width:e.unref(b)})},e.toDisplayString(e.unref(d)),5),e.createElementVNode("div",G,[e.createVNode(z,e.mergeProps({modelValue:n.value,"onUpdate:modelValue":m[0]||(m[0]=l=>n.value=l),format:e.unref(o),"value-format":e.unref(o),"range-separator":"-"},x.$attrs,{onChange:s}),null,16,["modelValue","format","value-format"])])],4)}}}),h=(t,a)=>{const n=t.__vccOpts||t;for(const[i,d]of a)n[i]=d;return n},E=h(J,[["__scopeId","data-v-bb327344"]]),g=t=>(t.install=a=>{a.component(t.name||t.__name,t)},t),Q=g(E),W={class:"mic-input-right"},I=h(e.defineComponent({name:"MicInput",__name:"index",props:e.mergeModels({label:{label:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","keydown"],["update:modelValue"]),setup(t,{emit:a}){const n=e.useModel(t,"modelValue"),i=t,{label:d,border:f,width:o}=e.toRefs(i),c=a,b=s=>{c("change",s)},v=()=>{c("keydown")};return(s,x)=>{const m=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",{class:"mic-input",style:e.normalizeStyle({border:e.unref(f)})},[e.createElementVNode("div",{class:"mic-input-left f-14",style:e.normalizeStyle({width:e.unref(o)})},e.toDisplayString(e.unref(d)),5),e.createElementVNode("div",W,[e.createVNode(m,e.mergeProps({modelValue:n.value,"onUpdate:modelValue":x[0]||(x[0]=z=>n.value=z),onInput:b,onKeydown:e.withKeys(v,["enter"])},s.$attrs),null,16,["modelValue"])])],4)}}}),[["__scopeId","data-v-d35be4c9"]]),X=g(I),Y={class:"mic-layout"},Z={class:"mic-layout-header"},ee={class:"mic-layout-menu"},te={class:"mic-layout-contain"},ae={class:"mic-layout-footer"},C=h(e.defineComponent({name:"MicLayout",__name:"index",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("div",Z,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",ee,[e.renderSlot(a.$slots,"menu",{},void 0,!0)]),e.createElementVNode("div",te,[e.renderSlot(a.$slots,"contain",{},void 0,!0)]),e.createElementVNode("div",ae,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])]))}}),[["__scopeId","data-v-9993530d"]]),oe=g(C),B=h(e.defineComponent({name:"MicSearch",__name:"index",props:{span:{type:Number,required:!1,default:()=>4}},setup(t){const a=t,{span:n}=e.toRefs(a);return(i,d)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-box",style:e.normalizeStyle({"grid-template-columns":`repeat(${e.unref(n)}, calc( 100% / ${e.unref(n)} - 12px * ${e.unref(n)-1} / ${e.unref(n)} ))`})},[e.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-9003d058"]]),ne=g(B),ie={class:"mic-select-right"},j=h(e.defineComponent({name:"MicSelect",__name:"index",props:e.mergeModels({label:{type:String,required:!0},options:{type:Array,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:a}){const n=e.useModel(t,"modelValue"),i=t,{label:d,options:f,border:o,width:c}=e.toRefs(i),b=a,v=s=>{b("change",s)};return(s,x)=>{const m=e.resolveComponent("el-option"),z=e.resolveComponent("el-select");return e.openBlock(),e.createElementBlock("div",{class:"mic-select",style:e.normalizeStyle({border:e.unref(o)})},[e.createElementVNode("div",{class:"mic-select-left",style:e.normalizeStyle({width:e.unref(c)})},e.toDisplayString(e.unref(d)),5),e.createElementVNode("div",ie,[e.createVNode(z,e.mergeProps({modelValue:n.value,"onUpdate:modelValue":x[0]||(x[0]=l=>n.value=l),onChange:v},s.$attrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),l=>(e.openBlock(),e.createBlock(m,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])])],4)}}}),[["__scopeId","data-v-fb2f025a"]]),fe=g(j),N=h(e.defineComponent({name:"MicVac",__name:"index",props:{span:{type:Number,default:()=>1}},setup(t){const a=t,{span:n}=e.toRefs(a);return(i,d)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-vac",style:e.normalizeStyle({"grid-column":`span ${e.unref(n)}`})},[e.renderSlot(i.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-101c3479"]]),de=g(N),q={MicDate:E,MicInput:I,MicLayout:C,MicSearch:B,MicSelect:j,MicVac:N},se={install(t){Object.keys(q).forEach(a=>{const n=q[a];t.component(a,n)})}};r.MicDate=Q,r.MicInput=X,r.MicLayout=oe,r.MicSearch=ne,r.MicSelect=fe,r.MicVac=de,r.default=se,r.mic=T,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V["mic-org"]={},V.Vue))})(this,(function(V,e){"use strict";var E=document.createElement("style");E.textContent=`@charset "UTF-8";:root{--mic-theme-color:#005eba;--mic-search-color:#333;--mic-search-background:#fff;--mic-search-interval:1px solid #ddd}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mic-loader{animation:spin 2s linear infinite}@keyframes loading-rotate{to{transform:rotate(360deg)}}@keyframes custom-spin-move{to{opacity:1}}.circular{display:inline;height:30px;width:30px;animation:loading-rotate 2s linear infinite}.loading-path .dot1{transform:translate(3.75px,3.75px);fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3}.loading-path .dot2{transform:translate(calc(100% - 3.75px),3.75px);fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:.4s}.loading-path .dot3{transform:translate(3.75px,calc(100% - 3.75px));fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:1.2s}.loading-path .dot4{transform:translate(calc(100% - 3.75px),calc(100% - 3.75px));fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:.8s}.mic-search-box{width:100%;display:grid;grid-gap:14px 12px;grid-auto-rows:34px;grid-auto-flow:row dense}.mic-search-vac{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}.mic-search-item{width:100%;height:100%;border-radius:4px;overflow:hidden;background-color:var(--mic-search-background);display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.mic-search-item-left{height:70%;border-right:var(--mic-search-interval);color:var(--mic-search-color);padding:0 6px;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center}.mic-search-item-right{flex:1}.mic-search-item .el-date-editor,.mic-search-item .el-input,.mic-search-item .el-select{width:100%!important;height:100%!important}.mic-search-item .el-input__wrapper,.mic-search-item .el-select__wrapper{box-shadow:none;padding:1px 6px}.mic-search-item .el-input-group__append{border:none;background:none;box-shadow:none}.mic-search-item .el-input.is-disabled .el-input__wrapper{background:none}.mic-search-item .el-range__icon,.mic-search-item .el-input__prefix{display:none}.mic-search-item .is-focus,.mic-search-item .is-hovering{box-shadow:none!important}.mic-table{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;background-color:#fff}.mic-table-button{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.mic-table-button-left,.mic-table-button-right{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px}.mic-table-button-left .el-button+.el-button,.mic-table-button-right .el-button+.el-button{margin:0!important}.mic-table-cont{margin-top:10px;width:100%}.mic-table-page{width:100%;margin-top:10px;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.mic-table-page .el-pager .number{border:1px solid #fff;margin-left:10px}.mic-table-page .el-pager .number:last-child{margin-right:10px}.mic-table-page .el-pager .active{border:1px solid #005eba!important;color:#005eba!important}.mic-dialog-module{position:relative;padding-left:12px;font-size:16px;font-weight:700;margin-bottom:10px}.mic-dialog-module:before{content:"";width:4px;height:18px;border-radius:2px;background-color:#1a6bf3;position:absolute;left:0;top:2px}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(E);const z=new Map([["String",""],["Number",0],["Null",""],["Undefined",""],["Boolean",!1],["Array",[]]]),T=()=>{const n=Array.prototype;n?.equal||(n.equal=function(o){if(this.length===0||!o)return{result:!1,data:[]};const a=Array.isArray(o)?o:new Array(o),l=this[0];return a.every(r=>this.every(t=>t[r]===l[r]))?{result:!0,data:a.map(r=>l[r])}:{result:!1,data:[]}})},q=()=>{const n=Array.prototype;n?.deepIncludes||(n.deepIncludes=function(o){if(this.length===0||!o)return!1;for(let a of this)if(Object.entries(o).every(([i,r])=>a[i]==r))return!0;return!1})},L=()=>{"exact"in Math||Object.defineProperty(Math,"exact",{value:function(n,o,a){let l=new Array(2).fill(0),i=[],r=[];`${n}`.includes(".")&&(i=`${n}`.split("."),l[0]=i?.[1]?.length??0,n=Number(i.join(""))),`${o}`.includes(".")&&(r=`${o}`.split("."),l[1]=r?.[1]?.length,o=Number(r.join("")));let t=Math.max(...l);switch(a){case"*":return n*o/Math.pow(10,l.reduce((m,s)=>m+s,0));case"/":return n*Math.pow(10,t-l[0])/(o*Math.pow(10,t-l[1]));case"+":return(n*Math.pow(10,t-l[0])+o*Math.pow(10,t-l[1]))/Math.pow(10,t);case"-":return(n*Math.pow(10,t-l[0])-o*Math.pow(10,t-l[1]))/Math.pow(10,t)}},writable:!0,configurable:!0,enumerable:!1})};T(),q(),L();const B=n=>Object.prototype.toString.call(n).replace(/^\[object (\S+)\]$/,"$1"),A=(n,o)=>B(n)==o,$=(n,o)=>{const a=B(n);if(["String","Number","Null","Undefined","Boolean","Array"].includes(a))return o??z.get(a);{const i=n,r=o,t={};return Object.keys(i).forEach(m=>{t[m]=$(i[m],r?.[m])}),t}};/*! Element Plus Icons Vue v2.3.2 */var R=e.defineComponent({name:"Loading",__name:"loading",setup(n){return(o,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),N=R;const j=(n,{className:o,loadStyle:a,loadComponent:l})=>{let i={color:"#409EFF",bgColor:"rgba(255,255,255,.8)"},r,t,m;return async s=>{r=document.getElementsByClassName(o)?.[0],t=document.createElement("div"),t.style.display="flex",t.style.flexDirection="row",t.style.alignItems="center",t.style.justifyContent="center",t.style.cursor="not-allowed",t.style.backgroundColor=a?.bgColor??i.bgColor;const b=g=>{g.stopPropagation(),g.preventDefault()};t.addEventListener("click",b);try{if(r){r.style.position="relative",t.style.position="absolute",t.style.left="-1px",t.style.top="-1px",t.style.zIndex="10",t.style.width="calc(100% + 2px)",t.style.height="calc(100% + 2px)";const g=l?e.h(l):e.h(N,{class:"mic-loader",style:{color:a?.color??i.color,width:"14px",height:"14px"}});e.render(g,t),r.appendChild(t)}else{m=document.body.style.overflow,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",t.style.position="fixed",t.style.zIndex="99999",t.style.left="0",t.style.top="0",t.style.width="100vw",t.style.height="100vh";const g=l?e.h(l):e.h(N,{class:"mic-loader",style:{color:a?.color??i.color,width:"14px",height:"14px"}});e.render(g,t),document.body.appendChild(t)}await n(s)}catch(g){console.error("~~ ==== 💥💥💥💥 ==== ~ Load ~~",g)}finally{t.removeEventListener("click",b),r?r.removeChild(t):(document.body.style.overflow=m,document.documentElement.style.overflow=m,document.body.removeChild(t)),t=null,r=null}}},F=n=>{const o=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],a=["","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟"],l=["角","分"],i=/^(\d{1,12})(\.(\d{1,2}))?$/;if(n==null)return"零元整";const r=String(n).trim().replace(/,/g,"");if(!i.test(r))throw new Error("金额格式错误!仅支持12位整数+2位小数");const[t="",m=""]=r.split("."),s=parseInt(t,10),b=m.padEnd(2,"0");function g(w){let h="",d=!1;const p=w.length;for(let f=0;f<p;f++){const C=parseInt(w[f],10),S=p-1-f,x=a[S];C===0?(d=!0,(x==="万"||x==="亿")&&(h+=x,d=!1)):(d&&(h+="零"),h+=o[C]+x,d=!1)}return h=h.replace(/亿万/,"亿"),h||"零"}function y(w){let h="";const d=parseInt(w[0],10),p=parseInt(w[1],10);return d!==0&&(h+=o[d]+l[0],p===0&&(h+="整")),p!==0&&(d===0&&s!==0&&(h+="零"),h+=o[p]+l[1]),h}const _=g(t),k=y(b);return k?`${_}元${k}`:`${_}元整`},M=(n,o)=>{const a=Object.prototype.toString.call(n).replace(/^\[object (\S+)\]$/,"$1"),l=Object.prototype.toString.call(o).replace(/^\[object (\S+)\]$/,"$1");if(a!=l)return!1;if(["String","Number","Null","Undefined","Boolean"].includes(a))return n===o;if(a==="File"){let r=["name","size","type","lastModified"];for(let t of r)if(!M(n[t],o[t]))return!1}if(a=="Object"){for(let[r,t]of Object.entries(n))if(!M(t,o[r]))return!1}if(a=="Array"){if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!M(n[r],o[r]))return!1}return!0},U={check:B,reset:$,isType:A,capital:F,equal:M,load:j};class O{element;observer;constructor(o){this.element=o,this.observer=void 0}bind(o){!this.element||this.observer||(this.observer=new ResizeObserver(a=>{const l=a[0];if(!l?.contentRect)return;const{width:i,height:r}=l.contentRect,t=window.getComputedStyle(this.element);o?.(i+parseInt(t.marginLeft)+parseInt(t.marginRight),r+parseInt(t.marginTop)+parseInt(t.marginBottom))}),this.observer.observe(this.element,{box:"border-box"}))}unbind(){this.observer&&this.element&&this.observer.unobserve(this.element),this.observer=void 0}destroy(){this.observer?.disconnect(),this.observer=void 0,this.element=null}}class P{domList;#e=e.reactive({value:0});#t=e.reactive({value:0});constructor(o){this.domList=o.map(a=>({...a,height:0,width:0,exa:void 0})),this.#o()}get height(){return this.#t}get width(){return this.#e}#o(){for(let o of this.domList)o.exa=new O(document.querySelector(o.name)),o.exa.bind((a,l)=>{o.height=l,o.width=a,this.#t.value=0,this.#e.value=0;for(let i of this.domList)switch(i.type){case"+":this.#t.value+=i?.height,this.#e.value+=i?.width;break;case"-":this.#t.value-=i?.height,this.#e.value-=i?.width;break}})}close(){for(let o of this.domList)o.exa&&o.exa.destroy()}}const H={domHeight:P},K={class:"mic-search-item-right"},W=e.defineComponent({name:"MicDate",__name:"index",props:e.mergeModels({label:{type:String,required:!0},format:{type:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:o}){const a=e.useModel(n,"modelValue"),l=n,{label:i,format:r,border:t,width:m,span:s}=e.toRefs(l),b=o,g=y=>{b("change",y)};return(y,_)=>{const k=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(t),"grid-column":`span ${e.unref(s)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(m)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",K,[e.createVNode(k,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=w=>a.value=w),format:e.unref(r),"value-format":e.unref(r),"range-separator":"-"},y.$attrs,{onChange:g}),null,16,["modelValue","format","value-format"])])],4)}}}),G={class:"mic-search-item-right"},J=e.defineComponent({name:"MicInput",__name:"index",props:e.mergeModels({label:{label:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","keydown"],["update:modelValue"]),setup(n,{emit:o}){const a=e.useModel(n,"modelValue"),l=n,{label:i,border:r,width:t,span:m}=e.toRefs(l),s=o,b=y=>{s("change",y)},g=()=>{s("keydown")};return(y,_)=>{const k=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(r),"grid-column":`span ${e.unref(m)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(t)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",G,[e.createVNode(k,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=w=>a.value=w),onInput:b,onKeydown:e.withKeys(g,["enter"])},y.$attrs),null,16,["modelValue"])])],4)}}}),Q=e.defineComponent({name:"MicSearch",__name:"index",props:{span:{type:Number,required:!1,default:()=>4}},setup(n){const o=n,{span:a}=e.toRefs(o);return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-box",style:e.normalizeStyle({"grid-template-columns":`repeat(${e.unref(a)}, calc( 100% / ${e.unref(a)} - 12px * ${e.unref(a)-1} / ${e.unref(a)} ))`})},[e.renderSlot(l.$slots,"default")],4))}}),X={class:"mic-search-item-right"},Y=e.defineComponent({name:"MicSelect",__name:"index",props:e.mergeModels({label:{type:String,required:!0},options:{type:Array,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:o}){const a=e.useModel(n,"modelValue"),l=n,{label:i,options:r,border:t,width:m,span:s}=e.toRefs(l),b=o,g=y=>{b("change",y)};return(y,_)=>{const k=e.resolveComponent("el-option"),w=e.resolveComponent("el-select");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(t),"grid-column":`span ${e.unref(s)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(m)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",X,[e.createVNode(w,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=h=>a.value=h),onChange:g},y.$attrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),h=>(e.openBlock(),e.createBlock(k,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])])],4)}}}),Z=e.defineComponent({name:"MicVac",__name:"index",props:{span:{type:Number,default:()=>1}},setup(n){const o=n,{span:a}=e.toRefs(o);return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-vac",style:e.normalizeStyle({"grid-column":`span ${e.unref(a)}`})},[e.renderSlot(l.$slots,"default")],4))}}),v={class:"mic-table"},ee={class:"mic-table-button"},te={class:"mic-table-button-left"},oe={class:"mic-table-button-right"},le={class:"mic-table-cont"},ne={class:"mic-table-page"},ae={class:"mic-table-page-left"},re=e.defineComponent({name:"MicTable",__name:"index",props:{tableAttr:{type:Object,required:!1,default:()=>({})},tableData:{type:Array,required:!0},columns:{type:Array,required:!0},selectSingle:{type:Boolean,required:!1,default:!1},selectKey:{type:String,required:!1},disabledCondition:{type:Function,default:null},page:{type:Object,required:!1,default:{pageSize:100,pageNo:1,total:0}}},emits:["selection-change","page-change"],setup(n,{expose:o,emit:a}){const l=n,{tableData:i,columns:r,page:t}=e.toRefs(l),m=a,s=e.reactive({isCurrentAll:!1,isIndeterminate:!1,selectData:[],processedTableData:[]}),b=()=>{s.processedTableData=i.value.map(d=>{const p={...d};return p.checked=!1,l?.disabledCondition?p.disabled=l.disabledCondition(p):p.disabled=!1,p})};e.watch(i,()=>{b()},{immediate:!0,deep:!0});const g=d=>{l.selectSingle||(s.isIndeterminate=!1,s.processedTableData.forEach(p=>{p.disabled||(p.checked=d)}),s.selectData=s.processedTableData.filter(p=>!p.disabled&&p.checked),m("selection-change",s.selectData))},y=(d,p)=>{if(l.selectSingle)s.processedTableData.forEach(f=>{f?.[l.selectKey]!=d?.[l.selectKey]&&(f.checked=!1)});else{const f=s.processedTableData.filter(S=>!S.disabled),C=f.filter(S=>S.checked);C.length===0?(s.isCurrentAll=!1,s.isIndeterminate=!1):C.length===f.length?(s.isCurrentAll=!0,s.isIndeterminate=!1):(s.isCurrentAll=!1,s.isIndeterminate=!0)}s.selectData=s.processedTableData.filter(f=>f.checked),m("selection-change",s.selectData)},_=d=>{let p=d.map(f=>f?.[l?.selectKey]);s.processedTableData.forEach(f=>{f.checked=p.includes(f?.[l?.selectKey])}),s.selectData=s.processedTableData.filter(f=>f.checked),m("selection-change",s.selectData)},k=()=>{s.processedTableData.forEach(d=>{d.checked=!1}),s.isCurrentAll=!1,s.isIndeterminate=!1,s.selectData=[],m("selection-change",[])},w=d=>{m("page-change",{total:t.value.total,pageNo:t.value.pageNo,pageSize:d})},h=d=>{m("page-change",{total:t.value.total,pageNo:d,pageSize:t.value.pageSize})};return o({clearSelection:k,setSelection:_}),(d,p)=>{const f=e.resolveComponent("el-checkbox"),C=e.resolveComponent("el-table-column"),S=e.resolveComponent("el-table"),x=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.renderSlot(d.$slots,"buttonLeft")]),e.createElementVNode("div",oe,[e.renderSlot(d.$slots,"buttonRight")])]),e.createElementVNode("div",le,[e.createVNode(S,e.mergeProps({data:s.processedTableData,"header-cell-style":{background:"#F6F8FC",fontWeight:400,color:"#333"},stripe:""},l.tableAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c?.type=="select"&&!c?.hidden?(e.openBlock(),e.createBlock(C,e.mergeProps({key:0,ref_for:!0},c.attr),{header:e.withCtx(()=>[e.createVNode(f,{style:{height:"20px"},disabled:l.selectSingle,indeterminate:s.isIndeterminate,modelValue:s.isCurrentAll,"onUpdate:modelValue":p[0]||(p[0]=u=>s.isCurrentAll=u),onChange:p[1]||(p[1]=(u=>g(u)))},null,8,["disabled","indeterminate","modelValue"])]),default:e.withCtx(u=>[e.createVNode(f,{style:{height:"20px"},modelValue:u.row.checked,"onUpdate:modelValue":I=>u.row.checked=I,disabled:u.row.disabled,onChange:I=>y(u.row)},null,8,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:1},16)):c?.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C,e.mergeProps({key:1,type:c?.type},{ref_for:!0},c.attr),e.createSlots({_:2},[d.$slots?.[c.attr?.prop]?{name:"default",fn:e.withCtx(u=>[e.renderSlot(d.$slots,c.attr?.prop,{scope:u})]),key:"0"}:void 0]),1040,["type"]))],64))),256))]),_:3},16,["data"])]),e.createElementVNode("div",ne,[e.createElementVNode("div",ae,[e.createVNode(x,{size:"small",onSizeChange:w,"page-sizes":[10,20,50,100],"page-size":e.unref(t).pageSize,layout:"total,sizes",total:e.unref(t).total},null,8,["page-size","total"])]),e.createVNode(x,{onCurrentChange:h,size:"small","current-page":e.unref(t).pageNo,"page-sizes":[10,20,50,100],"page-size":e.unref(t).pageSize,layout:"prev, pager, next",total:e.unref(t).total},null,8,["current-page","page-size","total"])])])}}}),ie={key:0,class:"mic-dialog-module"},se={class:"dialog-footer"},D={MicDate:W,MicInput:J,MicSearch:Q,MicSelect:Y,MicVac:Z,MicTable:re,MicDialog:e.defineComponent({name:"MicDialog",__name:"index",props:e.mergeModels({title:{type:String,required:!0},width:{type:String,default:"50%"},labelWidth:{type:String,default:"120px"},formList:{type:Array,required:!0},optionList:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"}},{show:{},showModifiers:{},form:{},formModifiers:{}}),emits:e.mergeModels(["confirm"],["update:show","update:form"]),setup(n,{emit:o}){const a=e.useModel(n,"show"),l=e.useModel(n,"form"),i=n,r=o,t=e.ref(),m=()=>{a.value=!1},s=()=>{t.value.validate(async b=>{b&&r("confirm",l)})};return(b,g)=>{const y=e.resolveComponent("el-input"),_=e.resolveComponent("el-date-picker"),k=e.resolveComponent("el-option"),w=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-col"),p=e.resolveComponent("el-row"),f=e.resolveComponent("el-form"),C=e.resolveComponent("el-button"),S=e.resolveComponent("el-dialog");return a.value?(e.openBlock(),e.createBlock(S,{key:0,modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=x=>a.value=x),title:i.title,width:i.width},{footer:e.withCtx(()=>[e.createElementVNode("div",se,[e.createVNode(C,{class:"mic-dialog-close",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.cancelText),1)]),_:1}),e.createVNode(C,{type:"primary",class:"mic-dialog-confirm",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.confirmText),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(f,{model:l.value,ref_key:"formRef",ref:t,rules:i?.rules,"label-width":i.labelWidth},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.formList,x=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.module?(e.openBlock(),e.createElementBlock("p",ie,e.toDisplayString(x.module),1)):e.createCommentVNode("",!0),e.createVNode(p,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.children,c=>(e.openBlock(),e.createBlock(d,{span:c.span},{default:e.withCtx(()=>[e.createVNode(h,{label:c.label,prop:c.prop},{default:e.withCtx(()=>[c.type=="input"?(e.openBlock(),e.createBlock(y,e.mergeProps({key:0,modelValue:l.value[c.prop],"onUpdate:modelValue":u=>l.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),null,16,["modelValue","onUpdate:modelValue"])):c.type=="time"?(e.openBlock(),e.createBlock(_,e.mergeProps({key:1,modelValue:l.value[c.prop],"onUpdate:modelValue":u=>l.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),null,16,["modelValue","onUpdate:modelValue"])):c.type=="select"?(e.openBlock(),e.createBlock(w,e.mergeProps({key:2,modelValue:l.value[c.prop],"onUpdate:modelValue":u=>l.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.optionList?.[c.prop],u=>(e.openBlock(),e.createBlock(k,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue"])):e.renderSlot(b.$slots,c?.prop,{key:3,form:l.value,attr:c?.attr,event:c?.event})]),_:2},1032,["label","prop"])]),_:2},1032,["span"]))),256))]),_:2},1024)],64))),256))]),_:3},8,["model","rules","label-width"])]),_:3},8,["modelValue","title","width"])):e.createCommentVNode("",!0)}}})},ce={install(n){Object.keys(D).forEach(o=>{const a=D[o];n.component(o,a)})}};V.Mic=H,V.default=ce,V.mic=U,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
//
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
// 导出你的 mic 对象/函数
|
|
2
|
+
export const mic: {
|
|
3
|
+
// 这里写你真实的类型(随便写,只要导出即可)
|
|
4
|
+
check: any
|
|
5
|
+
reset: any
|
|
6
|
+
isType: any
|
|
7
|
+
capital: any
|
|
8
|
+
equal: any
|
|
9
|
+
load: any
|
|
10
|
+
}
|
|
11
11
|
|
|
12
|
+
// 导出你的 Mic 类
|
|
13
|
+
export const Mic: {
|
|
14
|
+
// 这里写你真实的类型(随便写,只要导出即可)
|
|
15
|
+
domHeight: any
|
|
16
|
+
}
|
|
12
17
|
declare module 'mj-integrate-component/css/index.scss' {
|
|
13
18
|
const content: string;
|
|
14
19
|
export default content;
|