...
|
...
|
@@ -3,7 +3,7 @@ |
|
|
<AuthComponent :auth="isAuth" class="click-wrap" @click="onClick"></AuthComponent>
|
|
|
<i class="iconfont" :class="iconClass" :style="iconStyle"></i>
|
|
|
<p v-if="viewText" class="icon-btn-text" :style="textStyle">
|
|
|
<span class="view-text">{{Number(viewText) ? viewText : ''}}</span>
|
|
|
<span class="view-text">{{Number(viewText) > 0 ? viewText : ''}}</span>
|
|
|
<span class="placeholder-text">{{placText}}</span>
|
|
|
</p>
|
|
|
</div>
|
...
|
...
|
@@ -78,7 +78,6 @@ export default { |
|
|
return {
|
|
|
currentClass: {},
|
|
|
viewOption: {},
|
|
|
actionClass: '',
|
|
|
editText: null
|
|
|
};
|
|
|
},
|
...
|
...
|
@@ -118,10 +117,6 @@ export default { |
|
|
return `color: ${this.viewOption.selected ? (this.viewOption.selectedColor || color) : color};`;
|
|
|
},
|
|
|
iconClass() {
|
|
|
if (this.actionClass) {
|
|
|
return this.actionClass;
|
|
|
}
|
|
|
|
|
|
return this.viewOption.selected ? this.currentClass.selected : this.currentClass.default;
|
|
|
},
|
|
|
iconStyle() {
|
...
|
...
|
@@ -164,10 +159,6 @@ export default { |
|
|
this.setCurrentClass();
|
|
|
},
|
|
|
option(val, oldVal) {
|
|
|
if (oldVal.selected !== val.selected) {
|
|
|
this.actionClass = '';
|
|
|
}
|
|
|
|
|
|
if (oldVal.iconBold !== val.iconBold) {
|
|
|
this.setCurrentClass();
|
|
|
}
|
...
|
...
|
@@ -219,8 +210,6 @@ export default { |
|
|
this.editText = Number(this.viewText) + (this.viewOption.selected ? 1 : -1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.actionClass = this.viewOption.selected ? this.currentClass.selected : this.currentClass.default;
|
|
|
},
|
|
|
syncService(type, data) {
|
|
|
if (typeof this[type] === 'function') {
|
...
|
...
|
|