style: 优化css样式,全局使用show.xx消息提示
This commit is contained in:
@@ -44,56 +44,4 @@
|
||||
<a class="layui-table-text" data-url="{{d.url}}" lay-event="choose" >{:__('选择')}</a>
|
||||
</script>
|
||||
|
||||
<include file="/public/footer" />
|
||||
|
||||
<script>
|
||||
layui.use(['layer','fileManager','jquery'], function () {
|
||||
|
||||
let $ = layui.jquery;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 选择文件
|
||||
*/
|
||||
/*table.on('tool(lay-tableList)', function (obj) {
|
||||
|
||||
let field = $('#choose_filed').val() || undefined;
|
||||
let type = $('#choose_type').val() || undefined;
|
||||
if (!field) {
|
||||
return layer.info('图片信息不存在');
|
||||
}
|
||||
|
||||
|
||||
if (type === 'images') {
|
||||
let o = parent.layui.$('img.' + field);
|
||||
o.prop('src', obj.data.url);
|
||||
o.parent('div').removeClass('layui-hide');
|
||||
parent.layui.$(o).parents('.layui-upload-drag').find('p,i,hr').addClass('layui-hide');
|
||||
parent.layui.$('input.' + field).val(obj.data.url);
|
||||
} else if (type === 'multiple') {
|
||||
let boxList = parent.layui.$('[lay-choose="' + field + '"]').parents('.layui-imagesbox').find('.layui-input-inline');
|
||||
let length = boxList.length;
|
||||
|
||||
$(boxList).each(function (i, item) {
|
||||
$(item).find('input.layui-hide').prop('name', field + '[' + i + '][src]');
|
||||
$(item).find('input.layui-input').prop('name', field + '[' + i + '][title]');
|
||||
})
|
||||
|
||||
let html = '<div class="layui-input-inline layui-uplpad-image">';
|
||||
html += '<img src="' + obj.data.url + '" >';
|
||||
html += '<input type="text" name="' + field + '[' + (length - 1) + '][src]" class="layui-hide" value="' + obj.data.url + '">';
|
||||
html += '<input type="text" name="' + field + '[' + (length - 1) + '][title]" class="layui-input" placeholder="图片简介">';
|
||||
html += '<span class="layui-badge layui-badge-red" onclick="layui.$(this).parent().remove();">删除</span></div>';
|
||||
let elem = parent.layui.$('[lay-upload="' + field + '"]');
|
||||
parent.layui.$(elem).parent().before(html);
|
||||
parent.layui.$(elem).parents('form').find('input#' + field + '_clear').remove();
|
||||
} else {
|
||||
parent.layui.$('input.' + field).val(obj.data.url);
|
||||
}
|
||||
parent.layer.closeAll();
|
||||
});
|
||||
*/
|
||||
|
||||
})
|
||||
</script>
|
||||
<include file="/public/footer" />
|
||||
Reference in New Issue
Block a user