51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
export const usePolicyStore = defineStore('policy', {
|
|
state: (): {
|
|
policy: {
|
|
name: string
|
|
description: string
|
|
url: string
|
|
type: '国家' | '地方' | '企业'
|
|
}[]
|
|
} => ({
|
|
|
|
policy: [
|
|
{
|
|
name: '政策1',
|
|
url: 'https://www.baidu.com/',
|
|
description: '这是政策1的描述',
|
|
type: '国家',
|
|
},
|
|
{
|
|
name: '政策2',
|
|
url: 'https://cn.bing.com/',
|
|
description: '这是政策1的描述',
|
|
type: '国家',
|
|
},
|
|
{
|
|
name: '政策3',
|
|
url: 'https://cn.bing.com/',
|
|
description: '这是政策1的描述',
|
|
type: '国家',
|
|
},
|
|
{
|
|
name: '政策2',
|
|
url: 'https://cn.bing.com/',
|
|
description: '这是政策2的描述',
|
|
type: '企业',
|
|
},
|
|
{
|
|
name: '政策3',
|
|
url: 'https://cn.bing.com/',
|
|
description: '这是政策3的描述',
|
|
type: '地方',
|
|
},
|
|
],
|
|
}),
|
|
// persist: {
|
|
// storage: persistedState.sessionStorage,
|
|
// },
|
|
})
|
|
|
|
if (import.meta.hot)
|
|
import.meta.hot.accept(acceptHMRUpdate(usePolicyStore, import.meta.hot))
|