2023-05-24 10:09:45 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import ScrollTopStyle from 'primevue/scrolltop/style';
|
2023-05-24 10:09:45 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseScrollTop',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
target: {
|
|
|
|
type: String,
|
|
|
|
default: 'window'
|
|
|
|
},
|
|
|
|
threshold: {
|
|
|
|
type: Number,
|
|
|
|
default: 400
|
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
behavior: {
|
|
|
|
type: String,
|
|
|
|
default: 'smooth'
|
2024-04-15 08:08:42 +00:00
|
|
|
},
|
|
|
|
buttonProps: {
|
|
|
|
type: Object,
|
|
|
|
default: () => {
|
|
|
|
return { severity: 'secondary' };
|
|
|
|
}
|
2023-05-24 10:09:45 +00:00
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: ScrollTopStyle,
|
2023-05-30 12:28:04 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-24 10:09:45 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|