装备上传图片大小调整
This commit is contained in:
parent
c9cfa1abab
commit
228eebbb75
|
|
@ -3,6 +3,7 @@ import test from './module/test'
|
||||||
import myInfo from './module/myInfo'
|
import myInfo from './module/myInfo'
|
||||||
|
|
||||||
import { mainStore } from 'store/main'
|
import { mainStore } from 'store/main'
|
||||||
|
import { el } from 'element-plus/es/locale'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -720,16 +721,20 @@ const router = createRouter({
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const white = ['/qr-code']
|
||||||
// 使页面跳转后滚动条恢复至顶部
|
// 使页面跳转后滚动条恢复至顶部
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
|
||||||
const store = mainStore()
|
const store = mainStore()
|
||||||
if (to.meta.isLogin && !to.meta.AuthFlag) {
|
if (to.meta.isLogin && !to.meta.AuthFlag) {
|
||||||
if (store.token) {
|
if (store.token) {
|
||||||
next()
|
next()
|
||||||
|
} else {
|
||||||
|
if (white.includes(to.path)) {
|
||||||
|
next()
|
||||||
} else {
|
} else {
|
||||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
|
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -753,9 +753,9 @@ const beforeUpload = (file: any) => {
|
||||||
if (file.size / 1024 / 1024 > 2) {
|
if (file.size / 1024 / 1024 > 2) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: '上传文件大小不能超过2M!',
|
message: '上传文件大小不能超过5M!',
|
||||||
})
|
})
|
||||||
// this.$message.error({ message: `上传文件大小不能超过2M!`,});
|
// this.$message.error({ message: `上传文件大小不能超过5M!`,});
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1468,7 +1468,7 @@ const options = ref<any>([])
|
||||||
<el-row :gutter="20" v-if="!isViewForm">
|
<el-row :gutter="20" v-if="!isViewForm">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||||
支持格式:.jpg、.png 单个文件大小不能超过2M
|
支持格式:.jpg、.png 单个文件大小不能超过5M
|
||||||
<div class="tipBox">
|
<div class="tipBox">
|
||||||
*注:图片排序为平台展示顺序,不得少于1张,不得多于6张,建议使用图片比例1:1
|
*注:图片排序为平台展示顺序,不得少于1张,不得多于6张,建议使用图片比例1:1
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1499,7 +1499,7 @@ const options = ref<any>([])
|
||||||
</div>
|
</div>
|
||||||
<UploadComponentNew
|
<UploadComponentNew
|
||||||
v-if="!isViewForm"
|
v-if="!isViewForm"
|
||||||
:maxSize="2"
|
:maxSize="5"
|
||||||
:max-limit="6"
|
:max-limit="6"
|
||||||
width="100px"
|
width="100px"
|
||||||
height="100px"
|
height="100px"
|
||||||
|
|
@ -1521,7 +1521,7 @@ const options = ref<any>([])
|
||||||
<el-row :gutter="20" v-if="!isViewForm">
|
<el-row :gutter="20" v-if="!isViewForm">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||||
支持格式:.jpg、.png 单个文件大小不能超过2M
|
支持格式:.jpg、.png 单个文件大小不能超过5M
|
||||||
<div class="tipBox">
|
<div class="tipBox">
|
||||||
*注:图片排序为平台展示顺序,不得少于1张,不得多于6张,建议使用图片比例16:9
|
*注:图片排序为平台展示顺序,不得少于1张,不得多于6张,建议使用图片比例16:9
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1554,7 +1554,7 @@ const options = ref<any>([])
|
||||||
</div>
|
</div>
|
||||||
<UploadComponentNew
|
<UploadComponentNew
|
||||||
v-if="!isViewForm"
|
v-if="!isViewForm"
|
||||||
:maxSize="2"
|
:maxSize="5"
|
||||||
:max-limit="6"
|
:max-limit="6"
|
||||||
width="100px"
|
width="100px"
|
||||||
height="100px"
|
height="100px"
|
||||||
|
|
@ -1599,7 +1599,7 @@ const options = ref<any>([])
|
||||||
<el-row :gutter="20" v-if="!isViewForm">
|
<el-row :gutter="20" v-if="!isViewForm">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||||
支持格式:.jpg、.png 单个文件大小不能超过2M
|
支持格式:.jpg、.png 单个文件大小不能超过5M
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -1630,7 +1630,7 @@ const options = ref<any>([])
|
||||||
<UploadComponentNew
|
<UploadComponentNew
|
||||||
v-if="!isViewForm"
|
v-if="!isViewForm"
|
||||||
:actionUrl="uploadUrl"
|
:actionUrl="uploadUrl"
|
||||||
:maxSize="2"
|
:maxSize="5"
|
||||||
:max-limit="4"
|
:max-limit="4"
|
||||||
width="100px"
|
width="100px"
|
||||||
height="100px"
|
height="100px"
|
||||||
|
|
@ -1652,7 +1652,7 @@ const options = ref<any>([])
|
||||||
<el-row :gutter="20" v-if="!isViewForm">
|
<el-row :gutter="20" v-if="!isViewForm">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||||
支持格式:.jpg、.png 单个文件大小不能超过2M,
|
支持格式:.jpg、.png 单个文件大小不能超过5M,
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -1690,7 +1690,7 @@ const options = ref<any>([])
|
||||||
<UploadComponentNew
|
<UploadComponentNew
|
||||||
v-if="!isViewForm"
|
v-if="!isViewForm"
|
||||||
:actionUrl="uploadUrl"
|
:actionUrl="uploadUrl"
|
||||||
:maxSize="2"
|
:maxSize="5"
|
||||||
:max-limit="4"
|
:max-limit="4"
|
||||||
width="100px"
|
width="100px"
|
||||||
height="100px"
|
height="100px"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue