代客下单修改,登录页面修改,部分页面调整,请求封装调整
This commit is contained in:
24
stores/test.js
Normal file
24
stores/test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { defineStore } from "pinia";
|
||||
export const useTestStore = defineStore("test", {
|
||||
state: () => {
|
||||
return {
|
||||
a: 2,
|
||||
b:10
|
||||
};
|
||||
},
|
||||
getters:{
|
||||
//a+b
|
||||
sum:(state)=>{
|
||||
return state.a+state.b
|
||||
},
|
||||
//sub*2
|
||||
sub:(state)=>{
|
||||
return state.sum*2
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
increment() {
|
||||
this.count++;
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user