mower-ng/ui/dist/assets/index2.js
fuyn101 2e5d10433a
Some checks failed
ci/woodpecker/push/check_format Pipeline failed
优化基建技能页打开速度
2025-02-17 13:28:12 +08:00

2 lines
4.1 KiB
JavaScript

import{e8 as W,ea as F}from"./install.js";import{A as G,B as q,aP as D,h as w,f as V,c as d,l as Z,w as A,ax as H,p as J,q as Q,i as X,aI as ee,n as te}from"./_plugin-vue_export-helper.js";const ne=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function se(e){function o(t){return(...a)=>{if(!e.value)throw new Error("ECharts is not initialized yet.");return e.value[t].apply(e.value,a)}}function n(){const t=Object.create(null);return ne.forEach(a=>{t[a]=o(a)}),t}return n()}function ie(e,o,n){A([n,e,o],([t,a,l],N,C)=>{let c=null;if(t&&a&&l){const{offsetWidth:I,offsetHeight:P}=t,x=l===!0?{}:l,{throttle:m=100,onResize:f}=x;let p=!1;const h=()=>{a.resize(),f==null||f()},z=m?F(h,m):h;c=new ResizeObserver(()=>{!p&&(p=!0,t.offsetWidth===I&&t.offsetHeight===P)||z()}),c.observe(t)}C(()=>{c&&(c.disconnect(),c=null)})})}const oe={autoresize:[Boolean,Object]},ae=/^on[^a-z]/,S=e=>ae.test(e);function le(e){const o={};for(const n in e)S(n)||(o[n]=e[n]);return o}function L(e,o){const n=X(e)?ee(e):e;return n&&typeof n=="object"&&"value"in n?n.value||o:n||o}const ce="ecLoadingOptions";function re(e,o,n){const t=w(ce,{}),a=d(()=>({...L(t,{}),...n==null?void 0:n.value}));H(()=>{const l=e.value;l&&(o.value?l.showLoading(a.value):l.hideLoading())})}const ue={loading:Boolean,loadingOptions:Object};let O=null;const $="x-vue-echarts";function fe(){if(O!=null)return O;if(typeof HTMLElement>"u"||typeof customElements>"u")return O=!1;try{new Function("tag","class EChartsElement extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&(this.__dispose(),this.__dispose=null)}}customElements.get(tag)==null&&customElements.define(tag,EChartsElement);")($)}catch{return O=!1}return O=!0}document.head.appendChild(document.createElement("style")).textContent=`x-vue-echarts{display:block;width:100%;height:100%;min-width:0}
`;const de=fe(),pe="ecTheme",he="ecInitOptions",ve="ecUpdateOptions",y=/(^&?~?!?)native:/;var me=G({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...oe,...ue},emits:{},inheritAttrs:!1,setup(e,{attrs:o}){const n=D(),t=D(),a=D(),l=w(pe,null),N=w(he,null),C=w(ve,null),{autoresize:c,manualUpdate:I,loading:P,loadingOptions:x}=V(e),m=d(()=>a.value||e.option||null),f=d(()=>e.theme||L(l,{})),p=d(()=>e.initOptions||L(N,{})),h=d(()=>e.updateOptions||L(C,{})),z=d(()=>le(o)),j={},E=Z().proxy.$listeners,_={};E?Object.keys(E).forEach(i=>{y.test(i)?j[i.replace(y,"$1")]=E[i]:_[i]=E[i]}):Object.keys(o).filter(i=>S(i)).forEach(i=>{let s=i.charAt(2).toLowerCase()+i.slice(3);if(s.indexOf("native:")===0){const v=`on${s.charAt(7).toUpperCase()}${s.slice(8)}`;j[v]=o[i];return}s.substring(s.length-4)==="Once"&&(s=`~${s.substring(0,s.length-4)}`),_[s]=o[i]});function b(i){if(!n.value)return;const s=t.value=W(n.value,f.value,p.value);e.group&&(s.group=e.group),Object.keys(_).forEach(g=>{let r=_[g];if(!r)return;let u=g.toLowerCase();u.charAt(0)==="~"&&(u=u.substring(1),r.__once__=!0);let M=s;if(u.indexOf("zr:")===0&&(M=s.getZr(),u=u.substring(3)),r.__once__){delete r.__once__;const Y=r;r=(...k)=>{Y(...k),M.off(u,r)}}M.on(u,r)});function v(){s&&!s.isDisposed()&&s.resize()}function R(){const g=i||m.value;g&&s.setOption(g,h.value)}c.value?te(()=>{v(),R()}):R()}function B(i,s){e.manualUpdate&&(a.value=i),t.value?t.value.setOption(i,s||{}):b(i)}function U(){t.value&&(t.value.dispose(),t.value=void 0)}let T=null;A(I,i=>{typeof T=="function"&&(T(),T=null),i||(T=A(()=>e.option,(s,v)=>{s&&(t.value?t.value.setOption(s,{notMerge:s!==v,...h.value}):b())},{deep:!0}))},{immediate:!0}),A([f,p],()=>{U(),b()},{deep:!0}),H(()=>{e.group&&t.value&&(t.value.group=e.group)});const K=se(t);return re(t,P,x),ie(t,c,n),J(()=>{b()}),Q(()=>{de&&n.value?n.value.__dispose=U:U()}),{chart:t,root:n,setOption:B,nonEventAttrs:z,nativeListeners:j,...K}},render(){const e={...this.nonEventAttrs,...this.nativeListeners};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",q($,e)}});export{me as E,pe as T};