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