|
@@ -4,13 +4,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, ref, watch,onMounted,PropType } from 'vue';
|
|
|
+import { defineComponent, ref, watch, onMounted, PropType } from 'vue';
|
|
|
import Highcharts from 'highcharts/highstock';
|
|
|
-import HighchartszhCN from '@/utils/highcahrts-zh_CN';
|
|
|
+import HighchartszhCN from '@/utils/highcahrts-zh_CN';
|
|
|
import { defaultOpts } from '@/utils/chartOptions';
|
|
|
import { IChart } from '@/types';
|
|
|
|
|
|
-HighchartszhCN(Highcharts)
|
|
|
+HighchartszhCN(Highcharts);
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: '',
|
|
@@ -25,7 +25,6 @@ export default defineComponent({
|
|
|
},
|
|
|
},
|
|
|
setup(props) {
|
|
|
-
|
|
|
const chart = ref({});
|
|
|
|
|
|
/* 设置options */
|
|
@@ -37,14 +36,14 @@ export default defineComponent({
|
|
|
|
|
|
onMounted((): void => {
|
|
|
init();
|
|
|
- })
|
|
|
+ });
|
|
|
|
|
|
watch(
|
|
|
() => props.options,
|
|
|
(newval) => {
|
|
|
- console.log('reload')
|
|
|
+ console.log('reload');
|
|
|
init();
|
|
|
- },
|
|
|
+ }
|
|
|
// {
|
|
|
// immediate: true
|
|
|
// }
|