diff --git a/packages/collapse/demo/index.vue b/packages/collapse/demo/index.vue index 43dc8ed90..e96a00605 100644 --- a/packages/collapse/demo/index.vue +++ b/packages/collapse/demo/index.vue @@ -2,13 +2,13 @@ - {{ $t('content1') }} - {{ $t('content2') }} + {{ $t('text') }} + {{ $t('text') }} - {{ $t('content3') }} + {{ $t('text') }} @@ -18,24 +18,24 @@ v-model="active2" accordion > - {{ $t('content1') }} - {{ $t('content2') }} - {{ $t('content3') }} + {{ $t('text') }} + {{ $t('text') }} + {{ $t('text') }} -
{{ $t('title1') }}
- {{ $t('content1') }} +
{{ $t('title') + 1 }}
+ {{ $t('text') }}
- {{ $t('content2') }} + {{ $t('text') }}
@@ -48,22 +48,12 @@ export default { 'zh-CN': { accordion: '手风琴', titleSlot: '自定义标题内容', - title1: '有赞微商城', - title2: '有赞零售', - title3: '有赞美业', - content1: '提供多样店铺模板,快速搭建网上商城', - content2: '网店吸粉获客、会员分层营销、一机多种收款,告别经营低效和客户流失', - content3: '线上拓客,随时预约,贴心顺手的开单收银' + text: '代码是写出来给人看的,附带能在机器上运行' }, 'en-US': { accordion: 'Accordion', titleSlot: 'Custom title', - title1: 'Title1', - title2: 'Title2', - title3: 'Title3', - content1: 'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.', - content2: 'When someone walk out your life, let them. They are just making more room for someone else better to walk in.', - content3: 'The world is big and life is short. Live the life the way you want.' + text: 'Content' } }, diff --git a/packages/collapse/en-US.md b/packages/collapse/en-US.md index 74a587250..bbb1bc2a0 100644 --- a/packages/collapse/en-US.md +++ b/packages/collapse/en-US.md @@ -10,6 +10,7 @@ Vue.use(Collapse).use(CollapseItem); ### Usage #### Basic Usage + Use `v-model` to control the name of active panels ```html @@ -31,6 +32,7 @@ export default { ``` #### Accordion + In accordion mode, only one panel can be expanded at the same time. ```html @@ -56,7 +58,7 @@ export default { ```html -
Title1
+
Title1
Content
``` - - ### Collapse Props | Attribute | Description | Type | Default | diff --git a/packages/collapse/test/__snapshots__/demo.spec.js.snap b/packages/collapse/test/__snapshots__/demo.spec.js.snap index 085536a3c..722b3a0a1 100644 --- a/packages/collapse/test/__snapshots__/demo.spec.js.snap +++ b/packages/collapse/test/__snapshots__/demo.spec.js.snap @@ -6,22 +6,22 @@ exports[`renders demo correctly 1`] = `
-
有赞微商城
+
标题1
-
提供多样店铺模板,快速搭建网上商城
+
代码是写出来给人看的,附带能在机器上运行
-
有赞零售
+
标题2
-
有赞美业
+
标题3
@@ -31,22 +31,22 @@ exports[`renders demo correctly 1`] = `
-
有赞微商城
+
标题1
-
提供多样店铺模板,快速搭建网上商城
+
代码是写出来给人看的,附带能在机器上运行
-
有赞零售
+
标题2
-
有赞美业
+
标题3
@@ -57,7 +57,7 @@ exports[`renders demo correctly 1`] = `
-
有赞微商城 +
标题1
@@ -66,7 +66,7 @@ exports[`renders demo correctly 1`] = `
-
有赞零售
+
标题2
内容
diff --git a/packages/collapse/zh-CN.md b/packages/collapse/zh-CN.md index cb007c63f..c1743c88b 100644 --- a/packages/collapse/zh-CN.md +++ b/packages/collapse/zh-CN.md @@ -10,19 +10,14 @@ Vue.use(Collapse).use(CollapseItem); ### 代码演示 #### 基础用法 + 通过`v-model`控制展开的面板列表,`activeNames`为数组格式 ```html - - 提供多样店铺模板,快速搭建网上商城 - - - 网店吸粉获客、会员分层营销、一机多种收款,告别经营低效和客户流失 - - - 线上拓客,随时预约,贴心顺手的开单收银 - + 内容 + 内容 + 内容 ``` @@ -37,19 +32,14 @@ export default { ``` #### 手风琴 + 通过`accordion`可以设置为手风琴模式,最多展开一个面板,此时`activeName`为字符串格式 ```html - - 提供多样店铺模板,快速搭建网上商城 - - - 网店吸粉获客、会员分层营销、一机多种收款,告别经营低效和客户流失 - - - 线上拓客,随时预约,贴心顺手的开单收银 - + 内容 + 内容 + 内容 ``` @@ -68,21 +58,20 @@ export default { ```html -
有赞微商城
- 提供多样店铺模板,快速搭建网上商城 +
标题1
+ 内容
+ - 网店吸粉获客、会员分层营销、一机多种收款,告别经营低效和客户流失 + 内容
``` - - ### Collapse Props | 参数 | 说明 | 类型 | 默认值 | 版本 |