@vipl520/dk-ui 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +4 -4
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/web-types.json +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/index.mjs.map +1 -1
- package/es/index.scss +63 -47
- package/es/test/src/test.vue2.mjs +1 -1
- package/es/test/src/test.vue2.mjs.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.scss +63 -47
- package/lib/test/src/test.vue2.js +1 -1
- package/lib/test/src/test.vue2.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('uno.css'), require('axios'), require('element-plus'), require('vue'), require('@vueuse/core'), require('@tinymce/tinymce-vue'), require('@iconify/vue'), require('@element-plus/icons-vue'), require('@vant/icons'), require('@form-create/element-ui'), require('vue3-draggable-resizable')) :
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'uno.css', 'axios', 'element-plus', 'vue', '@vueuse/core', '@tinymce/tinymce-vue', '@iconify/vue', '@element-plus/icons-vue', '@vant/icons', '@form-create/element-ui', 'vue3-draggable-resizable'], factory) :
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('virtual:uno.css'), require('axios'), require('element-plus'), require('vue'), require('@vueuse/core'), require('@tinymce/tinymce-vue'), require('@iconify/vue'), require('@element-plus/icons-vue'), require('@vant/icons'), require('@form-create/element-ui'), require('vue3-draggable-resizable')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'virtual:uno.css', 'axios', 'element-plus', 'vue', '@vueuse/core', '@tinymce/tinymce-vue', '@iconify/vue', '@element-plus/icons-vue', '@vant/icons', '@form-create/element-ui', 'vue3-draggable-resizable'], factory) :
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.DkUI = {}, null, global.axios, global.ElementPlus, global.Vue, global.VueUse, global.Editor, global.Icon, global.ElementPlusIconsVue, global.VantIcons, global.formCreate, global.Vue3DraggableResizable));
|
5
|
-
})(this, (function (exports,
|
5
|
+
})(this, (function (exports, virtual_uno_css, axios, elementPlus, require$$0, core, Editor, vue, ElementPlusIconsVue, icons, formCreate, Vue3DraggableResizable) { 'use strict';
|
6
6
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
8
8
|
var n = Object.create(null);
|
@@ -759,7 +759,7 @@
|
|
759
759
|
}
|
760
760
|
};
|
761
761
|
|
762
|
-
const _hoisted_1$K = { class: "mr-10px" };
|
762
|
+
const _hoisted_1$K = { class: "mr-10px bg-black" };
|
763
763
|
const __default__$H = require$$0.defineComponent({
|
764
764
|
name: "DkTest"
|
765
765
|
});
|
package/dist/index.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(j,Vn){typeof exports=="object"&&typeof module<"u"?Vn(exports,require("uno.css"),require("axios"),require("element-plus"),require("vue"),require("@vueuse/core"),require("@tinymce/tinymce-vue"),require("@iconify/vue"),require("@element-plus/icons-vue"),require("@vant/icons"),require("@form-create/element-ui"),require("vue3-draggable-resizable")):typeof define=="function"&&define.amd?define(["exports","uno.css","axios","element-plus","vue","@vueuse/core","@tinymce/tinymce-vue","@iconify/vue","@element-plus/icons-vue","@vant/icons","@form-create/element-ui","vue3-draggable-resizable"],Vn):(j=typeof globalThis<"u"?globalThis:j||self,Vn(j.DkUI={},null,j.axios,j.ElementPlus,j.Vue,j.VueUse,j.Editor,j.Icon,j.ElementPlusIconsVue,j.VantIcons,j.formCreate,j.Vue3DraggableResizable))})(this,function(j,Vn,bl,Be,e,Ht,ls,El,Bn,Fn,Nn,as){"use strict";function Zc(o){var t=Object.create(null);return o&&Object.keys(o).forEach(function(n){if(n!=="default"){var l=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return o[n]}})}}),t.default=o,Object.freeze(t)}var ss=Zc(Bn);const is=o=>o!==null&&typeof o=="object",qc=o=>o!=null,$c=o=>typeof o=="function";function rs(o,t){const n=t.split(".");let l=o;return n.forEach(a=>{var i;l=is(l)&&(i=l[a])!=null?i:""}),l}const eu=/-(\w)/g,tu=o=>o.replace(eu,(t,n)=>n.toUpperCase()),{hasOwnProperty:ou}=Object.prototype;function nu(o,t,n){const l=t[n];qc(l)&&(!ou.call(o,n)||!is(l)?o[n]=l:o[n]=cs(Object(o[n]),l))}function cs(o,t){return Object.keys(t).forEach(n=>{nu(o,t,n)}),o}var lu={name:"\u59D3\u540D",tel:"\u7535\u8BDD",save:"\u4FDD\u5B58",clear:"\u6E05\u7A7A",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",delete:"\u5220\u9664",loading:"\u52A0\u8F7D\u4E2D...",noCoupon:"\u6682\u65E0\u4F18\u60E0\u5238",nameEmpty:"\u8BF7\u586B\u5199\u59D3\u540D",addContact:"\u6DFB\u52A0\u8054\u7CFB\u4EBA",telInvalid:"\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",vanCalendar:{end:"\u7ED3\u675F",start:"\u5F00\u59CB",title:"\u65E5\u671F\u9009\u62E9",weekdays:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],monthTitle:(o,t)=>`${o}\u5E74${t}\u6708`,rangePrompt:o=>`\u6700\u591A\u9009\u62E9 ${o} \u5929`},vanCascader:{select:"\u8BF7\u9009\u62E9"},vanPagination:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875"},vanPullRefresh:{pulling:"\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",loosing:"\u91CA\u653E\u5373\u53EF\u5237\u65B0..."},vanSubmitBar:{label:"\u5408\u8BA1:"},vanCoupon:{unlimited:"\u65E0\u95E8\u69DB",discount:o=>`${o}\u6298`,condition:o=>`\u6EE1${o}\u5143\u53EF\u7528`},vanCouponCell:{title:"\u4F18\u60E0\u5238",count:o=>`${o}\u5F20\u53EF\u7528`},vanCouponList:{exchange:"\u5151\u6362",close:"\u4E0D\u4F7F\u7528",enable:"\u53EF\u7528",disabled:"\u4E0D\u53EF\u7528",placeholder:"\u8F93\u5165\u4F18\u60E0\u7801"},vanAddressEdit:{area:"\u5730\u533A",areaEmpty:"\u8BF7\u9009\u62E9\u5730\u533A",addressEmpty:"\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",addressDetail:"\u8BE6\u7EC6\u5730\u5740",defaultAddress:"\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"},vanAddressList:{add:"\u65B0\u589E\u5730\u5740"}};const us=e.ref("zh-CN"),ds=e.reactive({"zh-CN":lu});var au={messages(){return ds[us.value]},use(o,t){us.value=o,this.add({[o]:t})},add(o={}){cs(ds,o)}};function su(o){const t=tu(o)+".";return(n,...l)=>{const a=au.messages(),i=rs(a,t+n)||rs(a,n);return $c(i)?i(...l):i}}function Cl(o,t){return t?typeof t=="string"?` ${o}--${t}`:Array.isArray(t)?t.reduce((n,l)=>n+Cl(o,l),""):Object.keys(t).reduce((n,l)=>n+(t[l]?Cl(o,l):""),""):""}function iu(o){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${o}__${t}`:o,`${t}${Cl(t,n)}`)}function Ke(o){const t=`dk-${o}`;return[t,iu(t),su(t)]}const yo={ApiUrl:"https://independence.heiduoke.cn",AccessToken:"3c388087-0f14-4f8d-8463-9fc9932ce2f6",Plaid:16,AddonName:"demo_wx",ProjectType:"addon"};function ru(o){Object.assign(yo,o)}function Mo(){return yo}const cu=Object.prototype.toString,wl=(o,t)=>cu.call(o)===`[object ${t}]`,uu=o=>typeof o<"u",xl=o=>!uu(o),ps=o=>o!==null&&wl(o,"Object"),kl=o=>wl(o,"Number"),du=o=>wl(o,"String"),Sl=o=>o&&Array.isArray(o),zo=new Map,Wt={target:null,count:0};function fs(o){const{url:t,method:n,params:l}=o;let{data:a}=o;return typeof a=="string"&&(a=JSON.parse(a)),[t,n,JSON.stringify(l),JSON.stringify(a)].join("&")}function pu(o){const t=fs(o);o.cancelToken=o.cancelToken||new bl.CancelToken(n=>{zo.has(t)||zo.set(t,n)})}function Dl(o){const t=fs(o);zo.has(t)&&(zo.get(t)(t),zo.delete(t))}function ms(o){o.loading&&Wt.count>0&&Wt.count--,Wt.count===0&&(Wt.target.close(),Wt.target=null)}function fu(o){if(bl.isCancel(o))return console.warn("\u8BF7\u6C42\u7684\u91CD\u590D\u8BF7\u6C42\uFF1A"+o.message);let t="";if(o&&o.response)switch(o.response.status){case 302:t="\u63A5\u53E3\u91CD\u5B9A\u5411\u4E86\uFF01";break;case 400:t="\u53C2\u6570\u4E0D\u6B63\u786E\uFF01";break;case 401:t="\u60A8\u672A\u767B\u5F55\uFF0C\u6216\u8005\u767B\u5F55\u5DF2\u7ECF\u8D85\u65F6\uFF0C\u8BF7\u5148\u767B\u5F55\uFF01";break;case 403:t="\u60A8\u6CA1\u6709\u6743\u9650\u64CD\u4F5C\uFF01";break;case 404:t=`\u8BF7\u6C42\u5730\u5740\u51FA\u9519: ${o.response.config.url}`;break;case 408:t="\u8BF7\u6C42\u8D85\u65F6\uFF01";break;case 409:t="\u7CFB\u7EDF\u5DF2\u5B58\u5728\u76F8\u540C\u6570\u636E\uFF01";break;case 500:t="\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF\uFF01";break;case 501:t="\u670D\u52A1\u672A\u5B9E\u73B0\uFF01";break;case 502:t="\u7F51\u5173\u9519\u8BEF\uFF01";break;case 503:t="\u670D\u52A1\u4E0D\u53EF\u7528\uFF01";break;case 504:t="\u670D\u52A1\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF01";break;case 505:t="HTTP\u7248\u672C\u4E0D\u53D7\u652F\u6301\uFF01";break;default:t="\u5F02\u5E38\u95EE\u9898\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01";break}o.message.includes("timeout")&&(t="\u7F51\u7EDC\u8BF7\u6C42\u8D85\u65F6\uFF01"),o.message.includes("Network")&&(t=window.navigator.onLine?"\u670D\u52A1\u7AEF\u5F02\u5E38\uFF01":"\u60A8\u65AD\u7F51\u4E86\uFF01"),Be.ElMessage({type:"error",message:t})}const Oe=(o,t,n)=>{const l=bl.create({...o,baseURL:Mo().ApiUrl}),a=Object.assign({repeat_request_cancel:!0,loading:!1,reduct_data_format:!0,error_message_show:!0,code_success_show:!1,code_error_show:!1},t);return l.interceptors.request.use(i=>(Dl(i),a.repeat_request_cancel&&pu(i),a.loading&&(Wt.count++,Wt.count===1&&(Wt.target=Be.ElLoading.service(n))),i.headers["Access-Token"]=Mo().AccessToken,i.headers["Project-Type"]=Mo().ProjectType,i.headers.addon=Mo().AddonName,i.headers.Plaid=Mo().Plaid,i.params=i.params||{},i.params._ajax=1,i),i=>(console.log("error",i),Promise.reject(i))),l.interceptors.response.use(i=>{Dl(i.config),a.loading&&ms(a);const s=i.data,r=s.code;if(r===0)return a.code_success_show&&Be.ElMessage.success(s.msg),s;switch(a.code_error_show&&Be.ElMessage.error(s.msg),r){case-1:return Promise.reject(s);case 401:break;default:return Promise.reject(i.data||{msg:"\u672A\u77E5\u9519\u8BEF"})}return s},i=>(console.log("error",i),i.config&&Dl(i.config),a.error_message_show&&fu(i),a.loading&&ms(a),Promise.reject(i))),l.request(o)},Vl=o=>{const t={file:0,image:1,audio:2,video:3};return typeof o=="number"||/^\d+$/.test(o)?parseInt(o,10):t[o]},mu=o=>{const t={0:"\u6587\u4EF6\u9009\u62E9",1:"\u9009\u62E9\u56FE\u7247",2:"\u9009\u62E9\u97F3\u9891",3:"\u9009\u62E9\u89C6\u9891"},n=Vl(o);return t[n]||"\u6587\u4EF6\u9009\u62E9"};function ue(o){return o.install=t=>{const{name:n}=o;n&&t.component(n,o)},o}const bo={get(o,t="localStorage"){const n=this.getStorage(t);return n?n.getItem(o):null},set(o,t,n="localStorage"){const l=this.getStorage(n);l&&l.setItem(o,t)},remove(o,t="localStorage"){const n=this.getStorage(t);n&&n.removeItem(o)},clear(o="localStorage"){const t=this.getStorage(o);t&&t.clear()},getStorage(o){return o==="localStorage"&&typeof localStorage<"u"?localStorage:o==="sessionStorage"&&typeof sessionStorage<"u"?sessionStorage:null}};function An(o){return o.replace(o[0],o[0].toLocaleUpperCase())}const hs=(o,t=["px","%","rem","em"])=>{const n=/(\d+)(\D+)/,l=o.match(n);let a={number:0,unit:""};return l&&(a={number:parseInt(l[1],10),unit:t.includes(l[2])?l[2]:t[0]}),a};for(let o=0;o<=15;o++)o.toString(16);const hu=(o,t="_blank")=>{t=="_blank"?window.open(o):window.location.href=o},vu=(o,t="yyyy-mm-dd hh:MM:ss")=>{o||(o=Number(new Date)),o.toString().length===10&&(o=+o*1e3);const n=new Date(o);let l;const a={"y+":n.getFullYear().toString(),"m+":(n.getMonth()+1).toString(),"d+":n.getDate().toString(),"h+":n.getHours().toString(),"M+":n.getMinutes().toString(),"s+":n.getSeconds().toString()};for(const i in a)l=new RegExp("("+i+")").exec(t),l&&(t=t.replace(l[1],l[1].length==1?a[i]:gu(a[i],l[1].length,"0")));return t},gu=(o,t,n=" ")=>{if(o.length>=t)return o;const l=t-o.length;let a=Math.ceil(l/n.length);for(;a>>=1;)n+=n,a===1&&(n+=n);return n.slice(0,l)+o},Bl=(o,t,n)=>{for(const l in o)if(o[l][t]==n)return l;return!1},Fl=(o,t,n=-1)=>{for(const l in o){if(typeof n=="number"&&n++,n==t)return o[l];if(o[l].children&&(n=Fl(o[l].children,t,n),typeof n!="number"))return n}return n};class yu{el;constructor(t){this.el=t,this.handleWheelEvent()}handleWheelEvent(){let t="";"onmousewheel"in this.el?t="mousewheel":"onwheel"in this.el?t="wheel":"attachEvent"in window?t="onmousewheel":t="DOMMouseScroll",this.el.addEventListener(t,this.scroll,{passive:!0})}scroll=t=>{this.el.clientWidth>=this.el.scrollWidth||(this.el.scrollLeft+=t.deltaY?t.deltaY:t.detail&&t.detail!==0?t.detail:-t.wheelDelta)}}function vs(o,t){let n=null;return function(...l){clearTimeout(n),n=setTimeout(()=>{o.apply(this,l)},t)}}function bu(o){xu(o),wu(o),Cu(o),Eu(o)}function Eu(o){o.directive("tableLateralDrag",{created(t){new yu(t.querySelector(".el-table__body-wrapper .el-scrollbar .el-scrollbar__wrap"))}})}function Cu(o){o.directive("blur",{mounted(t){Ht.useEventListener(t,"focus",()=>t.blur())}})}function wu(o){o.directive("zoom",{mounted(t,n){if(!n.value)return!1;const l=du(n.value)?[n.value,".el-dialog__body",!1,!0]:n.value;l[1]=l[1]?l[1]:".el-dialog__body",l[2]=typeof l[2]>"u"?!1:l[2],l[3]=typeof l[3]>"u"?!0:l[3],e.nextTick(()=>{const a=document.querySelector(l[1]),i=document.querySelector(l[0]),s=document.createElement("div");s.className="zoom-handle",s.onmouseenter=()=>{s.onmousedown=r=>{const c=r.clientX,u=r.clientY,m=a.offsetWidth,f=a.offsetHeight,d=i.offsetWidth,y=i.offsetHeight;document.onmousemove=w=>{w.preventDefault();const h=m+(w.clientX-c)*2,p=f+(w.clientY-u);if(a.style.width=`${h}px`,a.style.height=`${p}px`,l[2]){const E=y+(w.clientY-u);i.style.height=`${E}px`}if(l[3]){const E=d+(w.clientX-c)*2;i.style.width=`${E}px`}},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}},i.appendChild(s)})}})}function xu(o){o.directive("drag",{mounted(t,n){if(!n.value)return!1;const l=document.querySelector(n.value[0]),a=document.querySelector(n.value[1]);if(!a||!l)return!1;a.onmouseover=()=>a.style.cursor="move";function i(r,c){const u=c==="pc"?r.clientX-a.offsetLeft:r.touches[0].clientX-a.offsetLeft,m=c==="pc"?r.clientY-a.offsetTop:r.touches[0].clientY-a.offsetTop,f=document.body.clientWidth,d=document.body.clientHeight||document.documentElement.clientHeight,y=l.offsetWidth,w=l.offsetHeight,h=l.offsetLeft,p=f-l.offsetLeft-y,E=l.offsetTop,v=d-l.offsetTop-w;let C=getComputedStyle(l).left,g=getComputedStyle(l).top;return C=+C.replace(/\px/g,""),g=+g.replace(/\px/g,""),{disX:u,disY:m,minDragDomLeft:h,maxDragDomLeft:p,minDragDomTop:E,maxDragDomTop:v,styL:C,styT:g}}function s(r,c,u){const{disX:m,disY:f,minDragDomLeft:d,maxDragDomLeft:y,minDragDomTop:w,maxDragDomTop:h,styL:p,styT:E}=u;let v=c==="pc"?r.clientX-m:r.touches[0].clientX-m,C=c==="pc"?r.clientY-f:r.touches[0].clientY-f;-v>d?v=-d:v>y&&(v=y),-C>w?C=-w:C>h&&(C=h),l.style.cssText+=`;left:${v+p}px;top:${C+E}px;`}a.onmousedown=r=>{const c=i(r,"pc");document.onmousemove=u=>{s(u,"pc",c)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},a.ontouchstart=r=>{const c=i(r,"app");document.ontouchmove=u=>{s(u,"app",c)},document.ontouchend=()=>{document.ontouchmove=null,document.ontouchend=null}}}})}const Eo=o=>({type:String,default:o}),gs={type:Eo(""),test:{default:"\u6D4B\u8BD5\u6D4B\u8BD5",type:String}},ku={class:"mr-10px"},Su=e.defineComponent({name:"DkTest"});var Du=e.defineComponent({...Su,props:gs,setup(o){return Ke("test"),(t,n)=>{const l=e.resolveComponent("el-button"),a=e.resolveComponent("van-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{class:"dk-test"},{default:e.withCtx(()=>[e.createTextVNode("Test")]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>[e.createTextVNode("vant")]),_:1}),e.createElementVNode("div",ku,e.toDisplayString(t.test),1)],64)}}}),H=(o,t)=>{const n=o.__vccOpts||o;for(const[l,a]of t)n[l]=a;return n},Vu=H(Du,[["__file","E:\\project\\monster-admin\\system\\dkgs-ui_test\\dk-ui-all\\packages\\dk-ui\\src\\test\\src\\test.vue"]]);const ys=ue(Vu);function Bu(o,t){return{}.hasOwnProperty.call(o,t)}function Uo(o,t,n){o[t]=n}function Nl(o){return Al({},{value:o},void 0).value}function Al(o,t={},n=!1){let l=!1;for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)){let i=t[a];if((l=Array.isArray(i))||ps(i)){const s=o[a]===void 0;if(l)l=!1,s&&Uo(o,a,[]);else if(i._clone&&n)if(n)i=i.getRule(),s&&Uo(o,a,{});else{Uo(o,a,i._clone());continue}else s&&Uo(o,a,{});o[a]=Al(o[a],i,n)}else Uo(o,a,i),xl(i)||(xl(i.__json)||(o[a].__json=i.__json),xl(i.__origin)||(o[a].__origin=i.__origin))}return n!==void 0&&Array.isArray(o)?o.filter(a=>!a||!a.__ctrl):o}function Fu(o,t,n){o[t]=n}const Nu=Object.assign||function(o){for(let t=1;t<arguments.length;t++){const n=arguments[t];for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&Fu(o,l,n[l])}return o};function Au(...o){return Nu.apply(this,o)}var _u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tu(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Iu(o){if(o.__esModule)return o;var t=o.default;if(typeof t=="function"){var n=function l(){return this instanceof l?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(o).forEach(function(l){var a=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(n,l,a.get?a:{enumerable:!0,get:function(){return o[l]}})}),n}var bs={exports:{}};/**!
|
1
|
+
(function(j,Vn){typeof exports=="object"&&typeof module<"u"?Vn(exports,require("virtual:uno.css"),require("axios"),require("element-plus"),require("vue"),require("@vueuse/core"),require("@tinymce/tinymce-vue"),require("@iconify/vue"),require("@element-plus/icons-vue"),require("@vant/icons"),require("@form-create/element-ui"),require("vue3-draggable-resizable")):typeof define=="function"&&define.amd?define(["exports","virtual:uno.css","axios","element-plus","vue","@vueuse/core","@tinymce/tinymce-vue","@iconify/vue","@element-plus/icons-vue","@vant/icons","@form-create/element-ui","vue3-draggable-resizable"],Vn):(j=typeof globalThis<"u"?globalThis:j||self,Vn(j.DkUI={},null,j.axios,j.ElementPlus,j.Vue,j.VueUse,j.Editor,j.Icon,j.ElementPlusIconsVue,j.VantIcons,j.formCreate,j.Vue3DraggableResizable))})(this,function(j,Vn,bl,Be,e,Ht,ls,El,Bn,Fn,Nn,as){"use strict";function Zc(o){var t=Object.create(null);return o&&Object.keys(o).forEach(function(n){if(n!=="default"){var l=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return o[n]}})}}),t.default=o,Object.freeze(t)}var ss=Zc(Bn);const is=o=>o!==null&&typeof o=="object",qc=o=>o!=null,$c=o=>typeof o=="function";function rs(o,t){const n=t.split(".");let l=o;return n.forEach(a=>{var i;l=is(l)&&(i=l[a])!=null?i:""}),l}const eu=/-(\w)/g,tu=o=>o.replace(eu,(t,n)=>n.toUpperCase()),{hasOwnProperty:ou}=Object.prototype;function nu(o,t,n){const l=t[n];qc(l)&&(!ou.call(o,n)||!is(l)?o[n]=l:o[n]=cs(Object(o[n]),l))}function cs(o,t){return Object.keys(t).forEach(n=>{nu(o,t,n)}),o}var lu={name:"\u59D3\u540D",tel:"\u7535\u8BDD",save:"\u4FDD\u5B58",clear:"\u6E05\u7A7A",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",delete:"\u5220\u9664",loading:"\u52A0\u8F7D\u4E2D...",noCoupon:"\u6682\u65E0\u4F18\u60E0\u5238",nameEmpty:"\u8BF7\u586B\u5199\u59D3\u540D",addContact:"\u6DFB\u52A0\u8054\u7CFB\u4EBA",telInvalid:"\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",vanCalendar:{end:"\u7ED3\u675F",start:"\u5F00\u59CB",title:"\u65E5\u671F\u9009\u62E9",weekdays:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],monthTitle:(o,t)=>`${o}\u5E74${t}\u6708`,rangePrompt:o=>`\u6700\u591A\u9009\u62E9 ${o} \u5929`},vanCascader:{select:"\u8BF7\u9009\u62E9"},vanPagination:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875"},vanPullRefresh:{pulling:"\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",loosing:"\u91CA\u653E\u5373\u53EF\u5237\u65B0..."},vanSubmitBar:{label:"\u5408\u8BA1:"},vanCoupon:{unlimited:"\u65E0\u95E8\u69DB",discount:o=>`${o}\u6298`,condition:o=>`\u6EE1${o}\u5143\u53EF\u7528`},vanCouponCell:{title:"\u4F18\u60E0\u5238",count:o=>`${o}\u5F20\u53EF\u7528`},vanCouponList:{exchange:"\u5151\u6362",close:"\u4E0D\u4F7F\u7528",enable:"\u53EF\u7528",disabled:"\u4E0D\u53EF\u7528",placeholder:"\u8F93\u5165\u4F18\u60E0\u7801"},vanAddressEdit:{area:"\u5730\u533A",areaEmpty:"\u8BF7\u9009\u62E9\u5730\u533A",addressEmpty:"\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",addressDetail:"\u8BE6\u7EC6\u5730\u5740",defaultAddress:"\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"},vanAddressList:{add:"\u65B0\u589E\u5730\u5740"}};const us=e.ref("zh-CN"),ds=e.reactive({"zh-CN":lu});var au={messages(){return ds[us.value]},use(o,t){us.value=o,this.add({[o]:t})},add(o={}){cs(ds,o)}};function su(o){const t=tu(o)+".";return(n,...l)=>{const a=au.messages(),i=rs(a,t+n)||rs(a,n);return $c(i)?i(...l):i}}function Cl(o,t){return t?typeof t=="string"?` ${o}--${t}`:Array.isArray(t)?t.reduce((n,l)=>n+Cl(o,l),""):Object.keys(t).reduce((n,l)=>n+(t[l]?Cl(o,l):""),""):""}function iu(o){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${o}__${t}`:o,`${t}${Cl(t,n)}`)}function Ke(o){const t=`dk-${o}`;return[t,iu(t),su(t)]}const yo={ApiUrl:"https://independence.heiduoke.cn",AccessToken:"3c388087-0f14-4f8d-8463-9fc9932ce2f6",Plaid:16,AddonName:"demo_wx",ProjectType:"addon"};function ru(o){Object.assign(yo,o)}function Mo(){return yo}const cu=Object.prototype.toString,wl=(o,t)=>cu.call(o)===`[object ${t}]`,uu=o=>typeof o<"u",xl=o=>!uu(o),ps=o=>o!==null&&wl(o,"Object"),kl=o=>wl(o,"Number"),du=o=>wl(o,"String"),Sl=o=>o&&Array.isArray(o),zo=new Map,Wt={target:null,count:0};function fs(o){const{url:t,method:n,params:l}=o;let{data:a}=o;return typeof a=="string"&&(a=JSON.parse(a)),[t,n,JSON.stringify(l),JSON.stringify(a)].join("&")}function pu(o){const t=fs(o);o.cancelToken=o.cancelToken||new bl.CancelToken(n=>{zo.has(t)||zo.set(t,n)})}function Dl(o){const t=fs(o);zo.has(t)&&(zo.get(t)(t),zo.delete(t))}function ms(o){o.loading&&Wt.count>0&&Wt.count--,Wt.count===0&&(Wt.target.close(),Wt.target=null)}function fu(o){if(bl.isCancel(o))return console.warn("\u8BF7\u6C42\u7684\u91CD\u590D\u8BF7\u6C42\uFF1A"+o.message);let t="";if(o&&o.response)switch(o.response.status){case 302:t="\u63A5\u53E3\u91CD\u5B9A\u5411\u4E86\uFF01";break;case 400:t="\u53C2\u6570\u4E0D\u6B63\u786E\uFF01";break;case 401:t="\u60A8\u672A\u767B\u5F55\uFF0C\u6216\u8005\u767B\u5F55\u5DF2\u7ECF\u8D85\u65F6\uFF0C\u8BF7\u5148\u767B\u5F55\uFF01";break;case 403:t="\u60A8\u6CA1\u6709\u6743\u9650\u64CD\u4F5C\uFF01";break;case 404:t=`\u8BF7\u6C42\u5730\u5740\u51FA\u9519: ${o.response.config.url}`;break;case 408:t="\u8BF7\u6C42\u8D85\u65F6\uFF01";break;case 409:t="\u7CFB\u7EDF\u5DF2\u5B58\u5728\u76F8\u540C\u6570\u636E\uFF01";break;case 500:t="\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF\uFF01";break;case 501:t="\u670D\u52A1\u672A\u5B9E\u73B0\uFF01";break;case 502:t="\u7F51\u5173\u9519\u8BEF\uFF01";break;case 503:t="\u670D\u52A1\u4E0D\u53EF\u7528\uFF01";break;case 504:t="\u670D\u52A1\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF01";break;case 505:t="HTTP\u7248\u672C\u4E0D\u53D7\u652F\u6301\uFF01";break;default:t="\u5F02\u5E38\u95EE\u9898\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01";break}o.message.includes("timeout")&&(t="\u7F51\u7EDC\u8BF7\u6C42\u8D85\u65F6\uFF01"),o.message.includes("Network")&&(t=window.navigator.onLine?"\u670D\u52A1\u7AEF\u5F02\u5E38\uFF01":"\u60A8\u65AD\u7F51\u4E86\uFF01"),Be.ElMessage({type:"error",message:t})}const Oe=(o,t,n)=>{const l=bl.create({...o,baseURL:Mo().ApiUrl}),a=Object.assign({repeat_request_cancel:!0,loading:!1,reduct_data_format:!0,error_message_show:!0,code_success_show:!1,code_error_show:!1},t);return l.interceptors.request.use(i=>(Dl(i),a.repeat_request_cancel&&pu(i),a.loading&&(Wt.count++,Wt.count===1&&(Wt.target=Be.ElLoading.service(n))),i.headers["Access-Token"]=Mo().AccessToken,i.headers["Project-Type"]=Mo().ProjectType,i.headers.addon=Mo().AddonName,i.headers.Plaid=Mo().Plaid,i.params=i.params||{},i.params._ajax=1,i),i=>(console.log("error",i),Promise.reject(i))),l.interceptors.response.use(i=>{Dl(i.config),a.loading&&ms(a);const s=i.data,r=s.code;if(r===0)return a.code_success_show&&Be.ElMessage.success(s.msg),s;switch(a.code_error_show&&Be.ElMessage.error(s.msg),r){case-1:return Promise.reject(s);case 401:break;default:return Promise.reject(i.data||{msg:"\u672A\u77E5\u9519\u8BEF"})}return s},i=>(console.log("error",i),i.config&&Dl(i.config),a.error_message_show&&fu(i),a.loading&&ms(a),Promise.reject(i))),l.request(o)},Vl=o=>{const t={file:0,image:1,audio:2,video:3};return typeof o=="number"||/^\d+$/.test(o)?parseInt(o,10):t[o]},mu=o=>{const t={0:"\u6587\u4EF6\u9009\u62E9",1:"\u9009\u62E9\u56FE\u7247",2:"\u9009\u62E9\u97F3\u9891",3:"\u9009\u62E9\u89C6\u9891"},n=Vl(o);return t[n]||"\u6587\u4EF6\u9009\u62E9"};function ue(o){return o.install=t=>{const{name:n}=o;n&&t.component(n,o)},o}const bo={get(o,t="localStorage"){const n=this.getStorage(t);return n?n.getItem(o):null},set(o,t,n="localStorage"){const l=this.getStorage(n);l&&l.setItem(o,t)},remove(o,t="localStorage"){const n=this.getStorage(t);n&&n.removeItem(o)},clear(o="localStorage"){const t=this.getStorage(o);t&&t.clear()},getStorage(o){return o==="localStorage"&&typeof localStorage<"u"?localStorage:o==="sessionStorage"&&typeof sessionStorage<"u"?sessionStorage:null}};function An(o){return o.replace(o[0],o[0].toLocaleUpperCase())}const hs=(o,t=["px","%","rem","em"])=>{const n=/(\d+)(\D+)/,l=o.match(n);let a={number:0,unit:""};return l&&(a={number:parseInt(l[1],10),unit:t.includes(l[2])?l[2]:t[0]}),a};for(let o=0;o<=15;o++)o.toString(16);const hu=(o,t="_blank")=>{t=="_blank"?window.open(o):window.location.href=o},vu=(o,t="yyyy-mm-dd hh:MM:ss")=>{o||(o=Number(new Date)),o.toString().length===10&&(o=+o*1e3);const n=new Date(o);let l;const a={"y+":n.getFullYear().toString(),"m+":(n.getMonth()+1).toString(),"d+":n.getDate().toString(),"h+":n.getHours().toString(),"M+":n.getMinutes().toString(),"s+":n.getSeconds().toString()};for(const i in a)l=new RegExp("("+i+")").exec(t),l&&(t=t.replace(l[1],l[1].length==1?a[i]:gu(a[i],l[1].length,"0")));return t},gu=(o,t,n=" ")=>{if(o.length>=t)return o;const l=t-o.length;let a=Math.ceil(l/n.length);for(;a>>=1;)n+=n,a===1&&(n+=n);return n.slice(0,l)+o},Bl=(o,t,n)=>{for(const l in o)if(o[l][t]==n)return l;return!1},Fl=(o,t,n=-1)=>{for(const l in o){if(typeof n=="number"&&n++,n==t)return o[l];if(o[l].children&&(n=Fl(o[l].children,t,n),typeof n!="number"))return n}return n};class yu{el;constructor(t){this.el=t,this.handleWheelEvent()}handleWheelEvent(){let t="";"onmousewheel"in this.el?t="mousewheel":"onwheel"in this.el?t="wheel":"attachEvent"in window?t="onmousewheel":t="DOMMouseScroll",this.el.addEventListener(t,this.scroll,{passive:!0})}scroll=t=>{this.el.clientWidth>=this.el.scrollWidth||(this.el.scrollLeft+=t.deltaY?t.deltaY:t.detail&&t.detail!==0?t.detail:-t.wheelDelta)}}function vs(o,t){let n=null;return function(...l){clearTimeout(n),n=setTimeout(()=>{o.apply(this,l)},t)}}function bu(o){xu(o),wu(o),Cu(o),Eu(o)}function Eu(o){o.directive("tableLateralDrag",{created(t){new yu(t.querySelector(".el-table__body-wrapper .el-scrollbar .el-scrollbar__wrap"))}})}function Cu(o){o.directive("blur",{mounted(t){Ht.useEventListener(t,"focus",()=>t.blur())}})}function wu(o){o.directive("zoom",{mounted(t,n){if(!n.value)return!1;const l=du(n.value)?[n.value,".el-dialog__body",!1,!0]:n.value;l[1]=l[1]?l[1]:".el-dialog__body",l[2]=typeof l[2]>"u"?!1:l[2],l[3]=typeof l[3]>"u"?!0:l[3],e.nextTick(()=>{const a=document.querySelector(l[1]),i=document.querySelector(l[0]),s=document.createElement("div");s.className="zoom-handle",s.onmouseenter=()=>{s.onmousedown=r=>{const c=r.clientX,u=r.clientY,m=a.offsetWidth,f=a.offsetHeight,d=i.offsetWidth,y=i.offsetHeight;document.onmousemove=w=>{w.preventDefault();const h=m+(w.clientX-c)*2,p=f+(w.clientY-u);if(a.style.width=`${h}px`,a.style.height=`${p}px`,l[2]){const E=y+(w.clientY-u);i.style.height=`${E}px`}if(l[3]){const E=d+(w.clientX-c)*2;i.style.width=`${E}px`}},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}},i.appendChild(s)})}})}function xu(o){o.directive("drag",{mounted(t,n){if(!n.value)return!1;const l=document.querySelector(n.value[0]),a=document.querySelector(n.value[1]);if(!a||!l)return!1;a.onmouseover=()=>a.style.cursor="move";function i(r,c){const u=c==="pc"?r.clientX-a.offsetLeft:r.touches[0].clientX-a.offsetLeft,m=c==="pc"?r.clientY-a.offsetTop:r.touches[0].clientY-a.offsetTop,f=document.body.clientWidth,d=document.body.clientHeight||document.documentElement.clientHeight,y=l.offsetWidth,w=l.offsetHeight,h=l.offsetLeft,p=f-l.offsetLeft-y,E=l.offsetTop,v=d-l.offsetTop-w;let C=getComputedStyle(l).left,g=getComputedStyle(l).top;return C=+C.replace(/\px/g,""),g=+g.replace(/\px/g,""),{disX:u,disY:m,minDragDomLeft:h,maxDragDomLeft:p,minDragDomTop:E,maxDragDomTop:v,styL:C,styT:g}}function s(r,c,u){const{disX:m,disY:f,minDragDomLeft:d,maxDragDomLeft:y,minDragDomTop:w,maxDragDomTop:h,styL:p,styT:E}=u;let v=c==="pc"?r.clientX-m:r.touches[0].clientX-m,C=c==="pc"?r.clientY-f:r.touches[0].clientY-f;-v>d?v=-d:v>y&&(v=y),-C>w?C=-w:C>h&&(C=h),l.style.cssText+=`;left:${v+p}px;top:${C+E}px;`}a.onmousedown=r=>{const c=i(r,"pc");document.onmousemove=u=>{s(u,"pc",c)},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}},a.ontouchstart=r=>{const c=i(r,"app");document.ontouchmove=u=>{s(u,"app",c)},document.ontouchend=()=>{document.ontouchmove=null,document.ontouchend=null}}}})}const Eo=o=>({type:String,default:o}),gs={type:Eo(""),test:{default:"\u6D4B\u8BD5\u6D4B\u8BD5",type:String}},ku={class:"mr-10px bg-black"},Su=e.defineComponent({name:"DkTest"});var Du=e.defineComponent({...Su,props:gs,setup(o){return Ke("test"),(t,n)=>{const l=e.resolveComponent("el-button"),a=e.resolveComponent("van-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(l,{class:"dk-test"},{default:e.withCtx(()=>[e.createTextVNode("Test")]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>[e.createTextVNode("vant")]),_:1}),e.createElementVNode("div",ku,e.toDisplayString(t.test),1)],64)}}}),H=(o,t)=>{const n=o.__vccOpts||o;for(const[l,a]of t)n[l]=a;return n},Vu=H(Du,[["__file","E:\\project\\monster-admin\\system\\dkgs-ui_test\\dk-ui-all\\packages\\dk-ui\\src\\test\\src\\test.vue"]]);const ys=ue(Vu);function Bu(o,t){return{}.hasOwnProperty.call(o,t)}function Uo(o,t,n){o[t]=n}function Nl(o){return Al({},{value:o},void 0).value}function Al(o,t={},n=!1){let l=!1;for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)){let i=t[a];if((l=Array.isArray(i))||ps(i)){const s=o[a]===void 0;if(l)l=!1,s&&Uo(o,a,[]);else if(i._clone&&n)if(n)i=i.getRule(),s&&Uo(o,a,{});else{Uo(o,a,i._clone());continue}else s&&Uo(o,a,{});o[a]=Al(o[a],i,n)}else Uo(o,a,i),xl(i)||(xl(i.__json)||(o[a].__json=i.__json),xl(i.__origin)||(o[a].__origin=i.__origin))}return n!==void 0&&Array.isArray(o)?o.filter(a=>!a||!a.__ctrl):o}function Fu(o,t,n){o[t]=n}const Nu=Object.assign||function(o){for(let t=1;t<arguments.length;t++){const n=arguments[t];for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&Fu(o,l,n[l])}return o};function Au(...o){return Nu.apply(this,o)}var _u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tu(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Iu(o){if(o.__esModule)return o;var t=o.default;if(typeof t=="function"){var n=function l(){return this instanceof l?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(o).forEach(function(l){var a=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(n,l,a.get?a:{enumerable:!0,get:function(){return o[l]}})}),n}var bs={exports:{}};/**!
|
2
2
|
* Sortable 1.14.0
|
3
3
|
* @author RubaXa <trash@rubaxa.org>
|
4
4
|
* @author owenm <owen23355@gmail.com>
|