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

Commit

Permalink
fix: ts type error (#218)
Browse files Browse the repository at this point in the history
* fix: ts type error

* chore: update glob type

---------

Co-authored-by: likui628 <[email protected]>
  • Loading branch information
pzzyf and likui628 authored Oct 27, 2023
1 parent 9c990e3 commit ee0bd36
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit ee0bd36

Please sign in to comment.