优化获取值

This commit is contained in:
catchonme 2019-06-14 11:24:09 +08:00
parent 52ac48a0a1
commit 1977926697
1 changed files with 1 additions and 8 deletions

View File

@ -54,14 +54,7 @@ export class Carousel extends React.Component<CarouselProps, CarouselState> {
state = {
current: 0,
options:
this.props.value
? this.props.value
: this.props.options
? this.props.options
: resolveVariable(this.props.name, this.props.data)
? resolveVariable(this.props.name, this.props.data)
: [],
options: this.props.value || this.props.options || resolveVariable(this.props.name, this.props.data) || [],
showArrows: false,
nextAnimation: ''
};