Remove hacky active state in route modals

This commit is contained in:
rijkvanzanten
2020-08-05 13:03:57 -04:00
parent ff2292dd5c
commit 79903cacef
2 changed files with 4 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
<template>
<v-dialog :active="dialogActive" @toggle="close">
<v-dialog :active="true" @toggle="close">
<v-card>
<v-card-title>{{ $t('add_new_file') }}</v-card-title>
<v-card-text>
@@ -24,14 +24,9 @@ export default defineComponent({
},
},
setup(props, { emit }) {
const dialogActive = ref(false);
onMounted(() => dialogActive.value = true);
return { onUpload, close, dialogActive };
return { onUpload, close };
function close() {
dialogActive.value = false;
router.push('/files');
}

View File

@@ -1,6 +1,6 @@
<template>
<v-modal
:active="active"
:active="true"
:title="field === '+' ? $t('creating_new_field') : $t('updating_field_field', { field: existingField.name })"
persistent
>
@@ -111,13 +111,6 @@ export default defineComponent({
return type;
});
// This makes sure we still see the enter animation
/** @todo fix this in the transition */
const active = ref(false);
onMounted(() => {
active.value = true;
});
initLocalStore(props.collection, props.field, localType.value);
const { tabs, currentTab } = useTabs();
@@ -125,7 +118,7 @@ export default defineComponent({
const saving = ref(false);
return {
active,
// active,
tabs,
currentTab,
fieldData: state.fieldData,