Skip to content

Commit

Permalink
Merge pull request #12379 from nextcloud/chore/vue3-remove-$listeners
Browse files Browse the repository at this point in the history
chore(vue3): replace $listeners with explicit emit
  • Loading branch information
ShGKme authored May 16, 2024
2 parents 31b656b + 34a1841 commit 4f29228
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/components/BreakoutRoomsEditor/BreakoutRoomsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<template>
<NcModal :container="container"
:class="{'modal-mask__participants-step': isEditingParticipants}"
v-on="$listeners">
@close="$emit('close')">
<div class="breakout-rooms-editor"
:class="{'breakout-rooms-editor__participants-step': isEditingParticipants}">
<h2>{{ modalTitle }}</h2>
Expand Down Expand Up @@ -64,12 +64,12 @@
<template v-else>
<BreakoutRoomsParticipantsEditor :token="token"
:room-number="amount"
v-on="$listeners"
@close="$emit('close')"
@back="isEditingParticipants = false"
@create-rooms="handleCreateRooms" />
</template>
</div>
</ncmodal>
</NcModal>
</template>

<script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/BreakoutRoomsEditor/SendMessageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<template>
<NcModal ref="modal"
:container="container"
v-on="$listeners">
@close="$emit('close')">
<div class="send-message-dialog">
<h2 class="send-message-dialog__title">
{{ dialogTitle }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/NewMessage/NewMessagePollEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<NcModal size="small"
:close-on-click-outside="!isFilled"
:container="container"
v-on="$listeners">
@close="$emit('close')">
<div class="poll-editor">
<h2>{{ t('spreed', 'Create new poll') }}</h2>

<!-- Poll Question -->
<p class="poll-editor__caption">
{{ t('spreed', 'Question') }}
</p>
<NcTextField v-model="pollQuestion" :label="t('spreed', 'Ask a question')" v-on="$listeners" />
<NcTextField v-model="pollQuestion" :label="t('spreed', 'Ask a question')" />

<!-- Poll options -->
<p class="poll-editor__caption">
Expand Down
4 changes: 2 additions & 2 deletions src/components/PermissionsEditor/PermissionsEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<template>
<NcModal size="small"
:container="container"
v-on="$listeners">
@close="$emit('close')">
<div class="wrapper">
<template v-if="!loading">
<!-- eslint-disable-next-line vue/no-v-html -->
Expand Down Expand Up @@ -116,7 +116,7 @@ export default {
default: false,
},
},
emits: ['submit'],
emits: ['close', 'submit'],

data() {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@
<BreakoutRoomsParticipantsEditor :token="mainToken"
:breakout-rooms="breakoutRooms"
:is-creating-rooms="false"
@close="closeParticipantsEditor"
v-on="$listeners" />
@close="closeParticipantsEditor" />
</div>
</NcModal>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="wrapper">
<PermissionEditor :display-name="displayName"
:permissions="permissions"
v-on="$listeners"
@close="$emit('close')"
@submit="handleSubmitPermissions" />
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->

<template>
<NcModal size="large" :container="container" v-on="$listeners">
<NcModal size="large" :container="container" @close="$emit('close')">
<div class="shared-items-browser">
<div class="shared-items-browser__navigation">
<template v-for="type in sharedItemsOrder">
Expand Down Expand Up @@ -64,7 +64,7 @@ export default {
},
},

emits: ['update:active-tab'],
emits: ['close', 'update:active-tab'],

setup() {
const sharedItemsStore = useSharedItemsStore()
Expand Down
10 changes: 2 additions & 8 deletions src/components/UIShared/TransitionWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
<template>
<TransitionGroup v-if="group"
class="transition-group"
:name="name"
v-bind="$attrs"
v-on="$listeners">
:name="name">
<slot />
</TransitionGroup>
<Transition v-else
:name="name"
v-bind="$attrs"
v-on="$listeners">
:name="name">
<slot />
</Transition>
</template>
Expand All @@ -23,8 +19,6 @@
export default {
name: 'TransitionWrapper',

inheritAttrs: false,

props: {
name: {
type: String,
Expand Down

0 comments on commit 4f29228

Please sign in to comment.