Skip to content

请问如何调用类似showLoading这种方法? #817

Closed

Description

@ybtsdst

提前确认

  • 我可以确认这个新功能建议是提交给此 Vue 组件的,而不应该提交到 ECharts 项目本身。

新功能详情

vue小白;README中我看有一些方法(showLoading/hideLoading),请问如何调用?

Activity

  1. kingyue737 commented on Dec 18, 2024

    @kingyue737
    Member

    通过模板引用获得组件实例来调用组件实例上的方法。举个例子:

    <script setup>
    const chartRef = useTemplateRef('chart')
    
    onMounted(() => {
      chartRef.value.showLoading()
    })
    </script>
    
    <template>
      <VChart ref="chart" />
    </template>
  2. locked and limited conversation to collaborators on Dec 18, 2024
  3. converted this issue into a discussion #821 on Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions