mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[Improvement] Support local font file (#408)
This commit is contained in:
8
packages/vant-css/scripts/icon-local-template.js
Normal file
8
packages/vant-css/scripts/icon-local-template.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = (fontName, hash) => {
|
||||
return `@font-face {
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-family: '${fontName}';
|
||||
src: url('./${fontName}-${hash}.ttf') format('truetype');
|
||||
}`;
|
||||
};
|
Reference in New Issue
Block a user