qinzhipeng_v@didiglobal.com 4 năm trước cách đây
mục cha
commit
ccb28f9b88
1 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 10 1
      src/views/projectManage/components/scheduleList.vue

+ 10 - 1
src/views/projectManage/components/scheduleList.vue

@@ -33,7 +33,7 @@
             <div v-for="(item, index) in scope.row.taskObjectList" :key="index" class="Layout_space_between" style="max-height: 300px; padding: 0 10px 10px" align="center">
               <span>TASK-{{ item.id }}</span>
               <span class="public_Jump" @click="Task_Jump(item.id)">{{ item.name }}</span>
-              <span v-show="item.moduleInfoName">{{ item.moduleInfoName.length > 10 ? item.moduleInfoName.substring(0,10) + '...' : item.moduleInfoName }}</span>
+              <span v-show="item.moduleInfoName !== null">{{ item.moduleInfoName | ellipsis }}</span>
             </div>
             <el-button slot="reference" type="text">{{ scope.row.taskObjectList.length }}</el-button>
           </el-popover>
@@ -69,6 +69,15 @@ export default {
   components: {
     modifySchedule
   },
+  filters: {
+    ellipsis(value) {
+      if (!value) return ''
+      if (value.length > 10) {
+        return value.slice(0, 10) + '...'
+      }
+      return value
+    }
+  },
   props: {
     id: {
       type: Number,