清理邮件切换时遗留的表单校验提示
This commit is contained in:
parent
f2ff629fcf
commit
873bcfbee8
@ -5,7 +5,7 @@ import {http} from '@/utils/axios'
|
|||||||
import lang from '../../i18n/i18n'
|
import lang from '../../i18n/i18n'
|
||||||
import {prepareReply} from './Reply'
|
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 route = useRoute()
|
||||||
const draftID = ref(0)
|
const draftID = ref(0)
|
||||||
const draftVersion = ref('')
|
const draftVersion = ref('')
|
||||||
@ -137,6 +137,7 @@ export function useDraft({router, groupStore, ruleForm, valueHtml, fileList, edi
|
|||||||
} finally {
|
} finally {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
if (!disposed && sequence === loadSequence) {
|
if (!disposed && sequence === loadSequence) {
|
||||||
|
ruleFormRef.value?.clearValidate()
|
||||||
if (!loadFailed.value) savedSnapshot = snapshot()
|
if (!loadFailed.value) savedSnapshot = snapshot()
|
||||||
isLoading.value = false
|
isLoading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -173,7 +173,7 @@ export function usePage() {
|
|||||||
const pendingFiles = ref(0)
|
const pendingFiles = ref(0)
|
||||||
const readers = new Set()
|
const readers = new Set()
|
||||||
const draft = useDraft({
|
const draft = useDraft({
|
||||||
router, groupStore, ruleForm, valueHtml, fileList, editorRef,
|
router, groupStore, ruleForm, ruleFormRef, valueHtml, fileList, editorRef,
|
||||||
showCcBcc, isSending, pendingFiles, prepareIdentity
|
showCcBcc, isSending, pendingFiles, prepareIdentity
|
||||||
})
|
})
|
||||||
const init = () => {
|
const init = () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user