|
@@ -49,6 +49,7 @@
|
|
|
if (this.imgs && this.imgs.length > 0) {
|
|
if (this.imgs && this.imgs.length > 0) {
|
|
|
window.addEventListener('scroll', this.lazy)
|
|
window.addEventListener('scroll', this.lazy)
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(this.imgs);
|
|
|
$('#list').removeClass('d-none');
|
|
$('#list').removeClass('d-none');
|
|
|
let data = [
|
|
let data = [
|
|
|
[
|
|
[
|
|
@@ -104,14 +105,15 @@
|
|
|
if (!confirm('确定要删除当前需求吗?')) {
|
|
if (!confirm('确定要删除当前需求吗?')) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
let url = '{{url('apiLocal/demand/destroy?id=')}}' + demand['id'];
|
|
let url = '{{url('apiLocal/demand/destroy?id=')}}' + demand['id'];
|
|
|
|
|
|
|
|
- window.tempTip.setDuration(3000);
|
|
|
|
|
window.axios.delete(url).then(res => {
|
|
window.axios.delete(url).then(res => {
|
|
|
if (res.data.success) {
|
|
if (res.data.success) {
|
|
|
window.tempTip.showSuccess('删除成功!');
|
|
window.tempTip.showSuccess('删除成功!');
|
|
|
- this.$delete(this.demands, index);
|
|
|
|
|
|
|
+ this.$delete(this.demands,index);
|
|
|
|
|
+ this.imgs = Array.from(document.getElementById('list').querySelectorAll('img'));
|
|
|
|
|
+ this.lazy();
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
window.tempTip.show(res.data.data);
|
|
window.tempTip.show(res.data.data);
|
|
@@ -178,7 +180,7 @@
|
|
|
this.$set(this.demands, this.selectIndex, res.data.data);
|
|
this.$set(this.demands, this.selectIndex, res.data.data);
|
|
|
$('#uploadFile').modal('hide');
|
|
$('#uploadFile').modal('hide');
|
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
|
- that.imgs.push(document.getElementById('img_'+res.data.data['id']));
|
|
|
|
|
|
|
+ that.imgs.push(document.getElementById('img_'+res.data.data['id']));
|
|
|
that.lazy();
|
|
that.lazy();
|
|
|
},1);
|
|
},1);
|
|
|
window.tempTip.showSuccess('文件上传成功');
|
|
window.tempTip.showSuccess('文件上传成功');
|