1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| import { defineStore } from 'pinia'
| import { GET_USERLIST } from '@/store/types.store'
| import { _itemUserOptionalList } from '@/service/quotes.api'
| export const useMyListStore = defineStore('myList', {
| // state 持久化
| persist: true,
| state: () => ('myList', {
| userList: []
| }),
| getters: {
| },
| actions: {
| async [GET_USERLIST]() { // 发送请求获取信息
| _itemUserOptionalList().then((res) => {
| this.userList = res
| })
| },
| },
| })
|
|