Skip to content

Commit

Permalink
fix: support pluginPath svg file as component show list when dev mode (
Browse files Browse the repository at this point in the history
  • Loading branch information
clh021 authored Oct 9, 2024
1 parent 5d227d8 commit 6e38eb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/src/core/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ const registerIcons = async(app) => {
continue
}
const key = `${pluginName}${iconName}`
const iconComponent = createIconComponent(iconName)
// 开发模式下列出所有 svg 图标,方便开发者直接查找复制使用
import.meta.env.MODE == 'development' && console.log(`svg-icon-component: <${key} />`)
const iconComponent = createIconComponent(key)
config.logs.push({
'key': key,
'label': iconName,
'label': key,
})
app.component(key, iconComponent)
}
Expand Down
1 change: 1 addition & 0 deletions web/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default ({
}),
vuePlugin(),
svgBuilder('./src/assets/icons/'),
svgBuilder('./src/plugin/'),
[Banner(`\n Build based on gin-vue-admin \n Time : ${timestamp}`)],
VueFilePathPlugin("./src/pathInfo.json")
],
Expand Down

0 comments on commit 6e38eb1

Please sign in to comment.