From 8922d74ab87c43ed8048cef9a75db4a9591bac30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E6=83=A0?= Date: Fri, 26 Feb 2021 17:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3resolveComponent=E6=9C=AA?= =?UTF-8?q?=E6=89=BE=E5=88=B0=E8=BF=94=E5=9B=9E=E7=9A=84=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `resolveComponent(component)`未找到返回的应该是传入的参数`component`而非`undefined`。 源码: https://github.com/vuejs/vue-next/blob/82bf7ebf36833679f13039e5b0282eff2859e18f/packages/runtime-core/src/helpers/resolveAssets.ts#L20 --- src/api/global-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/global-api.md b/src/api/global-api.md index 5c1a5f066..76f8cf87d 100644 --- a/src/api/global-api.md +++ b/src/api/global-api.md @@ -227,7 +227,7 @@ const AsyncComp = defineAsyncComponent({ 如果在当前应用实例中可用,则允许按名称解析 `component`。 -返回一个 `Component`。如果没有找到,则返回 `undefined`。 +返回一个 `Component`。如果没有找到,则返回接收的参数 `name`。 ```js const app = Vue.createApp({})