cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
2 lines (1 loc) • 795 B
JavaScript
;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=require("vue"),t=require("./echarts.js");const r=e.defineComponent({name:"CoUserDefinedCollection",components:{UserEcharts:t.default},props:{type:{type:String},code:{type:String}},setup(t){const r=e.ref(),o=e.ref(!0);e.watch((()=>[t.type,t.code]),(()=>{s()}));const s=()=>{t.type&&t.code&&(o.value=!0,e.nextTick((()=>{o.value=!1})))};return e.onMounted((()=>{s()})),{dom:r,refresh:o,...e.toRefs(t),RESET_VIEW:()=>{r.value&&"echarts"===t.type&&r.value.RESET_VIEW()}}},render(){return e.h("div",{class:"co-user-defined-collection",style:{width:"100%",height:"100%"}},[(()=>this.type&&this.code&&!this.refresh?e.h(t.default,{ref:"dom",code:this.code}):null)()])}});exports.default=r;