mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(collapse): fix translation Error (#12464)
This commit is contained in:
parent
eb8457e026
commit
941f92dbf2
@ -25,9 +25,16 @@ Use `v-model` to control the name of active panels.
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<van-collapse v-model="activeNames">
|
<van-collapse v-model="activeNames">
|
||||||
<van-collapse-item title="Title1" name="1">Content 1</van-collapse-item>
|
<van-collapse-item title="Title1" name="1">
|
||||||
<van-collapse-item title="Title2" name="2">Content 2</van-collapse-item>
|
The code is written for people to see and can be run on a machine.
|
||||||
<van-collapse-item title="Title3" name="3">Content 3</van-collapse-item>
|
</van-collapse-item>
|
||||||
|
<van-collapse-item title="Title2" name="2">
|
||||||
|
Technology is nothing more than the common soul of those who develop it.
|
||||||
|
</van-collapse-item>
|
||||||
|
<van-collapse-item title="Title3" name="3">
|
||||||
|
The frequency of people swearing during code reading is the only measure of
|
||||||
|
code quality.
|
||||||
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -48,9 +55,16 @@ In accordion mode, only one panel can be expanded at the same time.
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<van-collapse v-model="activeName" accordion>
|
<van-collapse v-model="activeName" accordion>
|
||||||
<van-collapse-item title="Title1" name="1">Content 1</van-collapse-item>
|
<van-collapse-item title="Title1" name="1">
|
||||||
<van-collapse-item title="Title2" name="2">Content 2</van-collapse-item>
|
The code is written for people to see and can be run on a machine.
|
||||||
<van-collapse-item title="Title3" name="3">Content 3</van-collapse-item>
|
</van-collapse-item>
|
||||||
|
<van-collapse-item title="Title2" name="2">
|
||||||
|
Technology is nothing more than the common soul of those who develop it.
|
||||||
|
</van-collapse-item>
|
||||||
|
<van-collapse-item title="Title3" name="3">
|
||||||
|
The frequency of people swearing during code reading is the only measure of
|
||||||
|
code quality.
|
||||||
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -71,28 +85,33 @@ Use the `disabled` prop to disable CollapseItem.
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<van-collapse v-model="activeNames">
|
<van-collapse v-model="activeNames">
|
||||||
<van-collapse-item title="Title1" name="1">Content 1</van-collapse-item>
|
<van-collapse-item title="Title1" name="1">
|
||||||
|
The code is written for people to see and can be run on a machine.
|
||||||
|
</van-collapse-item>
|
||||||
<van-collapse-item title="Title2" name="2" disabled>
|
<van-collapse-item title="Title2" name="2" disabled>
|
||||||
Content 2
|
Technology is nothing more than the common soul of those who develop it.
|
||||||
</van-collapse-item>
|
</van-collapse-item>
|
||||||
<van-collapse-item title="Title3" name="3" disabled>
|
<van-collapse-item title="Title3" name="3" disabled>
|
||||||
Content 3
|
The frequency of people swearing during code reading is the only measure of
|
||||||
|
code quality.
|
||||||
</van-collapse-item>
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Custom title
|
### Custom title
|
||||||
|
|
||||||
|
Using `title` slot to custom title.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<van-collapse v-model="activeNames">
|
<van-collapse v-model="activeNames">
|
||||||
<van-collapse-item name="1">
|
<van-collapse-item name="1">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div>Title1 <van-icon name="question-o" /></div>
|
<div>Title1 <van-icon name="question-o" /></div>
|
||||||
</template>
|
</template>
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</van-collapse-item>
|
</van-collapse-item>
|
||||||
<van-collapse-item title="Title2" name="2" icon="shop-o">
|
<van-collapse-item title="Title2" name="2" icon="shop-o">
|
||||||
Content 2
|
Technology is nothing more than the common soul of those who develop it.
|
||||||
</van-collapse-item>
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
```
|
```
|
||||||
@ -114,9 +133,16 @@ Using `toggleAll` method to toggle all items.
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<van-collapse v-model="activeNames" ref="collapse">
|
<van-collapse v-model="activeNames" ref="collapse">
|
||||||
<van-collapse-item title="Title1" name="1">Content 1</van-collapse-item>
|
<van-collapse-item title="Title1" name="1">
|
||||||
<van-collapse-item title="Title2" name="2">Content 2</van-collapse-item>
|
The code is written for people to see and can be run on a machine.
|
||||||
<van-collapse-item title="Title3" name="3">Content 3</van-collapse-item>
|
</van-collapse-item>
|
||||||
|
<van-collapse-item title="Title2" name="2">
|
||||||
|
Technology is nothing more than the common soul of those who develop it.
|
||||||
|
</van-collapse-item>
|
||||||
|
<van-collapse-item title="Title3" name="3">
|
||||||
|
The frequency of people swearing during code reading is the only measure of
|
||||||
|
code quality.
|
||||||
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
|
|
||||||
<van-button type="primary" @click="openAll">Open All</van-button>
|
<van-button type="primary" @click="openAll">Open All</van-button>
|
||||||
|
@ -19,9 +19,11 @@ const t = useTranslate({
|
|||||||
inverse: '全部切换',
|
inverse: '全部切换',
|
||||||
},
|
},
|
||||||
'en-US': {
|
'en-US': {
|
||||||
text1: 'Content 1',
|
text1: 'The code is written for people to see and can be run on a machine.',
|
||||||
text2: 'Content 2',
|
text2:
|
||||||
text3: 'Content 3',
|
'Technology is nothing more than the common soul of those who develop it.',
|
||||||
|
text3:
|
||||||
|
'The frequency of people swearing during code reading is the only measure of code quality.',
|
||||||
accordion: 'Accordion',
|
accordion: 'Accordion',
|
||||||
titleSlot: 'Custom title',
|
titleSlot: 'Custom title',
|
||||||
toggleAll: 'Toggle All',
|
toggleAll: 'Toggle All',
|
||||||
|
@ -31,7 +31,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-collapse-item__wrapper">
|
<div class="van-collapse-item__wrapper">
|
||||||
<div class="van-collapse-item__content">
|
<div class="van-collapse-item__content">
|
||||||
<!--[-->
|
<!--[-->
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -112,7 +112,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-collapse-item__wrapper">
|
<div class="van-collapse-item__wrapper">
|
||||||
<div class="van-collapse-item__content">
|
<div class="van-collapse-item__content">
|
||||||
<!--[-->
|
<!--[-->
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -334,7 +334,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-collapse-item__wrapper">
|
<div class="van-collapse-item__wrapper">
|
||||||
<div class="van-collapse-item__content">
|
<div class="van-collapse-item__content">
|
||||||
<!--[-->
|
<!--[-->
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div class="van-collapse-item__wrapper">
|
<div class="van-collapse-item__wrapper">
|
||||||
<div class="van-collapse-item__content">
|
<div class="van-collapse-item__content">
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -77,7 +77,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div class="van-collapse-item__wrapper">
|
<div class="van-collapse-item__wrapper">
|
||||||
<div class="van-collapse-item__content">
|
<div class="van-collapse-item__content">
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -227,7 +227,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div class="van-collapse-item__wrapper">
|
<div class="van-collapse-item__wrapper">
|
||||||
<div class="van-collapse-item__content">
|
<div class="van-collapse-item__content">
|
||||||
Content 1
|
The code is written for people to see and can be run on a machine.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user