diff --git a/web/src/core/global.js b/web/src/core/global.js index 7a4cfa11e7..2ef1ffef43 100644 --- a/web/src/core/global.js +++ b/web/src/core/global.js @@ -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) } diff --git a/web/vite.config.js b/web/vite.config.js index 70ade333f3..6767844d07 100644 --- a/web/vite.config.js +++ b/web/vite.config.js @@ -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") ],