wente
2023-11-27 390971e4ef1ae90722baf984fcc4fe67a74438b6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<template>
  <div :style="{'width':width,'height':height,cursor:'parent'}" v-chart="chartData"
       :data-chartType="type"
       :data-chartKey="key">
  </div>
</template>
 
<script>
  export default {
    props: {
      chartData: {
        type: Object,
        default: () => {
          return {}
        }
      },
      type: {
        type: String,
        default: `canvas`
      },
      width: {
        type: String,
        default: `100%`
      },
      height: {
        type: String,
        default: `100%`
      }
    },
    data() {
      return {
        key: `eChart${Math.random().toString(36)}`
      }
    }
  }
</script>