|
|
@@ -1,7 +1,11 @@
|
|
|
Component({
|
|
|
properties: {
|
|
|
- list: {type:Array},
|
|
|
- callback: {type:Function}
|
|
|
+ list: {
|
|
|
+ type: Array
|
|
|
+ },
|
|
|
+ callback: {
|
|
|
+ type: Function
|
|
|
+ }
|
|
|
},
|
|
|
data: {
|
|
|
safeAreaBot: 0,
|
|
|
@@ -23,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({
|