Remove deprecated slot syntax

- Update slot to use syntax supported after Vue 2.6
This commit is contained in:
mattwr18 2019-11-04 21:59:37 +01:00
parent 57b0a339c6
commit 288787bcb9
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<dropdown class="avatar-menu" offset="8" :placement="placement"> <dropdown class="avatar-menu" offset="8" :placement="placement">
<template slot="default" slot-scope="{ toggleMenu }"> <template #default="{ toggleMenu }">
<a <a
class="avatar-menu-trigger" class="avatar-menu-trigger"
:href=" :href="
@ -15,7 +15,7 @@
<ds-icon size="xx-small" name="angle-down" /> <ds-icon size="xx-small" name="angle-down" />
</a> </a>
</template> </template>
<template slot="popover" slot-scope="{ closeMenu }"> <template #popover="{ closeMenu }">
<div class="avatar-menu-popover"> <div class="avatar-menu-popover">
{{ $t('login.hello') }} {{ $t('login.hello') }}
<b>{{ userName }}</b> <b>{{ userName }}</b>

View File

@ -1,6 +1,6 @@
<template> <template>
<ds-table v-if="notifications && notifications.length" :data="notifications" :fields="fields"> <ds-table v-if="notifications && notifications.length" :data="notifications" :fields="fields">
<template slot="icon" slot-scope="scope"> <template #icon="scope">
<ds-icon <ds-icon
v-if="scope.row.from.post" v-if="scope.row.from.post"
name="comment" name="comment"
@ -12,7 +12,7 @@
v-tooltip="{ content: $t('notifications.post'), placement: 'right' }" v-tooltip="{ content: $t('notifications.post'), placement: 'right' }"
/> />
</template> </template>
<template slot="user" slot-scope="scope"> <template #user="scope">
<ds-space margin-bottom="base"> <ds-space margin-bottom="base">
<client-only> <client-only>
<hc-user <hc-user
@ -27,7 +27,7 @@
{{ $t(`notifications.reason.${scope.row.reason}`) }} {{ $t(`notifications.reason.${scope.row.reason}`) }}
</ds-text> </ds-text>
</template> </template>
<template slot="post" slot-scope="scope"> <template #post="scope">
<nuxt-link <nuxt-link
class="notification-mention-post" class="notification-mention-post"
:class="{ 'notification-status': scope.row.read }" :class="{ 'notification-status': scope.row.read }"
@ -41,7 +41,7 @@
<b>{{ scope.row.from.title || scope.row.from.post.title | truncate(50) }}</b> <b>{{ scope.row.from.title || scope.row.from.post.title | truncate(50) }}</b>
</nuxt-link> </nuxt-link>
</template> </template>
<template slot="content" slot-scope="scope"> <template #content="scope">
<b :class="{ 'notification-status': scope.row.read }"> <b :class="{ 'notification-status': scope.row.read }">
{{ scope.row.from.contentExcerpt | removeHtml }} {{ scope.row.from.contentExcerpt | removeHtml }}
</b> </b>