content safety
This commit is contained in:
parent
29f75938bb
commit
ed4fee935d
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<NForm :model="record" inline :rules="rules">
|
<NForm :model="record" inline :rules="rules">
|
||||||
<NFormItem :label="t('records.recordType')">
|
<NFormItem :label="t('records.recordType')">
|
||||||
<NSelect v-model:value="record.record_type" :options="recordTypeOptions" />
|
<NSelect v-model:value="record.record_type" :options="recordTypeOptions" @update:value="clearRecordContent"/>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem :label="t('records.name')" path="name">
|
<NFormItem :label="t('records.name')" path="name">
|
||||||
<NInput v-model:value="record.name" />
|
<NInput v-model:value="record.name" />
|
||||||
@ -121,6 +121,7 @@ import {
|
|||||||
type SRVRecord,
|
type SRVRecord,
|
||||||
type TXTRecord,
|
type TXTRecord,
|
||||||
type MXRecord,
|
type MXRecord,
|
||||||
|
type RecordT,
|
||||||
} from '@/stores/records';
|
} from '@/stores/records';
|
||||||
import { Check, Times } from '@vicons/fa';
|
import { Check, Times } from '@vicons/fa';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
@ -151,6 +152,10 @@ const rules = {
|
|||||||
}
|
}
|
||||||
} as FormRules
|
} as FormRules
|
||||||
|
|
||||||
|
function clearRecordContent() {
|
||||||
|
props.record.content = {} as RecordT
|
||||||
|
}
|
||||||
|
|
||||||
async function confirm() {
|
async function confirm() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user