-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathindex.js
31 lines (25 loc) · 789 Bytes
/
index.js
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
27
28
29
30
31
import PerfectScrollbar from './Scrollbar'
export function install (Vue, settings) {
if (settings) {
if (settings.name && typeof settings.name === 'string') {
PerfectScrollbar.name = settings.name
}
if (settings.options && typeof settings.options === 'object') {
PerfectScrollbar.props.options.default = () => {
return settings.options
}
}
if (settings.tag && typeof settings.tag === 'string') {
PerfectScrollbar.props.tag.default = settings.tag
}
if (settings.watchOptions && typeof settings.watchOptions === 'boolean') {
PerfectScrollbar.props.watchOptions = settings.watchOptions
}
}
Vue.component(
PerfectScrollbar.name,
PerfectScrollbar
)
}
export { PerfectScrollbar }
export default install