Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

fix: ts type error #218

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/vbenComponents/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import type { App, Component } from 'vue'
const projectName = 'Vben3'
export const components = {
install: (app: App) => {
// @ts-ignore
// const comp = import.meta.globEager('./**/*.vue')
/* 上面写法vite官方已弃用,详情见 https://cn.vitejs.dev/guide/migration-from-v2.html#importmetaglob */
const comp = import.meta.glob('./**/*.vue', {eager: true})
const comp = import.meta.glob<any>('./**/*.vue', { eager: true })
Object.keys(comp).forEach((k) => {
const c = comp[k].default
switch (c.__name) {
Expand All @@ -25,7 +24,6 @@ export const components = {
c.__GRID_ITEM__ = true
break
}
// console.log(c)
// 检测未注册组件
if (!maps.get(c.__name) && !c.name) {
warn(c.__name)
Expand Down