docs: prettier all markdown files
This commit is contained in:
+27
-42
@@ -27,12 +27,7 @@ Vue.use(GridItem);
|
||||
|
||||
```html
|
||||
<van-grid :column-num="3">
|
||||
<van-grid-item
|
||||
v-for="value in 6"
|
||||
:key="value"
|
||||
icon="photo-o"
|
||||
text="Text"
|
||||
/>
|
||||
<van-grid-item v-for="value in 6" :key="value" icon="photo-o" text="Text" />
|
||||
</van-grid>
|
||||
```
|
||||
|
||||
@@ -56,12 +51,7 @@ Vue.use(GridItem);
|
||||
|
||||
```html
|
||||
<van-grid square>
|
||||
<van-grid-item
|
||||
v-for="value in 8"
|
||||
:key="value"
|
||||
icon="photo-o"
|
||||
text="Text"
|
||||
/>
|
||||
<van-grid-item v-for="value in 8" :key="value" icon="photo-o" text="Text" />
|
||||
</van-grid>
|
||||
```
|
||||
|
||||
@@ -69,12 +59,7 @@ Vue.use(GridItem);
|
||||
|
||||
```html
|
||||
<van-grid :gutter="10">
|
||||
<van-grid-item
|
||||
v-for="value in 8"
|
||||
:key="value"
|
||||
icon="photo-o"
|
||||
text="Text"
|
||||
/>
|
||||
<van-grid-item v-for="value in 8" :key="value" icon="photo-o" text="Text" />
|
||||
</van-grid>
|
||||
```
|
||||
|
||||
@@ -101,38 +86,38 @@ Vue.use(GridItem);
|
||||
### Grid Props
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| column-num `v2.0.4` | Column Num | *number \| string* | `4` |
|
||||
| icon-size `v2.2.6` | Icon size | *number \| string* | `28px` |
|
||||
| gutter | Gutter | *number \| string* | `0` |
|
||||
| border | Whether to show border | *boolean* | `true` |
|
||||
| center | Whether to center content | *boolean* | `true` |
|
||||
| square | Whether to be square shape | *boolean* | `false` |
|
||||
| clickable | Whether to show click feedback when clicked | *boolean* | `false` |
|
||||
| --- | --- | --- | --- |
|
||||
| column-num `v2.0.4` | Column Num | _number \| string_ | `4` |
|
||||
| icon-size `v2.2.6` | Icon size | _number \| string_ | `28px` |
|
||||
| gutter | Gutter | _number \| string_ | `0` |
|
||||
| border | Whether to show border | _boolean_ | `true` |
|
||||
| center | Whether to center content | _boolean_ | `true` |
|
||||
| square | Whether to be square shape | _boolean_ | `false` |
|
||||
| clickable | Whether to show click feedback when clicked | _boolean_ | `false` |
|
||||
|
||||
### GridItem Props
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| text | Text | *string* | - |
|
||||
| icon | Icon name or URL | *string* | - |
|
||||
| icon-prefix `v2.5.3` | Icon className prefix | *string* | `van-icon` |
|
||||
| dot `v2.2.1` | Whether to show red dot | *boolean* | `false` |
|
||||
| badge `v2.5.6` | Content of the badge | *number \| string* | - |
|
||||
| url | Link URL | *string* | - |
|
||||
| to | Target route of the link, same as to of vue-router | *string \| object* | - |
|
||||
| replace | If true, the navigation will not leave a history record | *boolean* | `false` |
|
||||
| --- | --- | --- | --- |
|
||||
| text | Text | _string_ | - |
|
||||
| icon | Icon name or URL | _string_ | - |
|
||||
| icon-prefix `v2.5.3` | Icon className prefix | _string_ | `van-icon` |
|
||||
| dot `v2.2.1` | Whether to show red dot | _boolean_ | `false` |
|
||||
| badge `v2.5.6` | Content of the badge | _number \| string_ | - |
|
||||
| url | Link URL | _string_ | - |
|
||||
| to | Target route of the link, same as to of vue-router | _string \| object_ | - |
|
||||
| replace | If true, the navigation will not leave a history record | _boolean_ | `false` |
|
||||
|
||||
### GridItem Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
|------|------|------|
|
||||
| click | Triggered when clicked | *event: Event* |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
|
||||
### GridItem Slots
|
||||
|
||||
| Name | Description |
|
||||
|------|------|
|
||||
| Name | Description |
|
||||
| ------- | -------------- |
|
||||
| default | Custom content |
|
||||
| icon | Custom icon |
|
||||
| text | Custom text |
|
||||
| icon | Custom icon |
|
||||
| text | Custom text |
|
||||
|
||||
+28
-43
@@ -35,12 +35,7 @@ Vue.use(GridItem);
|
||||
|
||||
```html
|
||||
<van-grid :column-num="3">
|
||||
<van-grid-item
|
||||
v-for="value in 6"
|
||||
:key="value"
|
||||
icon="photo-o"
|
||||
text="文字"
|
||||
/>
|
||||
<van-grid-item v-for="value in 6" :key="value" icon="photo-o" text="文字" />
|
||||
</van-grid>
|
||||
```
|
||||
|
||||
@@ -68,12 +63,7 @@ Vue.use(GridItem);
|
||||
|
||||
```html
|
||||
<van-grid square>
|
||||
<van-grid-item
|
||||
v-for="value in 8"
|
||||
:key="value"
|
||||
icon="photo-o"
|
||||
text="文字"
|
||||
/>
|
||||
<van-grid-item v-for="value in 8" :key="value" icon="photo-o" text="文字" />
|
||||
</van-grid>
|
||||
```
|
||||
|
||||
@@ -83,12 +73,7 @@ Vue.use(GridItem);
|
||||
|
||||
```html
|
||||
<van-grid :gutter="10">
|
||||
<van-grid-item
|
||||
v-for="value in 8"
|
||||
:key="value"
|
||||
icon="photo-o"
|
||||
text="文字"
|
||||
/>
|
||||
<van-grid-item v-for="value in 8" :key="value" icon="photo-o" text="文字" />
|
||||
</van-grid>
|
||||
```
|
||||
|
||||
@@ -119,39 +104,39 @@ Vue.use(GridItem);
|
||||
### Grid Props
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| column-num `v2.0.4` | 列数 | *number \| string* | `4` |
|
||||
| icon-size `v2.2.6` | 图标大小,默认单位为`px` | *number \| string* | `28px` |
|
||||
| gutter | 格子之间的间距,默认单位为`px` | *number \| string* | `0` |
|
||||
| border | 是否显示边框 | *boolean* | `true` |
|
||||
| center | 是否将格子内容居中显示 | *boolean* | `true` |
|
||||
| square | 是否将格子固定为正方形 | *boolean* | `false` |
|
||||
| clickable | 是否开启格子点击反馈 | *boolean* | `false` |
|
||||
| --- | --- | --- | --- |
|
||||
| column-num `v2.0.4` | 列数 | _number \| string_ | `4` |
|
||||
| icon-size `v2.2.6` | 图标大小,默认单位为`px` | _number \| string_ | `28px` |
|
||||
| gutter | 格子之间的间距,默认单位为`px` | _number \| string_ | `0` |
|
||||
| border | 是否显示边框 | _boolean_ | `true` |
|
||||
| center | 是否将格子内容居中显示 | _boolean_ | `true` |
|
||||
| square | 是否将格子固定为正方形 | _boolean_ | `false` |
|
||||
| clickable | 是否开启格子点击反馈 | _boolean_ | `false` |
|
||||
|
||||
### GridItem Props
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| text | 文字 | *string* | - |
|
||||
| icon | [图标名称](#/zh-CN/icon)或图片链接 | *string* | - |
|
||||
| icon-prefix `v2.5.3` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | *string* | `van-icon` |
|
||||
| dot `v2.2.1` | 是否显示图标右上角小红点 | *boolean* | `false` |
|
||||
| badge `v2.5.6` | 图标右上角徽标的内容 | *number \| string* | - |
|
||||
| info `2.2.1` | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | *number \| string* | - |
|
||||
| url | 点击后跳转的链接地址 | *string* | - |
|
||||
| to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - |
|
||||
| replace | 是否在跳转时替换当前页面历史 | *boolean* | `false` |
|
||||
| --- | --- | --- | --- |
|
||||
| text | 文字 | _string_ | - |
|
||||
| icon | [图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
|
||||
| icon-prefix `v2.5.3` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | _string_ | `van-icon` |
|
||||
| dot `v2.2.1` | 是否显示图标右上角小红点 | _boolean_ | `false` |
|
||||
| badge `v2.5.6` | 图标右上角徽标的内容 | _number \| string_ | - |
|
||||
| info `2.2.1` | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | _number \| string_ | - |
|
||||
| url | 点击后跳转的链接地址 | _string_ | - |
|
||||
| to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | _string \| object_ | - |
|
||||
| replace | 是否在跳转时替换当前页面历史 | _boolean_ | `false` |
|
||||
|
||||
### GridItem Events
|
||||
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
|------|------|------|
|
||||
| click | 点击格子时触发 | *event: Event* |
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
| ------ | -------------- | -------------- |
|
||||
| click | 点击格子时触发 | _event: Event_ |
|
||||
|
||||
### GridItem Slots
|
||||
|
||||
| 名称 | 说明 |
|
||||
|------|------|
|
||||
| 名称 | 说明 |
|
||||
| ------- | -------------------- |
|
||||
| default | 自定义宫格的所有内容 |
|
||||
| icon | 自定义图标 |
|
||||
| text | 自定义文字 |
|
||||
| icon | 自定义图标 |
|
||||
| text | 自定义文字 |
|
||||
|
||||
Reference in New Issue
Block a user