mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改图文展示
This commit is contained in:
parent
204b163297
commit
299dc5e762
@ -10,7 +10,7 @@
|
||||
|
||||
{block name='content'}
|
||||
<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}
|
||||
<div class="news-item">
|
||||
<div class='news-tools layui-hide'>
|
||||
@ -45,7 +45,10 @@
|
||||
}).off('mouseleave', '.news-item').on('mouseleave', '.news-item', function () {
|
||||
$(this).find('.news-tools').addClass('layui-hide');
|
||||
});
|
||||
$.msg.loading();
|
||||
require(['jquery.masonry'], function (Masonry) {
|
||||
layui.layer.closeAll();
|
||||
$('#news-box').removeClass('layui-hide');
|
||||
var newsbox = document.querySelector('#news-box');
|
||||
var msnry = new Masonry(newsbox, {itemSelector: '.news-item', columnWidth: 0});
|
||||
msnry.layout(), $('body').on('click', '[data-news-del]', function (event) {
|
||||
|
@ -131,7 +131,7 @@ $(function () {
|
||||
};
|
||||
// 内容区域动态加载后初始化
|
||||
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) {
|
||||
if (($parent = $(this).parent()) && $parent.is('label')) {
|
||||
$parent.addClass('label-required-prev');
|
||||
@ -160,9 +160,7 @@ $(function () {
|
||||
$this.uploadFile(function (url, file) {
|
||||
$($this.data('input')).data('file', file).val(url).trigger('change');
|
||||
});
|
||||
}), setTimeout(function () {
|
||||
$(window).trigger('scroll');
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
// 在内容区显示视图
|
||||
this.show = function (html) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user