Skip to content

Commit

Permalink
feat: 不使用iconfont来引入图标,改为svgIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
贾志伟 committed Mar 24, 2024
1 parent 02211b6 commit 5a05114
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 68 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jiazhiwei/dev-server-web",
"version": "0.1.6",
"version": "0.1.7",
"files": [
"dist"
],
Expand Down
27 changes: 0 additions & 27 deletions public/iconfont.css

This file was deleted.

1 change: 0 additions & 1 deletion public/iconfont.js

This file was deleted.

30 changes: 0 additions & 30 deletions public/iconfont.json

This file was deleted.

Binary file removed public/iconfont.ttf
Binary file not shown.
Binary file removed public/iconfont.woff
Binary file not shown.
Binary file removed public/iconfont.woff2
Binary file not shown.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const locale = lang.toLocaleLowerCase().includes('zh') ? zhCn : en
:key="item.name"
@click="handleMenuItemClick(item)"
>
<span :class="`iconfont text-4xl ${item.icon}`" />
<SvgIcon class="text-gray-200" :icon-name="item.icon" />
<!-- <span :class="`iconfont text-4xl ${item.icon}`" /> -->
{{ item.name }}
</div>
</div>
Expand Down
Binary file removed src/assets/apiMock.png
Binary file not shown.
Binary file removed src/assets/apiTest.png
Binary file not shown.
Binary file removed src/assets/request.png
Binary file not shown.
1 change: 1 addition & 0 deletions src/assets/svgIcons/mock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/svgIcons/requestApi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 2 additions & 8 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@ export const menuItems: MenuItem[] = [
{
path: '/',
name: '数据模拟',
icon: 'icon-wangyuanjing',
icon: 'mock',
component: () => import('@/views/HomeView.vue'),
},
{
path: '/request',
name: '接口请求',
icon: 'icon-huiduceshi',
icon: 'requestApi',
component: () => import('@/views/ApiRequest.vue'),
},
{
path: '/apiTest',
name: '接口测试',
icon: 'icon-a-5',
component: () => import('@/views/ApiTest.vue'),
}
];

// 处理请求的方式
Expand Down

0 comments on commit 5a05114

Please sign in to comment.