Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
nemo-shen committed Jan 6, 2024
1 parent e40e0d2 commit 91a6da1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export {}

declare module 'vue' {
export interface GlobalComponents {
Console: typeof import('./src/components/Console.vue')['default']
Header: typeof import('./src/components/Header.vue')['default']
Message: typeof import('./src/components/Message.vue')['default']
VanIcon: typeof import('vant/es')['Icon']
VersionSelect: typeof import('./src/components/VersionSelect.vue')['default']
Console: (typeof import('./src/components/Console.vue'))['default'];
Header: (typeof import('./src/components/Header.vue'))['default'];
Message: (typeof import('./src/components/Message.vue'))['default'];
VanIcon: (typeof import('vant/es'))['Icon'];
VersionSelect: (typeof import('./src/components/VersionSelect.vue'))['default'];
}
}
8 changes: 4 additions & 4 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ export class VantReplStore extends ReplStore {
this.vueVersion = version;
}
getVueVersion() {
const json = this.getImportMap()
console.log(json.imports.vue)
const json = this.getImportMap();
console.log(json.imports.vue);
// TODO: @vue/repl 初始化阶段就应该提供 getVueVersion,初始化时的 this.vueVersion 是无效的
// ! 这种写法后续应该通过获取 this.vueVersion 替代
const reg = new RegExp(`.*${deps.vue.pkg}|${deps.vue.path}|@`, 'g')
const version = json.imports.vue.replace(reg, '')
const reg = new RegExp(`.*${deps.vue.pkg}|${deps.vue.path}|@`, 'g');
const version = json.imports.vue.replace(reg, '');
return version || '';
}
}
Expand Down

0 comments on commit 91a6da1

Please sign in to comment.