1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| <template>
| <div><slot></slot></div>
| </template>
|
| <style src="./perfect-scrollbar.scss" lang="scss"></style>
|
| <script>
| import PerfectScrollbar from 'perfect-scrollbar'
|
| export default {
| name: 'perfect-scrollbar',
| props: {
| options: {
| default: () => {}
| }
| },
| mounted () {
| this.$ps = new PerfectScrollbar(this.$el, this.options)
| },
| beforeDestroy () {
| if (!this.$ps) return
| this.$ps.destroy()
| this.$ps = null
| }
| }
| </script>
|
|