Skip to content

Commit 0915ca5

Browse files
author
Taois
committed
fix:修复首页图标错误
1 parent f999585 commit 0915ca5

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

dashboard/src/assets/icon_font/demo_index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co
264264
<pre><code class="language-css"
265265
>@font-face {
266266
font-family: 'iconfont';
267-
src: url('iconfont.woff2?t=1759684524679') format('woff2'),
268-
url('iconfont.woff?t=1759684524679') format('woff'),
269-
url('iconfont.ttf?t=1759684524679') format('truetype');
267+
src: url('iconfont.woff2?t=1759693018509') format('woff2'),
268+
url('iconfont.woff?t=1759693018509') format('woff'),
269+
url('iconfont.ttf?t=1759693018509') format('truetype');
270270
}
271271
</code></pre>
272272
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>

dashboard/src/assets/icon_font/iconfont.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@font-face {
22
font-family: "iconfont"; /* Project id 5032989 */
3-
src: url('iconfont.woff2?t=1759684524679') format('woff2'),
4-
url('iconfont.woff?t=1759684524679') format('woff'),
5-
url('iconfont.ttf?t=1759684524679') format('truetype');
3+
src: url('iconfont.woff2?t=1759693018509') format('woff2'),
4+
url('iconfont.woff?t=1759693018509') format('woff'),
5+
url('iconfont.ttf?t=1759693018509') format('truetype');
66
}
77

88
.iconfont {

dashboard/src/assets/icon_font/iconfont.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-700 Bytes
Binary file not shown.
-400 Bytes
Binary file not shown.
-324 Bytes
Binary file not shown.

dashboard/src/components/Layout.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
>
4242
<a-menu-item :key="item.id">
4343
<!-- <IconHome></IconHome>-->
44-
<icon-font :type="item.icon" :size="16"/>
44+
<svg style="width: 16px; height: 16px; margin-right: 8px;">
45+
<use :href="`#${item.icon}`"></use>
46+
</svg>
4547
{{ item.name }}
4648
</a-menu-item>
4749
</router-link>
@@ -80,11 +82,9 @@ import {
8082
} from '@arco-design/web-vue/es/icon';
8183
import Header from './Header.vue'; // 引入头部组件
8284
import Footer from './Footer.vue'; // 引入底部组件
83-
import { Icon } from '@arco-design/web-vue';
8485
import { usePaginationStore } from '@/stores/paginationStore';
8586
import logo from '@/assets/logo.png';
86-
87-
const IconFont = Icon.addFromIconFontCn({src: '//at.alicdn.com/t/c/font_5032989_8fdfro7017b.js'});
87+
import '@/assets/icon_font/iconfont.js';
8888
8989
export default defineComponent({
9090
components: {
@@ -94,7 +94,6 @@ export default defineComponent({
9494
IconCalendar,
9595
Header,
9696
Footer,
97-
IconFont,
9897
},
9998
setup() {
10099
const route = useRoute();

0 commit comments

Comments
 (0)