修改文件上传

This commit is contained in:
邹景立 2021-04-13 12:28:15 +08:00
parent 3499ffd41e
commit a127a35fe1
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@ define(['md5'], function (SparkMD5, allowMime) {
});
/*! 初始化上传组件 */
option.uploader = layui.upload.render({
url: '{:url("admin/api.upload/file")}',
auto: false, elem: element, accept: 'file', multiple: option.multiple,
exts: option.exts.join('|'), acceptMime: option.mimes.join(','), choose: function (object) {
option.element.triggerHandler('upload.choose', option.files = object.pushFile());

View File

@ -9,7 +9,9 @@
<p>3. 保存位置数据,下次可直接显示</p>
</div>
<div class="margin-top-20">
<img alt="img" id="target" src="{$data.image|default='https://d3o1694hluedf9.cloudfront.net/market-750.jpg'}" style="width:800px;height:400px">
<div style="width:800px;height:572px">
<img alt="img" class="layui-hide" id="target" src="{$data.image|default='https://d3o1694hluedf9.cloudfront.net/market-750.jpg'}">
</div>
<div class="margin-top-5">
<label class="margin-top-5 block"><input class="layui-input layui-bg-gray" id="inputImage" readonly value=''></label>
<label class="margin-top-5 block"><input class="layui-input layui-bg-gray" id="inputData" readonly value=''></label>