diff --git a/wechatMp/components/UI/g-icon/index.json b/wechatMp/components/UI/g-icon/index.json new file mode 100644 index 000000000..bbde8dc8e --- /dev/null +++ b/wechatMp/components/UI/g-icon/index.json @@ -0,0 +1,3 @@ +{ + "component": true + } \ No newline at end of file diff --git a/wechatMp/components/UI/g-icon/index.less b/wechatMp/components/UI/g-icon/index.less new file mode 100644 index 000000000..a71a00e4e --- /dev/null +++ b/wechatMp/components/UI/g-icon/index.less @@ -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; +} diff --git a/wechatMp/components/UI/g-icon/index.ts b/wechatMp/components/UI/g-icon/index.ts new file mode 100644 index 000000000..cc8906628 --- /dev/null +++ b/wechatMp/components/UI/g-icon/index.ts @@ -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: { + } +}); diff --git a/wechatMp/components/UI/g-icon/index.wxml b/wechatMp/components/UI/g-icon/index.wxml new file mode 100644 index 000000000..171567c74 --- /dev/null +++ b/wechatMp/components/UI/g-icon/index.wxml @@ -0,0 +1,3 @@ + + {{name}} + \ No newline at end of file