Update admin.js

This commit is contained in:
Anyon 2022-06-30 16:52:31 +08:00
parent 0d1555b34e
commit 28e8e3db01

View File

@ -611,7 +611,7 @@ $(function () {
if ($(this).data('inited')) return true; else $(this).data('inited', true);
var $bt = $('<div class="uploadimage"><span><a data-file="mul" class="layui-icon layui-icon-upload-drag"></a></span><span data-file="images"></span></div>');
var ims = this.value ? this.value.split('|') : [], $in = $(this).after($bt);
$bt.find('[data-file]').attr('data-size', $in.data('size') || 0).attr('data-type', $in.data('type') || 'gif,png,jpg,jpeg').data('input', this).on('done', function (evt, src) {
$bt.find('[data-file]').attr('data-size', $in.data('size') || 0).attr('data-type', $in.data('type') || 'gif,png,jpg,jpeg').data('input', this).on('push', function (evt, src) {
ims.push(src), $in.val(ims.join('|')), showImageContainer([src]);
}) && (ims.length > 0 && showImageContainer(ims))