From 9c228c53944d7e6d02ac8e4088f32a02a5b15e99 Mon Sep 17 00:00:00 2001 From: yuntian001 Date: Mon, 17 Oct 2022 17:37:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BF=BD=E7=95=A5resolveComponent=20ca?= =?UTF-8?q?n=20only=20be=20used=20in=20render()=20or=20setup().=E7=9A=84?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app.ts b/src/app.ts index b909ebb0..b021330d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -8,5 +8,11 @@ export async function bootscrapt() { app.component('LayoutMenuItem', layoutMenuItem); await Promise.allSettled(mitter.emit(event.START, app)); mitter.emit(event.READY, app); + //忽略resolveComponent can only be used in render() or setup().的警告 + app.config.warnHandler = (msg, instance, trace) => { + if(msg!=='resolveComponent can only be used in render() or setup().'){ + console.warn(`[Vue warn]: ${msg}`,instance,trace) + } + } app.mount('#app'); }