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.
25 lines
388 B
25 lines
388 B
import { createPinia, defineStore} from 'pinia'
|
|
const store = createPinia()
|
|
|
|
export const useIndexStore = defineStore('index', {
|
|
state: () => ({
|
|
screen:{
|
|
tops: 47,
|
|
height: 40,
|
|
total: 87
|
|
}
|
|
|
|
}),
|
|
//计算属性:(基于state派生的数据)
|
|
getters: {
|
|
|
|
},
|
|
// 修改状态的逻辑
|
|
actions: {
|
|
setScreen(data){
|
|
this.screen = data
|
|
},
|
|
}
|
|
})
|
|
|
|
export default store |