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 1 commit
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
2 changes: 1 addition & 1 deletion packages/vbenComponents/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const components = {
/* 上面写法vite官方已弃用,详情见 https://cn.vitejs.dev/guide/migration-from-v2.html#importmetaglob */
const comp = import.meta.glob('./**/*.vue', {eager: true})
Copy link
Collaborator

@likui628 likui628 Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const comp = import.meta.glob<any>('./**/*.vue', {eager: true})
这是最简单的方式,我也不确定这里给什么类型合适。
不过这里不太重要。

Object.keys(comp).forEach((k) => {
const c = comp[k].default
const c = (comp[k] as Record<string, any>)['default'];
switch (c.__name) {
case 'TabPane':
c.__TAB_PANE__ = true
Expand Down