Skip to content

Conversation

@clh021
Copy link
Contributor

@clh021 clh021 commented Oct 9, 2024

修复插件目录下 svg 文件像 项目目录下的 svg 一样直接作为组件使用

插件目录下的 svg 文件会自动带插件名(目录名)前缀(防止不同插件目录下同 svg 文件名冲突问题)。

具体使用方法如下:

  1. 在插件目录中任意目录结构下 存放 svg 文件。参考如下目录结构:
$ pwd
~/Projects/gin-vue-admin/web/src/plugin
$ tree email
email
├── api
│   └── email.js
├── assets
│   └── icons
│       └── ali
│           ├── c-coin-fill.svg
│           └── c-dataserver.svg
└── view
    └── index.vue
  1. 在开发模式下,浏览器 DevTool 控制台 console 中会列举出 所有扫描到可使用的 svg 组件使用代码。
    image

  2. 将 svg 组件代码复制后,直接在需要的地方即可在对应页面看到图表显示。如下代码所示:

一般推荐插件的 svg 仅在该插件内使用,以保持良好的代码和资源组织方式

diff --git a/web/src/plugin/email/view/index.vue b/web/src/plugin/email/view/index.vue
index 11d57e44..4b25ab58 100644
--- a/web/src/plugin/email/view/index.vue
+++ b/web/src/plugin/email/view/index.vue
@@ -1,6 +1,10 @@
 <template>
   <div>
     <warning-bar title="需要提前配置email配置文件,为防止不必要的垃圾邮件,在线体验功能不开放此功能体验。" />
+
+    <email-c-coin-fill class="w-7 h-7"/>
+    <email-c-dataserver />
+
     <div class="gva-form-box">
       <el-form
         ref="emailForm"
  1. 查看效果图
    image

@pixelmaxQm pixelmaxQm merged commit 6e38eb1 into flipped-aurora:main Oct 9, 2024
8 checks passed
pixelmaxQm added a commit that referenced this pull request Oct 9, 2024
* Beta:发布v2.7.5测试版本 (#1896)

* 生产环境时移除console

* 更新第三方库道最新版本,修正导致的兼容问题

* feat: 版本号变更,修复自动化历史的结构体描述

* feat: 放弃element的按需引用,增加自定义表单组件,替换原始的iframe引入模式。

* feat: 放开表单生成器的key输入

* feat: 自动化代码关联属性支持跨数据库关联

* fixed: 修复跨库关联模板

* feat: 允许清空跨数据关联的业务库选项

* feat: 增加用户搜索功能

* feat: 允许单条API同步
---------

Co-authored-by: task <121913992@qq.com>
Co-authored-by: task <ms.yangdan@gmail.com>

* feat: 更新逻辑内容至2.7.5版本,等待同步

* feat: update go.sum

* fixed: 修复暗夜模式失效的bug

* feat: 配置保存按钮移动到顶部

* fix: support pluginPath svg file as component show list when dev mode (#1902)

* feat: i18n 前端增加繁体中文

* feat: i18n 后端增加繁体

* feat: i18n 前端增加繁体中文

* feat: i18n 细节调整 发布正式i18n版本

---------

Co-authored-by: task <121913992@qq.com>
Co-authored-by: task <ms.yangdan@gmail.com>
Co-authored-by: piexlMax(奇淼 <qimiaojiangjizhao@gmail.com>
Co-authored-by: chenlianghong <clh021@gmail.com>
Co-authored-by: krank <emosick@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants