mirror of
https://github.com/jiangrui1994/CloudSaver.git
synced 2026-01-10 07:08:46 +08:00
18 lines
280 B
TypeScript
18 lines
280 B
TypeScript
import { defineStore } from "pinia";
|
|
|
|
interface StoreType {
|
|
scrollTop: boolean;
|
|
}
|
|
|
|
export const useStore = defineStore("global", {
|
|
state: (): StoreType => ({
|
|
scrollTop: true,
|
|
}),
|
|
|
|
actions: {
|
|
setScrollTop(top: boolean) {
|
|
this.scrollTop = top;
|
|
},
|
|
},
|
|
});
|