Sfoglia il codice sorgente

!4 兼容vue@3.2.1
* fix:兼容vue@3.2.1

rza 3 anni fa
parent
commit
7282b8d86f

File diff suppressed because it is too large
+ 0 - 13184
package-lock.json


+ 2 - 4
src/components/echart/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, onMounted, ref, watch, onBeforeUnmount, useContext } from 'vue'
+import { defineComponent, onMounted, ref, watch, onBeforeUnmount } from 'vue'
 import '@/common/echart/map/fujian.js'
 import theme from '@/common/echart/style/theme.js' // 引入默认主题
 import * as echarts from 'echarts'
@@ -32,11 +32,9 @@ const PropsType = {
 export default defineComponent({
   name: 'Echarts',
   props: PropsType,
-  setup(props) {
+  setup(props,{expose}) {
     const chartRef = ref<HTMLElement>()
     const chart = ref<any>()
-    // 暴露接口
-    const { expose } = useContext();
     
     /**
      * 初始化echart

+ 1 - 1
src/views/center/chart/draw.tsx

@@ -27,7 +27,7 @@ export default defineComponent({
   props: PropsType,
   setup(props) {
     // 配置项
-    let options = shallowReactive({})
+    let options = shallowReactive({title:null,series:null})
 
     watch(
       () => props.tips,

+ 1 - 1
src/views/centerLeft1/chart/draw.tsx

@@ -13,7 +13,7 @@ export default defineComponent({
   props: PropsType,
   setup(props) {
     // 配置项
-    let options = shallowReactive({})
+    let options = shallowReactive({color:null,tooltip:null,toolbox:null,calculable:null,legend:null,series:null})
 
     watch(
       () => props.cdata,

+ 1 - 1
src/views/centerLeft2/chart/draw.tsx

@@ -13,7 +13,7 @@ export default defineComponent({
   props: PropsType,
   setup(props) {
     // 配置项
-    let options = shallowReactive({})
+    let options = shallowReactive({showLegendSymbol:null,tooltip:null,geo:null,series:null})
     // 设置点的位置(经纬度)
     const geoCoordMap = {
       厦门市: [118.11022, 24.490474, 20],

+ 1 - 1
src/views/centerRight1/chart/draw.tsx

@@ -20,7 +20,7 @@ export default defineComponent({
       }
     };
     // 配置项
-    let options = shallowReactive({})
+    let options = shallowReactive({radar:null,series:null})
 
     watch(
       () => props.cdata,

File diff suppressed because it is too large
+ 0 - 9123
yarn.lock