Files
zyplayer-doc/zyplayer-doc-ui/wiki-ui-2/src/store/wikiDisplay.js

34 lines
562 B
JavaScript
Raw Normal View History

2023-01-07 00:34:05 +08:00
import { defineStore } from 'pinia'
export const useStoreDisplay = defineStore('wikiDisplay', {
state: () => {
return {
// 左边目录栏宽度
viewMenuWidth: 300,
}
},
})
/**
import { useStore } from '../../../store/wikiDisplay.js'
let store = useStore();
订阅变化
store.$subscribe((mutation, state) => {
if (mutation.events.key === 'lastFavoritePageId') {
}
});
修改
const commentChange = () => {
store.commentShow = !store.commentShow;
}
计算属性
let commentShow = computed(() => store.commentShow);
*/