mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
fix: ConfigPanels event bubbling
This commit is contained in:
parent
6be1609f10
commit
9ec1fbd714
4 changed files with 5 additions and 9 deletions
|
@ -6,7 +6,7 @@
|
|||
validation,
|
||||
serverError: panel.serverError,
|
||||
}"
|
||||
@apply="onApply"
|
||||
@submit="onApply"
|
||||
:no-footer="!panel.hasApplyButton"
|
||||
>
|
||||
<slot name="tab-top" />
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
v-if="routes_.length > 1"
|
||||
v-bind="{ panels, forms, v: v$, ...$attrs }"
|
||||
:routes="routes_"
|
||||
@apply="$emit('apply', $event)"
|
||||
>
|
||||
<template #tab-top>
|
||||
<slot name="tab-top" />
|
||||
|
|
|
@ -16,11 +16,7 @@
|
|||
|
||||
<!-- Bind extra props to the child view and forward child events to parent -->
|
||||
<RouterView v-slot="{ Component }">
|
||||
<Component
|
||||
v-bind="$attrs"
|
||||
:is="Component"
|
||||
@apply="$emit('apply', $event)"
|
||||
>
|
||||
<Component v-bind="$attrs" :is="Component">
|
||||
<template #tab-top>
|
||||
<slot name="tab-top" />
|
||||
</template>
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
export default {
|
||||
name: 'AbstractForm',
|
||||
|
||||
inheritAttrs: false,
|
||||
|
||||
props: {
|
||||
id: { type: String, default: 'ynh-form' },
|
||||
submitText: { type: String, default: null },
|
||||
|
@ -60,8 +62,7 @@ export default {
|
|||
v.$touch()
|
||||
if (v.$pending || v.$errors.length) return
|
||||
}
|
||||
// Weird bug with `INSTANCE_LISTENERS: true` with 'submit' event (double exec before of conflict with native submit event?)
|
||||
this.$emit('apply')
|
||||
this.$emit('submit')
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue