mirror of
https://github.com/jiangrui1994/CloudSaver.git
synced 2026-01-12 16:18:45 +08:00
feat:版本迭代
This commit is contained in:
17
frontend/src/stores/index.ts
Normal file
17
frontend/src/stores/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
interface StoreType {
|
||||
scrollTop: boolean;
|
||||
}
|
||||
|
||||
export const useStore = defineStore("global", {
|
||||
state: (): StoreType => ({
|
||||
scrollTop: true,
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setScrollTop(top: boolean) {
|
||||
this.scrollTop = top;
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user