修改图文展示

This commit is contained in:
Anyon 2020-09-22 15:02:30 +08:00
parent 204b163297
commit 299dc5e762
2 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,7 @@
{block name='content'} {block name='content'}
<div class="think-box-shadow"> <div class="think-box-shadow">
<div id="news-box" class="layui-clear"> <div id="news-box" class="layui-clear layui-hide">
{foreach $list as $vo} {foreach $list as $vo}
<div class="news-item"> <div class="news-item">
<div class='news-tools layui-hide'> <div class='news-tools layui-hide'>
@ -45,7 +45,10 @@
}).off('mouseleave', '.news-item').on('mouseleave', '.news-item', function () { }).off('mouseleave', '.news-item').on('mouseleave', '.news-item', function () {
$(this).find('.news-tools').addClass('layui-hide'); $(this).find('.news-tools').addClass('layui-hide');
}); });
$.msg.loading();
require(['jquery.masonry'], function (Masonry) { require(['jquery.masonry'], function (Masonry) {
layui.layer.closeAll();
$('#news-box').removeClass('layui-hide');
var newsbox = document.querySelector('#news-box'); var newsbox = document.querySelector('#news-box');
var msnry = new Masonry(newsbox, {itemSelector: '.news-item', columnWidth: 0}); var msnry = new Masonry(newsbox, {itemSelector: '.news-item', columnWidth: 0});
msnry.layout(), $('body').on('click', '[data-news-del]', function (event) { msnry.layout(), $('body').on('click', '[data-news-del]', function (event) {

View File

@ -131,7 +131,7 @@ $(function () {
}; };
// 内容区域动态加载后初始化 // 内容区域动态加载后初始化
this.reInit = function ($dom) { this.reInit = function ($dom) {
$.vali.listen(this), $dom = $dom || $(this.selecter); $(window).trigger('scroll'), $.vali.listen(this), $dom = $dom || $(this.selecter);
$dom.find('[required]').map(function ($parent) { $dom.find('[required]').map(function ($parent) {
if (($parent = $(this).parent()) && $parent.is('label')) { if (($parent = $(this).parent()) && $parent.is('label')) {
$parent.addClass('label-required-prev'); $parent.addClass('label-required-prev');
@ -160,9 +160,7 @@ $(function () {
$this.uploadFile(function (url, file) { $this.uploadFile(function (url, file) {
$($this.data('input')).data('file', file).val(url).trigger('change'); $($this.data('input')).data('file', file).val(url).trigger('change');
}); });
}), setTimeout(function () { });
$(window).trigger('scroll');
}, 500);
}; };
// 在内容区显示视图 // 在内容区显示视图
this.show = function (html) { this.show = function (html) {