[improvement] add Cell props mixin (#2189)

This commit is contained in:
neverland
2018-11-30 15:45:50 +08:00
committed by GitHub
parent fe805af905
commit d8ff9f3d34
8 changed files with 45 additions and 38 deletions

View File

@@ -103,6 +103,9 @@ Vue.use(Cell).use(CellGroup);
| is-link | Whether to show link icon | `Boolean` | `false` |
| required | Whether to show required mark | `Boolean` | `false` |
| arrow-direction | Can be set to `left` `up` `down` | `String` | - |
| title-class | Title className | `String` | - |
| value-class | Value className | `String` | - |
| label-class | Label className | `String` | - |
### Cell Event

View File

@@ -52,6 +52,7 @@
<script>
import Icon from '../icon';
import CellMixin from '../mixins/cell';
import RouterLink from '../mixins/router-link';
import create from '../utils/create-basic';
@@ -62,26 +63,12 @@ export default create({
Icon
},
mixins: [RouterLink],
mixins: [CellMixin, RouterLink],
props: {
icon: String,
size: String,
center: Boolean,
isLink: Boolean,
required: Boolean,
clickable: Boolean,
titleClass: String,
valueClass: String,
labelClass: String,
title: [String, Number],
value: [String, Number],
label: [String, Number],
arrowDirection: String,
border: {
type: Boolean,
default: true
}
arrowDirection: String
},
computed: {

View File

@@ -105,6 +105,9 @@ Vue.use(Cell).use(CellGroup);
| required | 是否显示表单必填星号 | `Boolean` | `false` | - |
| center | 是否使内容垂直居中 | `Boolean` | `false` | 1.0.3 |
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - | 1.1.10 |
| title-class | 左侧标题额外类名 | `String` | - | 1.4.8 |
| value-class | 右侧内容额外类名 | `String` | - | 1.4.8 |
| label-class | 描述信息额外类名 | `String` | - | 1.4.8 |
### Cell Event