chore: add trailingComma
This commit is contained in:
@@ -33,7 +33,7 @@ export default {
|
||||
},
|
||||
onClickRight() {
|
||||
this.$toast(this.$t('button'));
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -40,7 +40,7 @@ function NavBar(
|
||||
<div
|
||||
class={[
|
||||
bem({ fixed: props.fixed }),
|
||||
{ [BORDER_BOTTOM]: props.border }
|
||||
{ [BORDER_BOTTOM]: props.border },
|
||||
]}
|
||||
style={{ zIndex: props.zIndex }}
|
||||
{...inherit(ctx)}
|
||||
@@ -54,7 +54,7 @@ function NavBar(
|
||||
),
|
||||
props.leftText && (
|
||||
<span class={bem('text')}>{props.leftText}</span>
|
||||
)
|
||||
),
|
||||
]}
|
||||
</div>
|
||||
<div class={[bem('title'), 'van-ellipsis']}>
|
||||
@@ -79,12 +79,12 @@ NavBar.props = {
|
||||
leftArrow: Boolean,
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: true,
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
default: 1,
|
||||
},
|
||||
};
|
||||
|
||||
export default createComponent<NavBarProps, NavBarEvents>(NavBar);
|
||||
|
||||
@@ -5,8 +5,8 @@ test('render left & right slot', () => {
|
||||
const wrapper = mount(NavBar, {
|
||||
scopedSlots: {
|
||||
left: () => 'Custom Left',
|
||||
right: () => 'Custom Right'
|
||||
}
|
||||
right: () => 'Custom Right',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
@@ -15,8 +15,8 @@ test('render left & right slot', () => {
|
||||
test('render title slot', () => {
|
||||
const wrapper = mount(NavBar, {
|
||||
scopedSlots: {
|
||||
title: () => 'Custom Title'
|
||||
}
|
||||
title: () => 'Custom Title',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
|
||||
Reference in New Issue
Block a user