"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./echarts.js"),o={__name:"index",props:{option:{type:Object,default:()=>({})}},setup(n){const a=n,r=e.ref(),t=e.reactive({defaultOption:{title:{text:"ECharts 入门示例"},tooltip:{},xAxis:{data:["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]},yAxis:{},series:[{name:"销量",type:"bar",data:[5,20,36,10,10,20]}]},finallyOption:e.computed(()=>({...t.defaultOption,...a.option})),myChart:null,renderChart:()=>{t.myChart&&t.myChart.setOption(t.finallyOption)}});return e.watch(()=>t.finallyOption,()=>{t.renderChart()},{deep:!0}),e.onMounted(()=>{t.myChart=i.init(r.value),t.renderChart()}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"divRef",ref:r,style:{height:"100%"}},null,512))}};exports.default=o;
