Skip to content

Commit

Permalink
feat: 忽略resolveComponent can only be used in render() or setup().的警告
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Oct 17, 2022
1 parent 717e71e commit 9c228c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit 9c228c5

Please sign in to comment.