WanGxC 6 月之前
父節點
當前提交
7d4343a035
共有 1 個文件被更改,包括 16 次插入1 次删除
  1. 16 1
      src/views/shop-information/useColumns.tsx

+ 16 - 1
src/views/shop-information/useColumns.tsx

@@ -68,7 +68,14 @@ export const platformColumns = [
     field: 'status', title: '状 态', minWidth: 'auto', align: 'center',
     slots: {
       default({ row }: any) {
-        return <span class={ 'font-medium' }>{ row.status ? row.status : '--' }</span>;
+        return (
+            <el-tag
+                class="font-medium"
+                type={ row.status === 1 ? 'success' : 'danger' }   // 动态绑定 type
+            >
+              { row.status === 1 ? '启用' : '暂停' }
+            </el-tag>
+        );
       }
     }
   },
@@ -706,6 +713,14 @@ export const shopInfoColumns = [
       }
     }
   },
+  {
+    field: 'countComputer', title: '电脑数量', minWidth: 'auto', align: 'center',
+    slots: {
+      default({ row }: any) {
+        return <span class={ 'font-medium' }>{ row.countComputer ? row.countComputer : '--' }</span>;
+      }
+    }
+  },
   {
     field: 'country', title: '国 家', minWidth: 'auto', align: 'center',
     slots: {