Parcourir la source

修改小红点显示数字

凉纪 il y a 1 an
Parent
commit
6da100fdf9
2 fichiers modifiés avec 10 ajouts et 5 suppressions
  1. 6 1
      src/components/TabBar.vue
  2. 4 4
      src/views/menu/resumptionEvaluate/index.vue

+ 6 - 1
src/components/TabBar.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <van-tabbar route v-model="active" @change="handleChange">
-      <van-tabbar-item v-for="(item, index) in data" :dot="item.dot" :to="item.to" :icon="item.icon" :key="index">
+      <van-tabbar-item v-for="(item, index) in data" :badge="item.dot || ''" :to="item.to" :icon="item.icon" :key="index">
         {{ item.title }}
       </van-tabbar-item>
     </van-tabbar>
@@ -39,6 +39,11 @@ export default {
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
+<style>
+.van-info{
+  background-color: red;
+}
+</style>
 <style scoped>
 h3 {
   margin: 40px 0 0;

+ 4 - 4
src/views/menu/resumptionEvaluate/index.vue

@@ -83,7 +83,7 @@
             <div class="titleClass">
               <div class="title">{{ item.evaluateName }}</div>
               <div>
-                <van-button type="info" v-if="evaluateTure(item)" size="small" @click="evaluate(item.id)"
+                <van-button type="info" v-if="evaluateTure(item)&&item.isEvaluate" size="small" @click="evaluate(item.id)"
                   >评价</van-button
                 >
               </div>
@@ -200,7 +200,7 @@ export default {
 
     //判断评价按钮是否展示
     evaluateTure(item) {
-       
+
       if (item.status == 0) {
         return true
       }
@@ -248,7 +248,7 @@ export default {
             if (this.taskList.length >= total) {
               //已加载完全部数据
               this.finished = true
-              
+
             } else {
               callback()
             }
@@ -259,7 +259,7 @@ export default {
             if (this.taskList.length >= total) {
               //已加载完全部数据
               this.finished = true
-              
+
             }
 
             // this.taskList = rows || []