mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:03:01 +08:00
[website] Added router guide
This commit is contained in:
parent
9ba4ca10ca
commit
0726ae9e83
19
website/docs/guides/routing.mdx
Normal file
19
website/docs/guides/routing.mdx
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
# Routing
|
||||
|
||||
Routing is a popular way to switch views in an application. This page offers some guidance around how to do that.
|
||||
|
||||
## Vue
|
||||
|
||||
The recommended approach for routing in Vue is [Hash Mode](https://next.router.vuejs.org/guide/essentials/history-mode.html#hash-mode):
|
||||
|
||||
```js
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
//...
|
||||
],
|
||||
})
|
||||
```
|
Loading…
Reference in New Issue
Block a user