Explorar el Código

表格超出内容显示优化

zhh hace 6 años
padre
commit
c66fe33df9
Se han modificado 1 ficheros con 19 adiciones y 1 borrados
  1. 19 1
      src/views/oms/order/orderDetail.vue

+ 19 - 1
src/views/oms/order/orderDetail.vue

@@ -72,7 +72,16 @@
           <el-col :span="4" class="table-cell">{{order.autoConfirmDay}}天</el-col>
           <el-col :span="4" class="table-cell">{{order.integration}}</el-col>
           <el-col :span="4" class="table-cell">{{order.growth}}</el-col>
-          <el-col :span="4" class="table-cell">{{order.promotionInfo}}</el-col>
+          <el-col :span="4" class="table-cell">
+            <el-popover
+              placement="top-start"
+              title="活动信息"
+              width="200"
+              trigger="hover"
+              :content="order.promotionInfo">
+              <span slot="reference">{{order.promotionInfo | formatLongText}}</span>
+            </el-popover>
+          </el-col>
         </el-row>
       </div>
       <div style="margin-top: 20px">
@@ -387,6 +396,15 @@
           return value;
         }
       },
+      formatLongText(value) {
+        if(value===undefined||value===null||value===''){
+          return '暂无';
+        }else if(value.length>8){
+          return value.substr(0, 8) + '...';
+        }else{
+          return value;
+        }
+      },
       formatPayType(value) {
         if (value === 1) {
           return '支付宝';