docs: prettier all markdown files
This commit is contained in:
+34
-32
@@ -20,7 +20,9 @@ Use `v-model` to control the name of active panels
|
||||
<van-collapse v-model="activeNames">
|
||||
<van-collapse-item title="Title1" name="1">Content</van-collapse-item>
|
||||
<van-collapse-item title="Title2" name="2">Content</van-collapse-item>
|
||||
<van-collapse-item title="Title3" name="3" disabled>Content</van-collapse-item>
|
||||
<van-collapse-item title="Title3" name="3" disabled
|
||||
>Content</van-collapse-item
|
||||
>
|
||||
</van-collapse>
|
||||
```
|
||||
|
||||
@@ -28,9 +30,9 @@ Use `v-model` to control the name of active panels
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeNames: ['1']
|
||||
activeNames: ['1'],
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -50,9 +52,9 @@ In accordion mode, only one panel can be expanded at the same time.
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: '1'
|
||||
activeName: '1',
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -76,9 +78,9 @@ export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeNames: ['1']
|
||||
activeNames: ['1'],
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -87,40 +89,40 @@ export default {
|
||||
### Collapse Props
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| v-model | Names of current active panels | accordion mode: *number \| string*<br>non-accordion mode:*(number \| string)[]* | - |
|
||||
| accordion | Whether to be accordion mode | *boolean* | `false` |
|
||||
| border | Whether to show outer border | *boolean* | `true` |
|
||||
| --- | --- | --- | --- |
|
||||
| v-model | Names of current active panels | accordion mode: _number \| string_<br>non-accordion mode:_(number \| string)[]_ | - |
|
||||
| accordion | Whether to be accordion mode | _boolean_ | `false` |
|
||||
| border | Whether to show outer border | _boolean_ | `true` |
|
||||
|
||||
### Collapse Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
|------|------|------|
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------- | ----------- |
|
||||
| change | Triggered when switch panel | activeNames |
|
||||
|
||||
### CollapseItem Props
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| name | Name | *number \| string* | `index` |
|
||||
| icon | Left Icon | *string* | - |
|
||||
| size | Title size,can be set to `large` | *string* | - |
|
||||
| title | Title | *number \| string* | - |
|
||||
| value | Right text | *number \| string* | - |
|
||||
| label | Description below the title | *string* | - |
|
||||
| border | Whether to show inner border | *boolean* | `true` |
|
||||
| disabled | Whether to disabled collapse | *boolean* | `false` |
|
||||
| is-link | Whether to show link icon | *boolean* | `true` |
|
||||
| title-class | Title className | *string* | - |
|
||||
| value-class | Value className | *string* | - |
|
||||
| label-class | Label className | *string* | - |
|
||||
| --- | --- | --- | --- |
|
||||
| name | Name | _number \| string_ | `index` |
|
||||
| icon | Left Icon | _string_ | - |
|
||||
| size | Title size,can be set to `large` | _string_ | - |
|
||||
| title | Title | _number \| string_ | - |
|
||||
| value | Right text | _number \| string_ | - |
|
||||
| label | Description below the title | _string_ | - |
|
||||
| border | Whether to show inner border | _boolean_ | `true` |
|
||||
| disabled | Whether to disabled collapse | _boolean_ | `false` |
|
||||
| is-link | Whether to show link icon | _boolean_ | `true` |
|
||||
| title-class | Title className | _string_ | - |
|
||||
| value-class | Value className | _string_ | - |
|
||||
| label-class | Label className | _string_ | - |
|
||||
|
||||
### CollapseItem Slots
|
||||
|
||||
| Name | Description |
|
||||
|------|------|
|
||||
| default | Content |
|
||||
| value | Custom value |
|
||||
| icon | Custom icon |
|
||||
| title | Custom title |
|
||||
| Name | Description |
|
||||
| ---------- | ----------------- |
|
||||
| default | Content |
|
||||
| value | Custom value |
|
||||
| icon | Custom icon |
|
||||
| title | Custom title |
|
||||
| right-icon | Custom right icon |
|
||||
|
||||
@@ -28,9 +28,9 @@ Vue.use(CollapseItem);
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeNames: ['1']
|
||||
activeNames: ['1'],
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -50,9 +50,9 @@ export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: '1'
|
||||
activeName: '1',
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -76,9 +76,9 @@ export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeNames: ['1']
|
||||
activeNames: ['1'],
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
@@ -87,40 +87,40 @@ export default {
|
||||
### Collapse Props
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| v-model | 当前展开面板的 name | 手风琴模式:*number \| string*<br>非手风琴模式:*(number \| string)[]* | - |
|
||||
| accordion | 是否开启手风琴模式 | *boolean* | `false` |
|
||||
| border | 是否显示外边框 | *boolean* | `true` |
|
||||
| --- | --- | --- | --- |
|
||||
| v-model | 当前展开面板的 name | 手风琴模式:_number \| string_<br>非手风琴模式:_(number \| string)[]_ | - |
|
||||
| accordion | 是否开启手风琴模式 | _boolean_ | `false` |
|
||||
| border | 是否显示外边框 | _boolean_ | `true` |
|
||||
|
||||
### Collapse Events
|
||||
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
|------|------|------|
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
| ------ | -------------- | ---------------------------------------- |
|
||||
| change | 切换面板时触发 | activeNames: 类型与 v-model 绑定的值一致 |
|
||||
|
||||
### CollapseItem Props
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| name | 唯一标识符,默认为索引值 | *number \| string* | `index` |
|
||||
| icon | 标题栏左侧[图标名称](#/zh-CN/icon)或图片链接 | *string* | - |
|
||||
| size | 标题栏大小,可选值为 `large` | *string* | - |
|
||||
| title | 标题栏左侧内容 | *number \| string* | - |
|
||||
| value | 标题栏右侧内容 | *number \| string* | - |
|
||||
| label | 标题栏描述信息 | *number \| string* | - |
|
||||
| border | 是否显示内边框 | *boolean* | `true` |
|
||||
| is-link | 是否展示标题栏右侧箭头并开启点击反馈 | *boolean* | `true` |
|
||||
| disabled | 是否禁用面板 | *boolean* | `false` |
|
||||
| title-class | 左侧标题额外类名 | *string* | - |
|
||||
| value-class | 右侧内容额外类名 | *string* | - |
|
||||
| label-class | 描述信息额外类名 | *string* | - |
|
||||
| --- | --- | --- | --- |
|
||||
| name | 唯一标识符,默认为索引值 | _number \| string_ | `index` |
|
||||
| icon | 标题栏左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
|
||||
| size | 标题栏大小,可选值为 `large` | _string_ | - |
|
||||
| title | 标题栏左侧内容 | _number \| string_ | - |
|
||||
| value | 标题栏右侧内容 | _number \| string_ | - |
|
||||
| label | 标题栏描述信息 | _number \| string_ | - |
|
||||
| border | 是否显示内边框 | _boolean_ | `true` |
|
||||
| is-link | 是否展示标题栏右侧箭头并开启点击反馈 | _boolean_ | `true` |
|
||||
| disabled | 是否禁用面板 | _boolean_ | `false` |
|
||||
| title-class | 左侧标题额外类名 | _string_ | - |
|
||||
| value-class | 右侧内容额外类名 | _string_ | - |
|
||||
| label-class | 描述信息额外类名 | _string_ | - |
|
||||
|
||||
### CollapseItem Slots
|
||||
|
||||
| 名称 | 说明 |
|
||||
|------|------|
|
||||
| default | 面板内容 |
|
||||
| value | 自定义显示内容 |
|
||||
| icon | 自定义`icon` |
|
||||
| title | 自定义`title` |
|
||||
| 名称 | 说明 |
|
||||
| ---------- | ----------------------------- |
|
||||
| default | 面板内容 |
|
||||
| value | 自定义显示内容 |
|
||||
| icon | 自定义`icon` |
|
||||
| title | 自定义`title` |
|
||||
| right-icon | 自定义右侧按钮,默认是`arrow` |
|
||||
|
||||
Reference in New Issue
Block a user