diff --git a/docs/guide/route.md b/docs/guide/route.md
index 0200633b..ed2ff680 100644
--- a/docs/guide/route.md
+++ b/docs/guide/route.md
@@ -106,7 +106,7 @@ pages
```
**需要注意的是,满足以下任意规则的文件不会被注册为路由**:
-- 不是 `.vue` 文件
+- 不是 `.vue .jsx` 文件
- `components` 目录中的文件
@@ -184,6 +184,10 @@ const router = new VueRouter({
]
})
```
+
+
+
+
在 Fes.js 里约定在 `.vue`单文件组件中的 `config`区块 为 `meta` 配置。如果 `pages/a.vue` 中有如下配置:
```vue
@@ -193,6 +197,34 @@ const router = new VueRouter({
}
```
+
+
+
+
+
+```jsx
+import { defineRouteMeta, useRoute } from '@fesjs/fes';
+defineRouteMeta({
+ name: "store",
+ title: "vuex测试"
+})
+```
+
+
+
+
+```tsx
+import { defineRouteMeta, useRoute } from '@fesjs/fes';
+defineRouteMeta({
+ name: "store",
+ title: "vuex测试"
+})
+```
+
+
+
+
+
则编译后的路由配置为:
```js{5-8}
[
diff --git a/docs/reference/plugin/plugins/layout.md b/docs/reference/plugin/plugins/layout.md
index d3f5165d..238031c1 100644
--- a/docs/reference/plugin/plugins/layout.md
+++ b/docs/reference/plugin/plugins/layout.md
@@ -76,6 +76,16 @@ export default {
## 配置
+### keep-alive
+从 4.0.7 开始支持配置路由页面缓存:
+```
+
+{
+ "keep-alive": true
+}
+
+```
+
### 编译时配置
在 `.fes.js` 中配置:
```js
diff --git a/docs/zh/guide/route.md b/docs/zh/guide/route.md
index 2a5757d2..ed2ff680 100644
--- a/docs/zh/guide/route.md
+++ b/docs/zh/guide/route.md
@@ -184,6 +184,10 @@ const router = new VueRouter({
]
})
```
+
+
+
+
在 Fes.js 里约定在 `.vue`单文件组件中的 `config`区块 为 `meta` 配置。如果 `pages/a.vue` 中有如下配置:
```vue
@@ -193,6 +197,34 @@ const router = new VueRouter({
}
```
+
+
+
+
+
+```jsx
+import { defineRouteMeta, useRoute } from '@fesjs/fes';
+defineRouteMeta({
+ name: "store",
+ title: "vuex测试"
+})
+```
+
+
+
+
+```tsx
+import { defineRouteMeta, useRoute } from '@fesjs/fes';
+defineRouteMeta({
+ name: "store",
+ title: "vuex测试"
+})
+```
+
+
+
+
+
则编译后的路由配置为:
```js{5-8}
[
diff --git a/docs/zh/reference/plugin/plugins/layout.md b/docs/zh/reference/plugin/plugins/layout.md
index d3f5165d..238031c1 100644
--- a/docs/zh/reference/plugin/plugins/layout.md
+++ b/docs/zh/reference/plugin/plugins/layout.md
@@ -76,6 +76,16 @@ export default {
## 配置
+### keep-alive
+从 4.0.7 开始支持配置路由页面缓存:
+```
+
+{
+ "keep-alive": true
+}
+
+```
+
### 编译时配置
在 `.fes.js` 中配置:
```js