作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

轮播图拖拽排序

... ... @@ -570,7 +570,7 @@ width: 100%;
<div class="goods-image-box display-flex" style="flex-wrap: wrap;"
v-if="timeData.images_arr">
<draggable class="display-flex" :list="timeData.images_arr" v-bind="$attrs"
:options="{animation:500}">
:options="{animation:500}" @update="datadragEnd">
<div class="goods-images" v-for="(it,index) in timeData.images_arr">
<img class="label-auto" :src="Fast.api.cdnurl(it)" style="border-radius: 4px;">
<div class="del-image-btn" @click="delImg('images',index)">
... ...
... ... @@ -560,7 +560,7 @@
<div class="goods-image-box display-flex" style="flex-wrap: wrap;"
v-if="timeData.images_arr">
<draggable class="display-flex" :list="timeData.images_arr" v-bind="$attrs"
:options="{animation:500}">
:options="{animation:500}" @update="datadragEnd">
<div class="goods-images" v-for="(it,index) in timeData.images_arr">
<img class="label-auto" :src="Fast.api.cdnurl(it)" style="border-radius: 4px;">
<div class="del-image-btn" @click="delImg('images',index)">
... ...
... ... @@ -1180,6 +1180,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'toastr'], function (
}
},
datadragEnd(evt) {
// 轮播图拖拽排序
let that = this;
that.goodsDetail.images = that.timeData.images_arr.join(",");
},
changeGoodsType(type) {
this.goodsDetail.type = type;
this.goodsDetail.dispatch_ids_arr = [];
... ...