[new feature] Field: add arrow-direction prop (#3679)

This commit is contained in:
neverland
2019-06-28 15:33:08 +08:00
committed by GitHub
parent 55f215d08d
commit a6ce44fbb0
9 changed files with 40 additions and 20 deletions
+6 -6
View File
@@ -115,7 +115,7 @@ Vue.use(Cell).use(CellGroup);
| title | 左侧标题 | `String | Number` | - | - |
| value | 右侧内容 | `String | Number` | - | - |
| label | 标题下方的描述信息 | `String` | - | - |
| size | 单元格大小,可选值为 `large` | `String` | - | 1.4.4 |
| size | 单元格大小,可选值为 `large` | `String` | - | - |
| url | 跳转链接 | `String` | - | - |
| to | 路由跳转对象,同 vue-router 的 to 属性 | `String | Object` | - | - |
| border | 是否显示内边框 | `Boolean` | `true` | - |
@@ -123,12 +123,12 @@ Vue.use(Cell).use(CellGroup);
| clickable | 是否开启点击反馈 | `Boolean` | `false` | - |
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` | - |
| required | 是否显示表单必填星号 | `Boolean` | `false` | - |
| center | 是否使内容垂直居中 | `Boolean` | `false` | 1.0.3 |
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - | 1.1.10 |
| center | 是否使内容垂直居中 | `Boolean` | `false` | - |
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - | -|
| title-style | 左侧标题额外样式 | `any` | - | 1.6.17 |
| title-class | 左侧标题额外类名 | `any` | - | 1.4.8 |
| value-class | 右侧内容额外类名 | `any` | - | 1.4.8 |
| label-class | 描述信息额外类名 | `any` | - | 1.4.8 |
| title-class | 左侧标题额外类名 | `any` | - | - |
| value-class | 右侧内容额外类名 | `any` | - | - |
| label-class | 描述信息额外类名 | `any` | - | - |
### Cell Events
+2 -6
View File
@@ -9,10 +9,7 @@ import { CreateElement, RenderContext } from 'vue/types';
import { ScopedSlot, DefaultSlots } from '../utils/types';
import { Mods } from '../utils/create/bem';
export type CellProps = RouteProps &
SharedCellProps & {
arrowDirection?: string;
};
export type CellProps = RouteProps & SharedCellProps;
export type CellSlots = DefaultSlots & {
icon?: ScopedSlot;
@@ -102,8 +99,7 @@ function Cell(
Cell.props = {
...cellProps,
...routeProps,
arrowDirection: String
...routeProps
};
export default createComponent<CellProps, CellEvents, CellSlots>(Cell);
+2
View File
@@ -13,6 +13,7 @@ export type SharedCellProps = {
title?: string | number;
value?: string | number;
label?: string | number;
arrowDirection?: 'up' | 'down' | 'left' | 'right';
}
export const cellProps = {
@@ -29,6 +30,7 @@ export const cellProps = {
title: [String, Number],
value: [String, Number],
label: [String, Number],
arrowDirection: String,
border: {
type: Boolean,
default: true