From a61f7fdd1114bb0d0cc266bb2b76199bb953c5a5 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 5 Nov 2021 15:10:30 +0800 Subject: [PATCH] doc: tree add accordion demo close #4849 --- .../__tests__/__snapshots__/demo.test.js.snap | 29 +++++ components/tree/demo/accordion.vue | 106 ++++++++++++++++++ components/tree/demo/index.vue | 3 + 3 files changed, 138 insertions(+) create mode 100644 components/tree/demo/accordion.vue diff --git a/components/tree/__tests__/__snapshots__/demo.test.js.snap b/components/tree/__tests__/__snapshots__/demo.test.js.snap index cd9699bc7..c10e45cf8 100644 --- a/components/tree/__tests__/__snapshots__/demo.test.js.snap +++ b/components/tree/__tests__/__snapshots__/demo.test.js.snap @@ -1,5 +1,34 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`renders ./components/tree/demo/accordion.vue correctly 1`] = ` +
+ +
+ +
+
+
+
+
+ parent 1 + +
+
+ parent 2 + +
+
+
+
+ +
+
+`; + exports[`renders ./components/tree/demo/basic.vue correctly 1`] = `
diff --git a/components/tree/demo/accordion.vue b/components/tree/demo/accordion.vue new file mode 100644 index 000000000..f670c439c --- /dev/null +++ b/components/tree/demo/accordion.vue @@ -0,0 +1,106 @@ + +--- +order: 0 +title: + zh-CN: 手风琴模式 + en-US: Accordion +--- + +## zh-CN + +同一级的节点,每次只能展开一个 + +## en-US + +Nodes of the same level can only be expanded one + + + + diff --git a/components/tree/demo/index.vue b/components/tree/demo/index.vue index ee14de182..a31d1f5c1 100644 --- a/components/tree/demo/index.vue +++ b/components/tree/demo/index.vue @@ -11,6 +11,7 @@ +