fix(frontend): fix build error (#17050)
This commit is contained in:
parent
3fe0477cac
commit
404fca6c2d
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, useTemplateRef } from 'vue';
|
import { ref, useTemplateRef } from 'vue';
|
||||||
import type { Form } from '@/utility/form.js';
|
import type { Form } from '@/utility/form.js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkForm from '@/components/MkForm.vue';
|
import MkForm from '@/components/MkForm.vue';
|
||||||
|
|
@ -47,7 +47,7 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const dialog = useTemplateRef('dialog');
|
const dialog = useTemplateRef('dialog');
|
||||||
|
|
||||||
const values = reactive((() => {
|
const values = ref((() => {
|
||||||
const obj: Record<string, any> = {};
|
const obj: Record<string, any> = {};
|
||||||
for (const item in props.form) {
|
for (const item in props.form) {
|
||||||
if ('default' in props.form[item]) {
|
if ('default' in props.form[item]) {
|
||||||
|
|
@ -61,7 +61,7 @@ const values = reactive((() => {
|
||||||
|
|
||||||
function ok() {
|
function ok() {
|
||||||
emit('done', {
|
emit('done', {
|
||||||
result: values,
|
result: values.value,
|
||||||
});
|
});
|
||||||
dialog.value?.close();
|
dialog.value?.close();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,10 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const dialog = useTemplateRef('dialog');
|
const dialog = useTemplateRef('dialog');
|
||||||
|
|
||||||
const settings = reactive<Record<string, any>>(deepClone(props.currentSettings));
|
const settings = ref<Record<string, any>>(deepClone(props.currentSettings));
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
emit('saved', deepClone(settings));
|
emit('saved', deepClone(settings.value));
|
||||||
dialog.value?.close();
|
dialog.value?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue