修复移动端设备上传图片变为打开相机

This commit is contained in:
X1627315083
2024-01-27 15:20:23 +08:00
parent 9ee1c2a875
commit a7d4bb1da9
12 changed files with 17 additions and 1 deletions

View File

@@ -106,6 +106,8 @@
<a-upload <a-upload
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:capture="null"
:data="{ :data="{
...upload, ...upload,
}" }"
@@ -247,6 +249,7 @@
</div> </div>
</div> </div>
<a-upload <a-upload
:capture="null"
v-show="colorFileList.length < 1" v-show="colorFileList.length < 1"
list-type="picture-card" list-type="picture-card"
:customRequest="function(){}" :customRequest="function(){}"

View File

@@ -72,6 +72,7 @@
</div> </div>
</div> </div>
<a-upload <a-upload
:capture="null"
v-show="fileList.length < 1" v-show="fileList.length < 1"
list-type="picture-card" list-type="picture-card"
:customRequest="function(){}" :customRequest="function(){}"

View File

@@ -129,6 +129,7 @@
:class="[driver__.driver?'showEvents':'']" :class="[driver__.driver?'showEvents':'']"
> >
<a-upload <a-upload
:capture="null"
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:data="{ :data="{

View File

@@ -23,6 +23,7 @@
</div> </div>
<div class="upload_file_item upload_component" v-show="fileList.length < 15"> <div class="upload_file_item upload_component" v-show="fileList.length < 15">
<a-upload <a-upload
:capture="null"
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:data="{ :data="{

View File

@@ -62,6 +62,7 @@
<a-upload <a-upload
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:capture="null"
:data="{ :data="{
...upload, ...upload,
}" }"

View File

@@ -54,6 +54,7 @@
<div class="upload_file_item upload_component" v-show="printboardList.length < 8"> <div class="upload_file_item upload_component" v-show="printboardList.length < 8">
<a-upload <a-upload
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
:capture="null"
list-type="picture-card" list-type="picture-card"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:data="{ :data="{

View File

@@ -115,6 +115,7 @@
> >
<a-upload <a-upload
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
:capture="null"
list-type="picture-card" list-type="picture-card"
:data="{ :data="{
...upload, ...upload,

View File

@@ -14,6 +14,7 @@
<div class="upload_file_item upload_component" v-show="fileList.length < 10"> <div class="upload_file_item upload_component" v-show="fileList.length < 10">
<a-upload <a-upload
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
:capture="null"
list-type="picture-card" list-type="picture-card"
:data="{ :data="{
...upload ...upload

View File

@@ -88,6 +88,7 @@
<a-spin size="large" /> <a-spin size="large" />
</div> </div>
<a-upload <a-upload
:capture="null"
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:data="{ :data="{

View File

@@ -95,6 +95,7 @@
<a-spin size="large" /> <a-spin size="large" />
</div> </div>
<a-upload <a-upload
:capture="null"
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:data="{ :data="{

View File

@@ -148,10 +148,12 @@ const formatTime = (timestamp, fmt) => {
const isMoible = () => { const isMoible = () => {
let is_mobile = navigator.userAgent.toLowerCase().match(/(ipad|ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null; let is_mobile = navigator.userAgent.toLowerCase().match(/(ipad|ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
// alert(navigator.userAgent.toLowerCase())
var isiPad = /iPad/.test(navigator.platform) || (navigator.maxTouchPoints && navigator.maxTouchPoints > 2);
if (is_mobile) { if (is_mobile) {
return true return true
} else { } else {
return false return isiPad
} }
} }

View File

@@ -76,6 +76,7 @@
<div class="content_body_header_right"> <div class="content_body_header_right">
<div :class="['header_operate_item' , 'fontSize','active']"> <div :class="['header_operate_item' , 'fontSize','active']">
<a-upload <a-upload
:capture="null"
v-show="uploadGenerate == 'Upload'" v-show="uploadGenerate == 'Upload'"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:customRequest="customRequest " :customRequest="customRequest "
@@ -266,6 +267,7 @@
v-show="selectGenerateList.length <= 2" v-show="selectGenerateList.length <= 2"
> >
<a-upload <a-upload
:capture="null"
:action="uploadUrl + '/api/element/upload'" :action="uploadUrl + '/api/element/upload'"
list-type="picture-card" list-type="picture-card"
:before-upload="beforeUpload" :before-upload="beforeUpload"