12345678910111213141516171819202122232425262728 |
- <script setup>
- import { watch,ref,nextTick } from 'vue'
- import Highcharts from 'highcharts';
- const props = defineProps({
- id: {
- type: String
- },
- options: {
- type: Object
- }
- })
- const chart = ref(null)
- function initChart() {
- console.log('initchart')
- nextTick(() => {
- chart.value = Highcharts.chart(props.id,props.options)
- })
- }
- initChart()
- </script>
- <template>
- <div :id="id" class="chart-wrapper"></div>
- </template>
- <style scoped lang="scss">
- </style>
|