Commit f8e3d6d9 by crushh

update: 排序

parent 738f6757
......@@ -334,6 +334,8 @@ export default {
onEnd({ newIndex, oldIndex }) {
const currRow = that.prizeForm.gamePrizeList.splice(oldIndex, 1)[0];
that.prizeForm.gamePrizeList.splice(newIndex, 0, currRow);
console.log(that.prizeForm.gamePrizeList);
}
});
},
......@@ -465,8 +467,10 @@ export default {
if (val) {
let data = { ...this.prizeForm };
data = JSON.parse(JSON.stringify(data));
data.gamePrizeList.forEach(item => {
data.gamePrizeList.forEach((item, index) => {
item.prizeImageUrl = item.prizeImageUrl.imgUrl || '';
item.sort = index;
if (item.prizeType == 0) {
item.prizeStock = -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment