Authored by 沈志敏

增加删除按钮

... ... @@ -42,25 +42,32 @@
}
.fav-product-list {
padding-left: 20px;
list-style: none;
li {
height: auto;
height: 205px;
overflow: hidden;
margin-top: 20px;
}
.fav-del {
float: left;
background: resolve("home/fav/fav-del.png");
display: none;
float: left;
width: 50px;
height: 100%;
.fav-del-span {
display: inline-block;
width: 35px;
height: 35px;
margin-right: 15px;
margin-top: 90px;
background: resolve("home/fav/fav-del.png");
}
}
.show {
display: block;
}
.delhide {
.delshow {
display: block;
}
... ...
... ... @@ -2,8 +2,8 @@
<div class="fav-type show" 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 ? 'show': ''}}">
<button @click="delProduct($index, item.fav_id)">删除</button>
<div class="fav-del {{editmodel ? 'delshow': ''}}" @click="delProduct($index, item.fav_id)">
<span class="fav-del-span"></span>
</div>
<a :href="item.link">
<div class="fav-img-box">
... ... @@ -34,9 +34,8 @@
<script>
const $ = require('yoho-jquery');
const tip = require('common/tip');
const Loading = require('common/loading');
const modal = require('common/modal');
const loading = new Loading();
const loading = require('common/loading');
module.exports = {
props: ['productUrl'],
... ... @@ -51,8 +50,6 @@
},
methods: {
loadMore: function() {
loading.show();
let _this = this;
this.busy = true;
... ... @@ -72,7 +69,6 @@
}
_this.nullbox = _this.productData.length ? "hide" : "";
loading.hide();
}).fail(() => {
tip('网络错误');
});
... ...