+
+
{{ reply.name }}
-
+
@@ -25,7 +22,11 @@
append-to-body
destroy-on-close
>
-
+
@@ -49,27 +50,27 @@
-
+
diff --git a/src/views/mp/draft/components/CoverSelect.vue b/src/views/mp/draft/components/CoverSelect.vue
index ae2b6591..944b7d96 100644
--- a/src/views/mp/draft/components/CoverSelect.vue
+++ b/src/views/mp/draft/components/CoverSelect.vue
@@ -27,9 +27,7 @@
:on-success="onUploadSuccess"
>
-
- {{ isUploading ? '正在上传' : '本地上传' }}
-
+ 本地上传
@@ -61,13 +60,13 @@
diff --git a/src/views/mp/material/components/UploadFile.vue b/src/views/mp/material/components/UploadFile.vue
index be7e323b..f58084bb 100644
--- a/src/views/mp/material/components/UploadFile.vue
+++ b/src/views/mp/material/components/UploadFile.vue
@@ -6,14 +6,11 @@
:limit="1"
:file-list="fileList"
:data="uploadData"
- :on-progress="(isUploading = true)"
:on-error="onUploadError"
:before-upload="onBeforeUpload"
:on-success="onUploadSuccess"
>
-
- {{ isUploading ? '正在上传' : '点击上传' }}
-
+ 点击上传
@@ -27,14 +24,14 @@ import {
HEADERS,
UPLOAD_URL,
UploadData,
- MaterialType,
+ UploadType,
beforeImageUpload,
beforeVoiceUpload
} from './upload'
const message = useMessage()
-const props = defineProps<{ type: MaterialType }>()
+const props = defineProps<{ type: UploadType }>()
const fileList = ref([])
const emit = defineEmits<{
@@ -42,14 +39,13 @@ const emit = defineEmits<{
}>()
const uploadData: UploadData = reactive({
- type: MaterialType.Image,
+ type: UploadType.Image,
title: '',
introduction: ''
})
-const isUploading = ref(false)
/** 上传前检查 */
-const onBeforeUpload = props.type === MaterialType.Image ? beforeImageUpload : beforeVoiceUpload
+const onBeforeUpload = props.type === UploadType.Image ? beforeImageUpload : beforeVoiceUpload
/** 上传成功处理 */
const onUploadSuccess: UploadProps['onSuccess'] = (res: any) => {
@@ -64,7 +60,6 @@ const onUploadSuccess: UploadProps['onSuccess'] = (res: any) => {
uploadData.introduction = ''
message.notifySuccess('上传成功')
- isUploading.value = false
emit('uploaded')
}
diff --git a/src/views/mp/material/components/UploadVideo.vue b/src/views/mp/material/components/UploadVideo.vue
index 8e374767..9d2fd861 100644
--- a/src/views/mp/material/components/UploadVideo.vue
+++ b/src/views/mp/material/components/UploadVideo.vue
@@ -1,5 +1,5 @@
-
+
选择视频
- 格式支持 MP4,文件大小不超过 10MB
+
+ 格式支持 MP4,文件大小不超过 10MB
+
-
+
取 消
- 提 交
+ 提 交
@@ -56,7 +55,7 @@ import type {
UploadProps,
UploadUserFile
} from 'element-plus'
-import { HEADERS, UploadData, UPLOAD_URL, beforeVideoUpload, MaterialType } from './upload'
+import { HEADERS, UploadData, UPLOAD_URL, UploadType, beforeVideoUpload } from './upload'
const message = useMessage()
@@ -85,18 +84,16 @@ const showDialog = computed({
}
})
-const isUploading = ref(false)
-
const fileList = ref([])
const uploadData: UploadData = reactive({
- type: MaterialType.Video,
+ type: UploadType.Video,
title: '',
introduction: ''
})
-const uploadFormRef = ref()
-const uploadVideoRef = ref()
+const uploadFormRef = ref(null)
+const uploadVideoRef = ref(null)
const submitVideo = () => {
uploadFormRef.value?.validate((valid) => {
@@ -109,7 +106,6 @@ const submitVideo = () => {
/** 上传成功处理 */
const onUploadSuccess: UploadProps['onSuccess'] = (res: any) => {
- isUploading.value = false
if (res.code !== 0) {
message.error('上传出错:' + res.msg)
return false
diff --git a/src/views/mp/material/components/VideoTable.vue b/src/views/mp/material/components/VideoTable.vue
index 81472959..b1e14dd5 100644
--- a/src/views/mp/material/components/VideoTable.vue
+++ b/src/views/mp/material/components/VideoTable.vue
@@ -39,7 +39,7 @@
diff --git a/src/views/mp/menu/index.vue b/src/views/mp/menu/index.vue
index c053a47c..442e33b5 100644
--- a/src/views/mp/menu/index.vue
+++ b/src/views/mp/menu/index.vue
@@ -53,7 +53,7 @@