mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[improvement] reduce simple computed (#2530)
This commit is contained in:
@@ -41,13 +41,6 @@ export default sfc({
|
||||
|
||||
displayColumns() {
|
||||
return this.columns.slice(0, +this.columnsNum);
|
||||
},
|
||||
|
||||
listeners() {
|
||||
return {
|
||||
...this.$listeners,
|
||||
change: this.onChange
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
@@ -186,6 +179,11 @@ export default sfc({
|
||||
},
|
||||
|
||||
render(h) {
|
||||
const on = {
|
||||
...this.$listeners,
|
||||
change: this.onChange
|
||||
};
|
||||
|
||||
return (
|
||||
<Picker
|
||||
ref="picker"
|
||||
@@ -197,7 +195,7 @@ export default sfc({
|
||||
columns={this.displayColumns}
|
||||
itemHeight={this.itemHeight}
|
||||
visibleItemCount={this.visibleItemCount}
|
||||
{...{ on: this.listeners }}
|
||||
{...{ on }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user