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>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, useTemplateRef } from 'vue';
|
||||
import { ref, useTemplateRef } from 'vue';
|
||||
import type { Form } from '@/utility/form.js';
|
||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||
import MkForm from '@/components/MkForm.vue';
|
||||
|
|
@ -47,7 +47,7 @@ const emit = defineEmits<{
|
|||
|
||||
const dialog = useTemplateRef('dialog');
|
||||
|
||||
const values = reactive((() => {
|
||||
const values = ref((() => {
|
||||
const obj: Record<string, any> = {};
|
||||
for (const item in props.form) {
|
||||
if ('default' in props.form[item]) {
|
||||
|
|
@ -61,7 +61,7 @@ const values = reactive((() => {
|
|||
|
||||
function ok() {
|
||||
emit('done', {
|
||||
result: values,
|
||||
result: values.value,
|
||||
});
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ const emit = defineEmits<{
|
|||
|
||||
const dialog = useTemplateRef('dialog');
|
||||
|
||||
const settings = reactive<Record<string, any>>(deepClone(props.currentSettings));
|
||||
const settings = ref<Record<string, any>>(deepClone(props.currentSettings));
|
||||
|
||||
function save() {
|
||||
emit('saved', deepClone(settings));
|
||||
emit('saved', deepClone(settings.value));
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue