feat: add upload method selection prompt to file upload settings

This commit is contained in:
wxg0103 2025-12-02 11:40:01 +08:00
parent ac97e6026f
commit 16f4d2a721
4 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,7 @@ export default {
existingExtensionsTip: 'The following extensions already exist',
localUpload: 'Local Files',
urlUpload: 'URL',
uploadMethodTip: 'Please select upload method',
},
status: {
label: 'Status',

View File

@ -62,6 +62,7 @@ export default {
existingExtensionsTip: '文件后缀已存在',
localUpload: '本地文件',
urlUpload: 'URL 地址',
uploadMethodTip: '请选择上传方式'
},
status: {
label: '状态',

View File

@ -60,6 +60,7 @@ export default {
existingExtensionsTip: '文件後綴已存在',
localUpload: '本地文件',
urlUpload: 'URL 地址',
uploadMethodTip: '請選擇上傳方式'
},
status: {
label: '狀態',

View File

@ -341,6 +341,10 @@ const handleInputConfirm = () => {
async function submit() {
const formEl = fieldFormRef.value
if (!form_data.value.local_upload && !form_data.value.url_upload) {
MsgWarning(t('common.fileUpload.uploadMethodTip'))
return
}
if (!formEl) return
await formEl.validate().then(() => {
const formattedData = cloneDeep(form_data.value)