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