ソースを参照

🎨 chore(put-book): table 优化

晓晓晓晓丶vv 4 年 前
コミット
cb74375071
3 ファイル変更11 行追加4 行削除
  1. 1 1
      src/scss/antd.scss
  2. 9 3
      src/views/_pageOptions/table-put.ts
  3. 1 0
      src/views/put/put-book.vue

+ 1 - 1
src/scss/antd.scss

@@ -41,5 +41,5 @@
 }
 
 .ant-table td {
-  white-space: nowrap !important;
+  @include single-line();
 }

+ 9 - 3
src/views/_pageOptions/table-put.ts

@@ -2,10 +2,12 @@ export const TableColumnOfPutBooks = [
   {
     title: "ID",
     dataIndex: "id",
+    width: 100,
   },
   {
     title: "公众号名称",
     dataIndex: "official_name",
+    width: 150,
   },
   {
     title: "书籍",
@@ -14,20 +16,24 @@ export const TableColumnOfPutBooks = [
   {
     title: "流量平台",
     dataIndex: "delivery_platform",
+    width: 120,
   },
 
   {
     title: "开始时间",
     dataIndex: "start_time",
+    width: 200,
   },
   {
     title: "结束时间",
     dataIndex: "end_time",
+    width: 200,
   },
   {
     title: "操作",
     key: "operator",
     slots: { customRender: "operator" },
+    width: 100,
   },
 ];
 
@@ -288,9 +294,9 @@ export const TableColumnOfPutAdPlan = [
     title: "",
     dataIndex: "check",
     width: 120,
-    slots:{
-      customRender: 'switch'
-    }
+    slots: {
+      customRender: "switch",
+    },
   },
   {
     fixed: "left",

+ 1 - 0
src/views/put/put-book.vue

@@ -13,6 +13,7 @@
              :loading="loading"
              :columns="columns"
              :data-source="list"
+             :scroll="{ y: 500 }"
              @change="onBookLoaded">
       <template #operator="{record}">
         <confirm-button :label="record.status ? '停止' : '已停止'"