请问如何调用类似showLoading这种方法? #821
-
提前确认
新功能详情vue小白;README中我看有一些方法(showLoading/hideLoading),请问如何调用? |
Beta Was this translation helpful? Give feedback.
Answered by
kingyue737
Dec 18, 2024
Replies: 1 comment
-
通过模板引用获得组件实例来调用组件实例上的方法。举个例子: <script setup>
const chartRef = useTemplateRef('chart')
onMounted(() => {
chartRef.value.showLoading()
})
</script>
<template>
<VChart ref="chart" />
</template> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Justineo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
通过模板引用获得组件实例来调用组件实例上的方法。举个例子: