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:
@@ -14,12 +14,6 @@ export default sfc({
|
||||
arrowDirection: String
|
||||
},
|
||||
|
||||
computed: {
|
||||
arrowIcon() {
|
||||
return this.arrowDirection ? `arrow-${this.arrowDirection}` : 'arrow';
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onClick() {
|
||||
this.$emit('click');
|
||||
@@ -49,8 +43,9 @@ export default sfc({
|
||||
this.icon && <Icon class={bem('left-icon')} name={this.icon} />
|
||||
);
|
||||
|
||||
const arrowIcon = this.arrowDirection ? `arrow-${this.arrowDirection}` : 'arrow';
|
||||
const RightIcon = slots['right-icon'] || (
|
||||
this.isLink && <Icon class={bem('right-icon')} name={this.arrowIcon} />
|
||||
this.isLink && <Icon class={bem('right-icon')} name={arrowIcon} />
|
||||
);
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user