| | |
| | | <template> |
| | | <div ref="barChart" style="width: 100%; height: 100%;"></div> |
| | | <div ref="barChart" style="width: 100%; height: 100%" class="Bar"></div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data () { |
| | | return { |
| | | |
| | | } |
| | | data() { |
| | | return {}; |
| | | }, |
| | | props: { |
| | | options:{ |
| | | options: { |
| | | type: Object, |
| | | } |
| | | }, |
| | | }, |
| | | mounted(){ |
| | | mounted() { |
| | | this.initBar(); |
| | | }, |
| | | methods: { |
| | | initBar(){ |
| | | this.$nextTick(()=>{ |
| | | let dom = this.$echarts.init(this.$refs['barChart']); |
| | | initBar() { |
| | | this.$nextTick(() => { |
| | | let dom = this.$echarts.init(this.$refs["barChart"]); |
| | | dom.setOption(this.options); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style > |