清理邮件切换时遗留的表单校验提示
Some checks are pending
Security Checks / security (push) Waiting to run

This commit is contained in:
smail 2026-09-27 22:05:53 +08:00
parent 61f72e67b1
commit a4c5855b2a
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import {http} from '@/utils/axios'
import lang from '../../i18n/i18n'
import {prepareReply} from './Reply'
export function useDraft({router, groupStore, ruleForm, valueHtml, fileList, editorRef, showCcBcc, isSending, pendingFiles, prepareIdentity}) {
export function useDraft({router, groupStore, ruleForm, ruleFormRef, valueHtml, fileList, editorRef, showCcBcc, isSending, pendingFiles, prepareIdentity}) {
const route = useRoute()
const draftID = ref(0)
const draftVersion = ref('')
@ -137,6 +137,7 @@ export function useDraft({router, groupStore, ruleForm, valueHtml, fileList, edi
} finally {
await nextTick()
if (!disposed && sequence === loadSequence) {
ruleFormRef.value?.clearValidate()
if (!loadFailed.value) savedSnapshot = snapshot()
isLoading.value = false
}

View File

@ -173,7 +173,7 @@ export function usePage() {
const pendingFiles = ref(0)
const readers = new Set()
const draft = useDraft({
router, groupStore, ruleForm, valueHtml, fileList, editorRef,
router, groupStore, ruleForm, ruleFormRef, valueHtml, fileList, editorRef,
showCcBcc, isSending, pendingFiles, prepareIdentity
})
const init = () => {