|
@@ -30,6 +30,7 @@ import { computed, PropType } from 'vue'
|
|
|
import { Image, Icon, Loading, showFailToast, showDialog } from 'vant'
|
|
import { Image, Icon, Loading, showFailToast, showDialog } from 'vant'
|
|
|
import { UploadFile } from './types'
|
|
import { UploadFile } from './types'
|
|
|
import h5plus from '@/utils/h5plus'
|
|
import h5plus from '@/utils/h5plus'
|
|
|
|
|
+import { i18n } from '@/stores'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
modelValue: {
|
|
modelValue: {
|
|
@@ -53,11 +54,11 @@ const props = defineProps({
|
|
|
},
|
|
},
|
|
|
loadingText: {
|
|
loadingText: {
|
|
|
type: String,
|
|
type: String,
|
|
|
- default: '上传中...'
|
|
|
|
|
|
|
+ default: i18n.global.t('common.uploading')
|
|
|
},
|
|
},
|
|
|
errorText: {
|
|
errorText: {
|
|
|
type: String,
|
|
type: String,
|
|
|
- default: '上传失败'
|
|
|
|
|
|
|
+ default: i18n.global.t('common.loaderror')
|
|
|
},
|
|
},
|
|
|
// 是否开启覆盖上传,开启后会关闭图片预览
|
|
// 是否开启覆盖上传,开启后会关闭图片预览
|
|
|
reupload: {
|
|
reupload: {
|
|
@@ -106,7 +107,7 @@ const checkImagesPermission = () => {
|
|
|
},
|
|
},
|
|
|
onError: (error) => {
|
|
onError: (error) => {
|
|
|
showDialog({
|
|
showDialog({
|
|
|
- message: '需要相册权限才能正常使用该功能,是否前往设置页面开启权限?',
|
|
|
|
|
|
|
+ message: i18n.global.t('common.loadtips'),
|
|
|
showCancelButton: true,
|
|
showCancelButton: true,
|
|
|
cancelButtonText: '否',
|
|
cancelButtonText: '否',
|
|
|
confirmButtonText: '是'
|
|
confirmButtonText: '是'
|