|
|
<template>
|
|
|
<div class="fav-type" v-infinite-scroll="loadMore()" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
|
|
|
<ul class="fav-product-list">
|
|
|
<li v-for="item in productData" track-by="fav_id">
|
|
|
<div class="fav-del {{editmodel ? 'delshow': ''}}" @click="delItem($index, item.fav_id)">
|
|
|
<li v-for="item in productData" track-by="fav_id" id="li-{{$index}}">
|
|
|
<div class="fav-del-left {{editmodel ? 'delshow': ''}}" @click="showDelBtn($index)">
|
|
|
<span class="fav-del-span"></span>
|
|
|
</div>
|
|
|
<a :href="item.link">
|
...
|
...
|
@@ -22,6 +22,11 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
</a>
|
|
|
<div class="fav-del-right" id="del-{{$index}}" @click="delItem($index, item.fav_id)">
|
|
|
<span class="fav-del-btn"></span>
|
|
|
<br/>
|
|
|
<span class="fav-del-txt">删除</span>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="fav-null-box {{ nullbox }}">
|
...
|
...
|
@@ -77,6 +82,11 @@ |
|
|
editModel(action) {
|
|
|
this.editmodel = action;
|
|
|
},
|
|
|
showDelBtn(index) {
|
|
|
var delBtn = $("#del-" + index);
|
|
|
var width = delBtn.width();
|
|
|
$("#li-" + index).css("transform","translateX(-" + width + "px)");
|
|
|
},
|
|
|
delItem(index, id) {
|
|
|
let _this = this;
|
|
|
$.ajax({
|
...
|
...
|
|