mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-24 02:16:14 +08:00
删除文章后重新赋值msnry对象,解决 删除第一个图文后,列表排成1竖列的bug
This commit is contained in:
parent
a6f0eeb0ed
commit
21f928be21
@ -58,6 +58,7 @@
|
|||||||
$.form.load('{:url("remove")}', {value: 0, field: 'delete', id: that.getAttribute('data-news-del')}, 'post', function (ret) {
|
$.form.load('{:url("remove")}', {value: 0, field: 'delete', id: that.getAttribute('data-news-del')}, 'post', function (ret) {
|
||||||
if (ret.code) {
|
if (ret.code) {
|
||||||
$(that).parents('.news-item').remove();
|
$(that).parents('.news-item').remove();
|
||||||
|
msnry = new Masonry(item, {itemSelector: '.news-item', columnWidth: 0});
|
||||||
return $.msg.success(ret.msg), msnry.layout(), false;
|
return $.msg.success(ret.msg), msnry.layout(), false;
|
||||||
}
|
}
|
||||||
return $.msg.error(ret.msg), false;
|
return $.msg.error(ret.msg), false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user