ZaiZai hai 1 ano
pai
achega
ef3b406ece
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/components/echarts/echarts.vue

+ 2 - 4
src/components/echarts/echarts.vue

@@ -22,12 +22,10 @@ defineOptions({
 //初始变量
 let chart = null
 const echart = ref(null)
-const options = ref(getObjValue(props.option))
 
 //深度监听
-watch(() => [
-    props.option,
-], ([option]) => {
+const options = ref(getObjValue(props.option))
+watch(() => props.option, (option) => {
     options.value = getObjValue(option)
     setOptions(options.value)
 }, { deep: true })