萤火科技 1 год назад
Родитель
Сommit
ce1917b7b9

+ 2 - 2
src/components/Modal/CouponModal/CouponModal.vue

@@ -122,8 +122,8 @@ export default {
   props: {
     // 多选模式, 如果false为单选
     multiple: PropTypes.bool.def(true),
-    // 最大选择的数量限制, multiple模式下有效
-    maxNum: PropTypes.integer.def(100),
+    // // 最大选择的数量限制, multiple模式下有效
+    // maxNum: PropTypes.integer.def(100),
     // 默认选中的列表记录
     defaultList: PropTypes.array.def([])
   },

+ 1 - 1
src/components/Modal/GoodsModal/GoodsModal.vue

@@ -2,7 +2,7 @@
   <a-modal
     class="noborder"
     :title="title"
-    :width="820"
+    :width="960"
     :visible="visible"
     :isLoading="isLoading"
     :maskClosable="false"

+ 1 - 4
src/components/SelectCoupon/SelectCoupon.vue

@@ -49,7 +49,6 @@
     <CouponModal
       ref="CouponModal"
       :multiple="multiple"
-      :maxNum="maxNum"
       :defaultList="selectedItems"
       @handleSubmit="handleSelectCouponSubmit"
     />
@@ -67,7 +66,7 @@ const columns = [
   {
     title: '优惠券ID',
     dataIndex: 'coupon_id',
-     width: '12%',
+    width: '12%',
   },
   {
     title: '优惠券名称',
@@ -105,8 +104,6 @@ export default {
   props: {
     // 多选模式, 如果false为单选
     multiple: PropTypes.bool.def(true),
-    // 最大选择的数量限制, multiple模式下有效
-    maxNum: PropTypes.integer.def(100),
     // 默认选中的优惠券
     defaultList: PropTypes.array.def([])
   },

+ 4 - 0
src/utils/utils.less

@@ -215,6 +215,10 @@
   margin-left: 15px;
 }
 
+.mr-2 {
+  margin-right: 2px;
+}
+
 .mr-3 {
   margin-right: 3px;
 }

+ 4 - 12
src/views/content/article/Index.vue

@@ -138,24 +138,18 @@ export default {
   },
   data () {
     return {
-      expand: false,
+      // 正在加载
+      isLoading: false,
       // 当前表单元素
       searchForm: this.$form.createForm(this),
       // 分类列表
       categoryList: [],
       // 查询参数
       queryParam: {},
-      // 正在加载
-      isLoading: false,
       // 表头
       columns,
       // 加载数据方法 必须为 Promise 对象
-      loadData: param => {
-        return ArticleApi.list({ ...param, ...this.queryParam })
-          .then(response => {
-            return response.data.list
-          })
-      }
+      loadData: param => ArticleApi.list({ ...param, ...this.queryParam }).then(response => response.data.list)
     }
   },
   created () {
@@ -168,9 +162,7 @@ export default {
     getCategoryList () {
       this.isLoading = true
       CategoryApi.list()
-        .then(result => {
-          this.categoryList = result.data.list
-        })
+        .then(result => this.categoryList = result.data.list)
         .finally(() => this.isLoading = false)
     },
 

+ 1 - 1
src/views/page/modules/editor/Editor.vue

@@ -1232,7 +1232,7 @@
             <!-- 手动选择 -->
             <div v-if="curItem.params.source === 'choice'" class="block-box">
               <div class="block-title">选择优惠券 ({{ curItem.data.length }})</div>
-              <SCoupon v-model="curItem.data" :maxNum="15" />
+              <SCoupon v-model="curItem.data" />
             </div>
             <!-- 自动获取 -->
             <div v-if="curItem.params.source === 'auto'" class="block-box">

+ 1 - 3
src/views/page/modules/editor/modules/SArticleCate.vue

@@ -56,9 +56,7 @@ export default {
     getCategoryList () {
       this.isLoading = true
       CategoryApi.list()
-        .then(result => {
-          this.categoryList = result.data.list
-        })
+        .then(result => this.categoryList = result.data.list)
         .finally(() => this.isLoading = false)
     },
 

+ 0 - 3
src/views/page/modules/editor/modules/SCoupon.vue

@@ -24,7 +24,6 @@
     </div>
     <CouponModal
       ref="CouponModal"
-      :maxNum="maxNum"
       :defaultList="selectedItems"
       @handleSubmit="handleSelectCouponSubmit"
     />
@@ -52,8 +51,6 @@ export default {
     event: 'change'
   },
   props: {
-    // 最大选择的数量限制, multiple模式下有效
-    maxNum: PropTypes.integer.def(15),
     // 选中的优惠券数据
     value: PropTypes.array.def([])
   },

+ 1 - 0
src/views/page/modules/phone/style.less

@@ -493,6 +493,7 @@ dl {
         &.display-slide {
           display: flex;
           flex-wrap: nowrap;
+          overflow: hidden;
 
           .goods-item {
             flex-shrink: 0;