mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-12 02:24:48 +08:00
Compare commits
3 Commits
85b8c55b0a
...
35b5999f60
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35b5999f60 | ||
|
|
45ec382ddc | ||
|
|
21b9e107c5 |
@ -72,12 +72,14 @@ 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.size && file.size > that.option.size) {
|
||||
that.event('upload.error', {file: file}, file, '大小超限');
|
||||
} else if (!that.option.hide) {
|
||||
if (!that.option.hide && !file.notify) {
|
||||
file.notify = new NotifyExtend(file);
|
||||
}
|
||||
}), layui.each(files, function (index, file) {
|
||||
if (that.option.size && file.size > that.option.size) {
|
||||
that.event('upload.error', {file: file}, file, '大小超出限制!');
|
||||
}
|
||||
});
|
||||
layui.each(files, function (index, file) {
|
||||
// 禁传异常状态文件
|
||||
if (typeof file.xstate === 'number' && file.xstate === -1) return;
|
||||
// 图片限宽限高压缩
|
||||
|
||||
@ -130,12 +130,14 @@
|
||||
<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=''}"
|
||||
<button data-file="one" data-type="gif,png,jpg,jpeg"
|
||||
data-path="{$get.path|default=''}" data-size="{$get.size|default=0}"
|
||||
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=''}"
|
||||
<button data-file="mul" data-type="gif,png,jpg,jpeg"
|
||||
data-path="{$get.path|default=''}" data-size="{$get.size|default=0}"
|
||||
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user