Browse Source

修改彩色图标

xiaohaizhao 3 weeks ago
parent
commit
e8df73f5d5

+ 7 - 1
components/Yl_Tabbar/index.js

@@ -27,10 +27,16 @@ Component({
     },
     observers: {
         'list': function (numberA, numberB) {
+            numberA = numberA.map(v => {
+                v.classnames = (v.icon.split("-")[0] == 'color' ? 't-icon ' : 'iconfont ') + v.icon
+                console.log(v.classnames)
+                return v
+            })
             if (numberA.length >= 5) {
                 let showList = numberA.splice(0, 3);
                 showList.push({
-                    icon: "icon-gengduo",
+                    classnames: "t-icon color-gengduo",
+                    icon: "color-gengduo",
                     label: "更多"
                 })
                 this.setData({

+ 1 - 1
components/Yl_Tabbar/index.wxml

@@ -1,7 +1,7 @@
 <view class="tabbar" style="padding-bottom: {{safeAreaBot}}rpx;">
     <navigator url="#" class="tabbar-item" wx:for="{{showList}}" wx:key="index" data-item="{{item}}" bindtap="callback">
         <view class="icon" wx:if="{{item.icon}}">
-            <text class="iconfont {{item.icon}}" />
+            <text class="{{item.classnames}}" />
         </view>
         <view wx:else class="num line-1">{{item.num}}</view>
         <view class="label line-1">{{language[item.label]||item.label}}</view>

+ 1 - 0
static/font-icon.wxss

@@ -1,4 +1,5 @@
 @import "/utils/work/work-icon.wxss";
+@import "./iconfont-weapp-icon.wxss";
 @import "./stylesheet.wxss";
 
 .iconfont {

File diff suppressed because it is too large
+ 11 - 0
static/iconfont-weapp-icon.wxss


Some files were not shown because too many files changed in this diff