mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3965 - For ScrollTop
This commit is contained in:
parent
ff2230736d
commit
4fc5d0918e
2 changed files with 4 additions and 4 deletions
|
@ -1,17 +1,17 @@
|
|||
<template>
|
||||
<transition name="p-scrolltop" appear @enter="onEnter" @after-leave="onAfterLeave">
|
||||
<button v-if="visible" :ref="containerRef" :class="cx('root')" @click="onClick" type="button" :aria-label="scrollTopAriaLabel" v-bind="ptm('root')">
|
||||
<slot name="icon">
|
||||
<component :is="icon ? 'span' : 'ChevronUpIcon'" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||
<slot name="icon" :class="cx('icon')">
|
||||
<component :is="icon ? 'span' : 'ChevronUpIcon'" :class="[cx('icon'), icon]" v-bind="ptm('icon')" />
|
||||
</slot>
|
||||
</button>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseScrollTop from './BaseScrollTop.vue';
|
||||
import ChevronUpIcon from 'primevue/icons/chevronup';
|
||||
import { DomHandler, ZIndexUtils } from 'primevue/utils';
|
||||
import BaseScrollTop from './BaseScrollTop.vue';
|
||||
|
||||
export default {
|
||||
name: 'ScrollTop',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue