25 lines
513 B
TypeScript
25 lines
513 B
TypeScript
|
import { defineStore } from 'pinia'
|
||
|
import { ref } from 'vue'
|
||
|
|
||
|
export type WidgetStr = 'ai' | 'calendar'
|
||
|
export type GlobalStr = 'search' | 'block' | 'adder'
|
||
|
export type SettingStr =
|
||
|
| 'user'
|
||
|
| 'background'
|
||
|
| 'block'
|
||
|
| 'search'
|
||
|
| 'time'
|
||
|
| 'sider'
|
||
|
| 'ai'
|
||
|
| 'dock'
|
||
|
| 'reset'
|
||
|
| 'fallback'
|
||
|
export type RouteStr = '' | `widget-${WidgetStr}` | `global-${GlobalStr}` | `settings-${SettingStr}`
|
||
|
|
||
|
export default defineStore('router', () => {
|
||
|
const path = ref<RouteStr>('')
|
||
|
return {
|
||
|
path
|
||
|
}
|
||
|
})
|