Browse Source

Merge branch 'master' of git.caimei365.com:git_lijun/caimei-mall-admin-ui

zhengjinyi 5 years ago
parent
commit
ef22827db9

+ 2 - 2
src/components/DndList/index.vue

@@ -139,14 +139,14 @@ export default {
 
 
 .list-complete-item-handle {
 .list-complete-item-handle {
   overflow: hidden;
   overflow: hidden;
-  text-overflow: ellipsis;
+  text-overflow: clip;
   white-space: nowrap;
   white-space: nowrap;
   margin-right: 50px;
   margin-right: 50px;
 }
 }
 
 
 .list-complete-item-handle2 {
 .list-complete-item-handle2 {
   overflow: hidden;
   overflow: hidden;
-  text-overflow: ellipsis;
+  text-overflow: clip;
   white-space: nowrap;
   white-space: nowrap;
   margin-right: 20px;
   margin-right: 20px;
 }
 }

+ 5 - 1
src/layout/index.vue

@@ -67,7 +67,11 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
-
+<style>
+  .el-table .cell{
+    text-overflow: clip;
+  }
+</style>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
   @import "~@/styles/mixin.scss";
   @import "~@/styles/mixin.scss";
   @import "~@/styles/variables.scss";
   @import "~@/styles/variables.scss";

+ 1 - 1
src/views/goods/category-create.vue

@@ -72,7 +72,7 @@ export default {
         classifyName: '',
         classifyName: '',
         classifyImage: '',
         classifyImage: '',
         sort: '',
         sort: '',
-        status: '',
+        status: '1',
         postageToPay: '',
         postageToPay: '',
         addTime: '',
         addTime: '',
         updateTime: '',
         updateTime: '',

+ 12 - 3
src/views/goods/category.vue

@@ -29,7 +29,7 @@
       </el-table-column>
       </el-table-column>
       <el-table-column label="排序值" align="center" prop="sort">
       <el-table-column label="排序值" align="center" prop="sort">
         <template slot-scope="{row}">
         <template slot-scope="{row}">
-          <el-input v-model="row.sort" style="width:60px;" size="small" />
+          <el-input v-model="row.sort" style="width:100px;" size="small" type="number" maxlength="3" min="1" />
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <el-table-column class-name="status-col" label="状态" align="center" prop="status">
       <el-table-column class-name="status-col" label="状态" align="center" prop="status">
@@ -39,7 +39,7 @@
               v-model="row.status"
               v-model="row.status"
               active-value="1"
               active-value="1"
               inactive-value="0"
               inactive-value="0"
-              @change="changeStatus(row.id)"
+              @change="changeStatus(row.id, row.status)"
             />
             />
           </el-tooltip>
           </el-tooltip>
         </template>
         </template>
@@ -57,6 +57,7 @@
     </el-table>
     </el-table>
 
 
     <pagination v-show="total>20" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="getList" />
     <pagination v-show="total>20" :total="total" :page.sync="listQuery.index" :limit.sync="listQuery.pageSize" @pagination="getList" />
+
   </div>
   </div>
 </template>
 </template>
 
 
@@ -104,7 +105,15 @@ export default {
         this.listLoading = false
         this.listLoading = false
       })
       })
     },
     },
-    changeStatus(id) {
+    changeStatus(id, status) {
+      const confirmTxt = '确定要' + (status * 1 === 1 ? '启用' : '停用') + '该分类吗?'
+      this.$confirm(confirmTxt).then(_ => {
+        this.confirmChange(id)
+      }).catch(() => {
+        this.getList()
+      })
+    },
+    confirmChange(id) {
       switchClassify({ id: id }).then(() => {
       switchClassify({ id: id }).then(() => {
         this.getList()
         this.getList()
       }).catch(() => {
       }).catch(() => {