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.
39 lines
752 B
39 lines
752 B
import { defineStore } from 'pinia'
|
|
import ExpressList from './view/user/ExpressList.vue'
|
|
|
|
export const expressStore = defineStore('express', {
|
|
state: () => {
|
|
return{
|
|
ExpressList:[{
|
|
express_no: "",
|
|
s_datatime: "",
|
|
senderCity: "",
|
|
senderName: "",
|
|
receiverCity: "",
|
|
receiverName: "",
|
|
}]
|
|
}
|
|
},
|
|
getters: {},
|
|
actions: {
|
|
add(item){
|
|
this.ExpressList.push(item)
|
|
},
|
|
modify(item,index){
|
|
this.expressList[index]=item
|
|
},
|
|
deleteByIndex(index){
|
|
this.expressList.splice(index,1)
|
|
}
|
|
},
|
|
persist: {
|
|
enabled: true,
|
|
strategies: [
|
|
{
|
|
key: 'express',
|
|
storage: localStorage,
|
|
paths: ['expressList']
|
|
}
|
|
]
|
|
}
|
|
}) |