Merge pull request '实现存在多地址时选择实际地址的设置' (#49) from Brunch_DBK into main
commit
237e186172
@ -0,0 +1,22 @@
|
||||
// 引入
|
||||
import {
|
||||
defineStore
|
||||
} from 'pinia';
|
||||
//通过defineStore定义一个store,
|
||||
// defineStore 第一个参数是唯一的
|
||||
export const addressStore = defineStore('addressStore', {
|
||||
state: () => {
|
||||
return {
|
||||
checkedId: '',
|
||||
userName: '',
|
||||
phone: '',
|
||||
area: '',
|
||||
address: ''
|
||||
};
|
||||
},
|
||||
// 也可以这样定义
|
||||
// state: () => ({ count: 0 })
|
||||
actions: {
|
||||
|
||||
},
|
||||
});
|
Loading…
Reference in new issue