mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
14 lines
370 B
TypeScript
14 lines
370 B
TypeScript
import { useBodyScroll } from '@/hooks';
|
|
import { useAppStore } from '../modules';
|
|
|
|
/** 订阅app store */
|
|
export default function subscribeAppStore() {
|
|
const app = useAppStore();
|
|
const { scrollBodyHandler } = useBodyScroll();
|
|
|
|
app.$subscribe((_mutation, state) => {
|
|
// 弹窗打开时禁止滚动条
|
|
scrollBodyHandler(state.settingDrawerVisible);
|
|
});
|
|
}
|