Merge pull request #239 from taochangle/patch-3

删除文章后重新赋值msnry对象,解决 删除第一个图文后,列表排成1竖列的bug
This commit is contained in:
邹景立 2020-07-15 10:12:08 +08:00 committed by GitHub
commit 36243ca0d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,7 @@
$.form.load('{:url("remove")}', {value: 0, field: 'delete', id: that.getAttribute('data-news-del')}, 'post', function (ret) {
if (ret.code) {
$(that).parents('.news-item').remove();
msnry = new Masonry(item, {itemSelector: '.news-item', columnWidth: 0});
return $.msg.success(ret.msg), msnry.layout(), false;
}
return $.msg.error(ret.msg), false;