Skip to content

Commit

Permalink
feat: 添加plugin注册方法
Browse files Browse the repository at this point in the history
  • Loading branch information
kanyxmo committed Jun 6, 2024
1 parent e1ac365 commit 8d1fc80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/plugin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
install: (Vue) => {
const pluginList = import.meta.glob('./*/main.js')
Object.keys(pluginList).forEach((path) => {
pluginList[path]().then(plugin => Vue.use(plugin.default || plugin))
})
}
}

0 comments on commit 8d1fc80

Please sign in to comment.