You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
574 B
22 lines
574 B
import app from '@/app';
|
|
import { OverlayScrollbars } from 'overlayscrollbars';
|
|
|
|
// 滚动条
|
|
app.directive('scrollbar', (el, binding) => {
|
|
const { arg: enable } = binding;
|
|
if (!enable) return;
|
|
const { padding } = binding.modifiers;
|
|
OverlayScrollbars(el, {
|
|
paddingAbsolute: !!padding,
|
|
overflow: {
|
|
x: 'hidden',
|
|
y: 'scroll',
|
|
},
|
|
scrollbars: {
|
|
// theme: 'os-theme-light',
|
|
theme: 'os-theme-dark',
|
|
autoHide: 'leave',
|
|
autoHideDelay: 300,
|
|
},
|
|
});
|
|
});
|
|
|