2024-09-09 17:53:07 +08:00
|
|
|
import { defineStore } from 'pinia'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
2024-09-11 13:46:40 +08:00
|
|
|
export type GlobalStr = 'search' | 'block' | 'adder' | 'login'
|
2024-09-09 17:53:07 +08:00
|
|
|
export type SettingStr =
|
|
|
|
| 'user'
|
|
|
|
| 'background'
|
|
|
|
| 'block'
|
|
|
|
| 'search'
|
|
|
|
| 'time'
|
|
|
|
| 'sider'
|
|
|
|
| 'ai'
|
|
|
|
| 'dock'
|
|
|
|
| 'reset'
|
|
|
|
| 'fallback'
|
2024-09-29 15:18:00 +08:00
|
|
|
export type RouteStr = '' | `widget-${string}` | `global-${GlobalStr}` | `settings-${SettingStr}`
|
2024-09-09 17:53:07 +08:00
|
|
|
|
|
|
|
export default defineStore('router', () => {
|
|
|
|
const path = ref<RouteStr>('')
|
|
|
|
return {
|
|
|
|
path
|
|
|
|
}
|
|
|
|
})
|