feat(Grid): column-num can be string

This commit is contained in:
陈嘉涵 2020-01-29 12:03:43 +08:00
parent 4d1db0fa0f
commit 1af1f4ac4f
3 changed files with 5 additions and 5 deletions

View File

@ -102,13 +102,13 @@ Vue.use(GridItem);
| Attribute | Description | Type | Default |
|------|------|------|------|
| column-num `v2.0.4` | Column Num | *number* | `4` |
| 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` |
| icon-size `v2.2.6` | Icon size | *number \| string* | `28px` |
### GridItem Props

View File

@ -120,13 +120,13 @@ Vue.use(GridItem);
| 参数 | 说明 | 类型 | 默认值 |
|------|------|------|------|
| column-num `v2.0.4` | 列数 | *number* | `4` |
| 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` |
| icon-size `v2.2.6` | 图标大小,默认单位为`px` | *number \| string* | `28px` |
### GridItem Props

View File

@ -13,7 +13,7 @@ export default createComponent({
iconSize: [Number, String],
clickable: Boolean,
columnNum: {
type: Number,
type: [Number, String],
default: 4,
},
center: {