From 89c3a5636248d1b2decbabf696e2349a8ab6c775 Mon Sep 17 00:00:00 2001
From: tangjinzhou <415800467@qq.com>
Date: Sat, 23 Feb 2019 12:11:54 +0800
Subject: [PATCH] docs: update demo
---
components/menu/demo/SubMenu.vue | 3 +--
components/menu/demo/SubMenu1.vue | 41 +++++++++++++++++++++++++++++++
components/menu/demo/template.md | 9 ++++---
components/vc-menu/SubMenu.jsx | 1 -
4 files changed, 48 insertions(+), 6 deletions(-)
create mode 100644 components/menu/demo/SubMenu1.vue
diff --git a/components/menu/demo/SubMenu.vue b/components/menu/demo/SubMenu.vue
index d0402468a..eeb878e70 100644
--- a/components/menu/demo/SubMenu.vue
+++ b/components/menu/demo/SubMenu.vue
@@ -1,7 +1,6 @@
{{ props.menuInfo.title }}
diff --git a/components/menu/demo/SubMenu1.vue b/components/menu/demo/SubMenu1.vue
new file mode 100644
index 000000000..90a50d692
--- /dev/null
+++ b/components/menu/demo/SubMenu1.vue
@@ -0,0 +1,41 @@
+
+
+
+ {{ menuInfo.title }}
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
diff --git a/components/menu/demo/template.md b/components/menu/demo/template.md
index 44e48ee76..279c2fd0c 100644
--- a/components/menu/demo/template.md
+++ b/components/menu/demo/template.md
@@ -1,13 +1,13 @@
#### 单文件递归菜单
使用单文件方式递归生成菜单。
-因组件内部会动态更改`a-sub-menu`的属性,如果拆分成单文件,无法将属性挂载到`a-sub-menu`上,你需要自行声明属性并挂载。为了实现方便,避免了属性的声明,本示例将其声明为函数式组件,并将所有属性挂载到`a-sub-menu`上。
+因组件内部会动态更改`a-sub-menu`的属性,如果拆分成单文件,无法将属性挂载到`a-sub-menu`上,你需要自行声明属性并挂载。为了方便,避免属性的声明,我们推荐使用函数式组件。
#### Single file recursive menu
Use the single file method to recursively generate menus.
-The properties of `a-sub-menu` are dynamically changed inside the component. If you split the file into a single file and you cannot mount the `props` to `a-sub-menu`, you need to declare the `props` and mount it yourself. For the sake of convenience, the declaration of the `props` is avoided. This example declares it as a functional component and mounts all properties to `a-sub-menu`.
+The properties of `a-sub-menu` are dynamically changed inside the component. If you split the file into a single file and you cannot mount the `props` to `a-sub-menu`, you need to declare the `props` and mount it yourself. For convenience, to avoid the declaration of attributes, we recommend using functional components.
```html
@@ -35,7 +35,10 @@ The properties of `a-sub-menu` are dynamically changed inside the component. If