JavaScript/vue.js/getCurrentInstance:修订间差异
来自康健生活
创建页面,内容为“== 标题文本 == == 获取全局注册组件 == <syntaxhighlight lang="jsx"> <template> <EchartsLinePanel v-if="options" :layerOptions="options" @update:layerOptions="handleUpdateOptions" /> </template> <script lang="ts" setup> import { defineAsyncComponent, getCurrentInstance, type ComponentInternalInstance } from 'vue' const { appContext } = <ComponentInternalInstance>getCurrentInstance() const EchartsLinePanel = defineAsyncComponent({…” |
|||
| 第1行: | 第1行: | ||
== 标题文本 == | == 标题文本 == | ||
== 获取全局注册组件 == | == 获取全局注册组件 == | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="html"> | ||
<template> | <template> | ||
<EchartsLinePanel | <EchartsLinePanel | ||