Update admin.js

This commit is contained in:
邹景立 2022-11-05 10:36:30 +08:00
parent 7d778dc406
commit 9326343474

View File

@ -613,7 +613,7 @@ $(function () {
$.fn.uploadOneImage = function () {
return this.each(function () {
if (this.dataset.inited) return; else this.dataset.inited = 'true';
var $bt = $('<div class="uploadimage"><span><a data-file class="layui-icon layui-icon-upload-drag"></a><i class="layui-icon layui-icon-search"></i><i class="layui-icon layui-icon-close"></i></span><span data-file></span></div>');
var $bt = $('<div class="uploadimage"><span><a data-file class="layui-icon layui-icon-upload-drag"></a><i class="layui-icon layui-icon-search"></i><i class="layui-icon layui-icon-close"></i></span><span data-file="image"></span></div>');
var $in = $(this).on('change', function () {
if (this.value) $bt.css('backgroundImage', 'url(' + encodeURI(this.value) + ')');
}).after($bt).trigger('change');