ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.11k stars 14.64k forks source link

[bug report] font file element- icons.woff Slows the first load speed of the page #19851

Open fuwenbin opened 4 years ago

fuwenbin commented 4 years ago

Element UI version

2.13.2

OS/Browsers version

chrome

Vue version

3.0.0-beta.21

Reproduction Link

https://codepen.io/pen (请忽略)

Steps to reproduce

在element-ui/lib/theme-chalk/index.css的@font-face中引入的"fonts/element-icons.woff"会在浏览器首次加载页面时异步获取该文件,从而影响拖慢页面的加载速度。

What is Expected?

建议使用类似iconfont的方式,在@font-face配置下提供woff2的方式,如:url('data:application/x-font-woff2; ......') format('woff')

What is actually happening?

没有提供woff2格式字体。

element-bot commented 4 years ago

Translation of this issue:

Element UI version

2.13.2

OS/Browsers version

chrome

Vue version

3.0.0-beta.21

Reproduction Link

https://codepen.io/pen (please ignore)

Steps to reproduce

In element UI / lib / theme chalk/ index.css "Fonts / element" introduced in @ font face of- icons.woff "The file is retrieved asynchronously when the browser first loads the page, which affects the loading speed of the delayed page.

What is Expected?

It is recommended to use iconfont like method to provide woff2 in @ font face configuration, such as URL (' data:application/x-font-woff2; ......') format('woff')

What is actually happening?

No woff2 font is provided.

fuwenbin commented 4 years ago

url('data:application/x-font-woff2; ......') format('woff2')

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.