gtoucrun commented on issue #14974:
URL: https://github.com/apache/echarts/issues/14974#issuecomment-3542542058

   > > > 应该跟之前一些开发者反馈的问题类似,先改用 `shallowRef` 试试看。
   > > > const chart = shallowRef<any>()
   > > 
   > > 
   > > hi, 如果chart是定义在data中的, 应该怎么赋初始类型?
   > > ```
   > > data() {
   > >     return {
   > >      // chart: shallowRef<any> 不能这样定义类型
   > >       chart: null
   > >     }
   > >   },
   > > methods: {
   > > initChart() {
   > >       this.chart = echarts.init(this.$el, 'macarons')
   > >       ...
   > >       }
   > >      }
   > > ```
   > 
   > import { shallowRef } from "vue";
   > // ...
   > data() {
   >     return {
   >       chart: shallowRef(),
   >     };
   >   },
   > // ...
   
   万分感谢


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to