primevue-mirror/components/lib/sidebar/BaseSidebar.vue

67 lines
1.4 KiB
Vue
Raw Normal View History

2023-05-29 20:37:34 +00:00
<script>
import BaseComponent from 'primevue/basecomponent';
import SidebarStyle from 'primevue/sidebar/style';
2023-05-29 20:37:34 +00:00
export default {
name: 'BaseSidebar',
extends: BaseComponent,
props: {
visible: {
type: Boolean,
default: false
},
position: {
type: String,
default: 'left'
},
header: {
type: null,
default: null
},
2023-05-29 20:37:34 +00:00
baseZIndex: {
type: Number,
default: 0
},
autoZIndex: {
type: Boolean,
default: true
},
dismissable: {
type: Boolean,
default: true
},
showCloseIcon: {
type: Boolean,
default: true
},
closeIcon: {
type: String,
default: undefined
},
modal: {
type: Boolean,
default: true
},
blockScroll: {
type: Boolean,
default: false
}
},
style: SidebarStyle,
provide() {
return {
$parentInstance: this
};
},
watch: {
dismissable(newValue) {
if (newValue) {
this.bindOutsideClickListener();
} else {
this.unbindOutsideClickListener();
}
}
2024-04-19 11:47:39 +00:00
}
2023-05-29 20:37:34 +00:00
};
</script>