Compare commits

..

No commits in common. "35b5999f60147b9ff2c8b95caded75eb660cae18" and "85b8c55b0a15f7e9408645fa638850d526cb786f" have entirely different histories.

2 changed files with 6 additions and 10 deletions

View File

@ -72,14 +72,12 @@ define(['md5', 'notify'], function (SparkMD5, Notify, allowMime) {
var that = this.init();
layui.each(files, function (index, file) {
that.count.total++, file.index = index, that.files[index] = file;
if (!that.option.hide && !file.notify) {
if (that.option.size && file.size > that.option.size) {
that.event('upload.error', {file: file}, file, '大小超限');
} else if (!that.option.hide) {
file.notify = new NotifyExtend(file);
}
if (that.option.size && file.size > that.option.size) {
that.event('upload.error', {file: file}, file, '大小超出限制!');
}
});
layui.each(files, function (index, file) {
}), layui.each(files, function (index, file) {
// 禁传异常状态文件
if (typeof file.xstate === 'number' && file.xstate === -1) return;
// 图片限宽限高压缩

View File

@ -130,14 +130,12 @@
<label class="layui-hide" id="ImageDialogUploadLayout">
<!-- 图片上传组件 开始 -->
{if isset($get.file) && $get.file eq 'image'}
<button data-file="one" data-type="gif,png,jpg,jpeg"
data-path="{$get.path|default=''}" data-size="{$get.size|default=0}"
<button data-file="one" data-type="gif,png,jpg,jpeg" data-path="{$get.path|default=''}"
data-cut-width="{$get.cutWidth|default=0}" data-cut-height="{$get.cutHeight|default=0}"
data-max-width="{$get.maxWidth|default=0}" data-max-height="{$get.maxHeight|default=0}"
></button>
{else}
<button data-file="mul" data-type="gif,png,jpg,jpeg"
data-path="{$get.path|default=''}" data-size="{$get.size|default=0}"
<button data-file="mul" data-type="gif,png,jpg,jpeg" data-path="{$get.path|default=''}"
data-cut-width="{$get.cutWidth|default=0}" data-cut-height="{$get.cutHeight|default=0}"
data-max-width="{$get.maxWidth|default=0}" data-max-height="{$get.maxHeight|default=0}"
></button>