mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
added basic plugin support
This commit is contained in:
@@ -28,7 +28,7 @@ const props = defineProps({
|
||||
closeAfterDelete: {default: true},
|
||||
})
|
||||
|
||||
const editorComponent = shallowRef(defineAsyncComponent(() => import(`@/components/model_editors/${getGenericModelFromString(props.model, t).model.name}Editor.vue`)))
|
||||
const editorComponent = shallowRef(getGenericModelFromString(props.model, t).model.editorComponent)
|
||||
|
||||
const dialog = defineModel<Boolean|undefined>({default: undefined})
|
||||
const dialogActivator = (dialog.value !== undefined) ? undefined : props.activator
|
||||
@@ -40,7 +40,7 @@ const editingObjChangedState = ref(false)
|
||||
* because of this watch prop changes and update manually if prop is changed
|
||||
*/
|
||||
watch(() => props.model, () => {
|
||||
editorComponent.value = defineAsyncComponent(() => import(`@/components/model_editors/${getGenericModelFromString(props.model, t).model.name}Editor.vue`))
|
||||
editorComponent.value = getGenericModelFromString(props.model, t).model.editorComponent
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user