Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 04d7b1c

Browse files
committedMay 12, 2024
Merge branch 'demo'
2 parents ac16ef4 + 593dbc7 commit 04d7b1c

File tree

7 files changed

+44
-12
lines changed

7 files changed

+44
-12
lines changed
 

‎.eslintrc-auto-import.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,12 @@
8282
"useAttrs": true,
8383
"useCssModule": true,
8484
"useCssVars": true,
85+
"useNavbarWeixin": true,
8586
"useSlots": true,
87+
"useUpload": true,
8688
"watch": true,
8789
"watchEffect": true,
8890
"watchPostEffect": true,
89-
"watchSyncEffect": true,
90-
"useNavbarWeixin": true,
91-
"useRequest": true,
92-
"useUpload": true
91+
"watchSyncEffect": true
9392
}
9493
}

‎.stylelintrc.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ module.exports = {
5050
'comment-no-empty': null,
5151
'scss/comment-no-empty': null,
5252
'no-duplicate-selectors': null,
53+
'font-family-no-missing-generic-family-keyword': null,
5354
},
5455
}

‎index.html

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
<body>
2323
<div id="app"><!--app-html--></div>
24-
<script src="//at.alicdn.com/t/c/font_2757218_qx1mg9jed7i.js"></script>
2524
<script type="module" src="/src/main.ts"></script>
2625
</body>
2726
</html>

‎src/pages/demo/base/iconfont.vue

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
</route>
99

1010
<template>
11-
<view class="">
12-
iconfont
13-
<svg class="icon" aria-hidden="true">
14-
<!-- 如果修改了icon-前缀请相应替换,如我的 bap-icon- -->
15-
<use xlink:href="#bap-icon-guanbi"></use>
16-
</svg>
11+
<view class="m-4">
12+
<text mr-2>iconfont:</text>
13+
<i class="iconfont icon-package text-primary"></i>
14+
<i class="iconfont icon-chat text-primary"></i>
15+
<i class="iconfont icon-my text-primary"></i>
1716
</view>
1817
</template>
1918

‎src/style/iconfont.css

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4543091 */
2+
@font-face {
3+
font-family: iconfont; /* Project id 4543091 */
4+
src:
5+
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOwAAsAAAAAB9AAAANjAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDHAqDBIJqATYCJAMQCwoABCAFhGcHPRvnBsgusG3kMyE15/44PsBX09waBHv0REDt97oHAQDFrOIyPirRiULQ+TJcXV0hCYTuVFcBC915/2vX/32Q80hkZ5PZGZ9snvwruVLloidKqYN6iKC53bOtbKwVLSIi3W6zCWZbs3VbER3j9JpGX3ySYcc94IQRTK5s4epS/jSqIgvg37qlY2/jwQN7D9ADpfRCmIknQByTscVZPTBr+hnnCKg2o4bjakvXEPjuY65DJGeJNtBUhn1JxOBuB2UZmUpBOXdsFp4oxOv4GHgs3h/+wRDcicqSZJG1q9kK1z/Af9NpqxjpC2QaAdpHlCFh4spcYXs5sMWpSk5wUj31G2dLQKVKkZ/w7f/8/i/A3JVUSZK9f7xIKJeU14IFpBI/Qfkkz46GT/CuaGREfCtKJUougWeQWHvVC5Lcz2BGS+SePR99vj3yjJx7h574tp7uWcOh4yfaTjS/245TT/vkQrN+a7RLkK8+Vd+bz+FSGh+9srDQKPeJ2s29z7ah4+efdoxefRbbGwfy7ht+SuIWukzsu1b6ePP+6kN1aamb47qsPim1Ia3xdEpDcl1dckPKGYnneI23+57r2W1Mmkqs6ajrChRCs5qyQ66rTVWhgZaG7toOeHm5cxn0sSQuNDEgcUTdNTSupKI1JRZih/JssAUKezPeOJJzbNozF6zWJuuVavVU5Tgtkop/SDzHa7ytvnCTq0PhkEfi4xLLtb0PuwyOAYqmrYQApFJyoJjTnfz+ve94vvv2f/yWgxl8Jd8Di2DRDPuob59mU/+VfDCROQyR8xSnmP9fXm7liagmN39OlmbvjqG0sMsJKrU0EFXogaRSH5bNY1CmxhyUq7QC1cY1T67RwuQk5CoM2RUQNLoEUb03kDS6h2XzcyjT7iOUa/QXqq1Hn6/GUBAaGcGcWJFlGUmCoVOp8kLvABHnVczGYiOE2SVEUH5OXj/TSnTCDjHAviAWcE4RZYaGWszNiKoayGSGTASeY+PcrMjNpVMvyREMDRoxBMYRVojFMkQiMOhohubdzxtAiOapMMbERpKMnQT9SL4ceQysVdJZVa9kEbsFogIcRyEUE2kN0mL7CDVIGhBzupWMEHA5bDvipgq5hKJcKef8ivbx1kC15KgcYkghhzLxYNntxoKCReJ82jAHAAA=')
6+
format('woff2'),
7+
url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.woff?t=1715485842402') format('woff'),
8+
url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.ttf?t=1715485842402') format('truetype');
9+
}
10+
11+
.iconfont {
12+
font-family: iconfont !important;
13+
font-size: 16px;
14+
font-style: normal;
15+
-webkit-font-smoothing: antialiased;
16+
-moz-osx-font-smoothing: grayscale;
17+
}
18+
19+
.icon-my::before {
20+
content: '\e78c';
21+
}
22+
23+
.icon-package::before {
24+
content: '\e9c2';
25+
}
26+
27+
.icon-chat::before {
28+
content: '\e600';
29+
}

‎src/style/index.scss

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import './iconfont.css';
2+
13
.test {
24
// 可以通过 @apply 多个样式封装整体样式
35
@apply mt-4 ml-4;

‎uno.config.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export default defineConfig({
5959
* 自定义快捷语句
6060
* @see https://github.com/unocss/unocss#shortcuts
6161
*/
62-
shortcuts: [['center', 'flex justify-center items-center']],
62+
shortcuts: [
63+
['center', 'flex justify-center items-center'],
64+
['text-primary', 'text-yellow'],
65+
],
6366
transformers: [
6467
...transformers,
6568
// 启用 @apply 功能

0 commit comments

Comments
 (0)
Please sign in to comment.