From 7c733f2e8d6b3c688ea741183f2b5d60686e841e Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 21 九月 2023 11:06:36 +0800
Subject: [PATCH] 编辑产品接口联调及增加必填项校验

---
 src/views/productManage/product/index.vue |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index d5e8709..6eb0622 100644
--- a/src/views/productManage/product/index.vue
+++ b/src/views/productManage/product/index.vue
@@ -63,7 +63,7 @@
         </div> -->
       </div>
       <div class="btn-pager">
-        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+        <PagerView class="page" :pager-options="pagerOptions" :page-size="pageSizes" v-on="pagerEvents" />
       </div>
     </div>
     <!-- 鏂板缓/缂栬緫 -->
@@ -99,7 +99,8 @@
         infomation: {}
       },
       isIconIndex: "1", // 1 鍥炬爣 2 鍒楄〃
-      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
+      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
+      pageSizes: [15, 30]
     }
   },
   created() {
@@ -108,6 +109,10 @@
   },
   methods: {
     setTable() {
+      if (this.isIconIndex === "1") {
+        this.pageSizes = [30, 60]
+        this.pagerOptions.pageSize = 30
+      }
       this.tableList = {
         tableInfomation: [],
         selectBox: true,
@@ -234,6 +239,7 @@
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
+      this.editConfig.infomation = {}
     },
     // 琛岀偣鍑�
     tableRowClick(row) {
@@ -244,7 +250,16 @@
     },
     // 鍒囨崲鍒楄〃灞曠幇褰㈠紡
     selIconSwitchClick(value) {
+      this.pagerOptions.currPage = 1
       this.isIconIndex = value
+      if (value === "1") {
+        this.pageSizes = [30, 60]
+        this.pagerOptions.pageSize = 30
+      } else {
+        this.pageSizes = [15, 30]
+        this.pagerOptions.pageSize = 15
+      }
+      this.getData()
     }
   }
 }
@@ -288,8 +303,8 @@
   justify-content: flex-start;
   align-content: flex-start;
   .product-box {
-    width: 295px;
-    height: 84px;
+    width: 294px;
+    height: 94px;
     margin-bottom: 10px;
     margin-right: 20px;
     border: 1px solid #dee2e6;
@@ -298,6 +313,7 @@
     -webkit-box-shadow: inset 0 0 2px #dee2e6;
     padding: 8px;
     display: flex;
+    align-items: center;
     .left {
       width: 60px;
       text-align: center;
@@ -308,6 +324,7 @@
       margin-left: 10px;
       .label {
         color: #212529;
+        margin-top: -10px;
         margin-right: 15px;
         word-break: break-all;
         word-wrap: break-word;
@@ -315,7 +332,7 @@
       .price,
       .library {
         color: #495057;
-        margin-top: 3px;
+        margin-top: 15px;
       }
     }
   }

--
Gitblit v1.8.0