This commit is contained in:
梁朝伟 2022-05-09 11:39:00 +08:00
parent 028b68e4bf
commit ac49550d98
4 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,3 @@
{
"component": true
}

View File

@ -0,0 +1,25 @@
@font-face {
font-family: "Material Symbols Rounded";
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/sandbox/materialsymbolsrounded/v7/syl0-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvDmUSVOK7BDB_Qb9vUSzq3wzLK-P0J-V_Zs-QtQth3-jOc7TOVpeRL2w5rwZu2rIelXxc.woff2) format("woff2");
}
.material {
display: block;
}
.material-symbols-rounded {
font-family: "Material Symbols Rounded";
font-weight: normal;
font-style: normal;
font-size: 44rpx;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
}

View File

@ -0,0 +1,21 @@
Component({
properties: {
name: String,
color: {
type: String,
value: '#3963bc'
},
size: {
type: String,
value: '44'
},
},
ready: function () {
if (!this.properties.name) {
console.error('请传入Icon组件的name属性');
}
},
methods: {
}
});

View File

@ -0,0 +1,3 @@
<span class="material-symbols-rounded material" style="{{ size ? 'font-size:'+size+'rpx;':''}}{{ color ? 'color:' + color+';' : '' }}">
{{name}}
</span>