fix(CouponList): incorrect Tabs v-model (#9052)

This commit is contained in:
neverland 2021-07-18 19:58:16 +08:00 committed by GitHub
parent 34d4937f2b
commit 53969c455f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 13 deletions

View File

@ -222,7 +222,7 @@ export default defineComponent({
return () => ( return () => (
<div class={bem()}> <div class={bem()}>
{renderExchangeBar()} {renderExchangeBar()}
<Tabs v-model={state.tab} class={bem('tab')} border={false}> <Tabs v-model={[state.tab, 'active']} class={bem('tab')} border={false}>
{renderCouponTab()} {renderCouponTab()}
{renderDisabledTab()} {renderDisabledTab()}
</Tabs> </Tabs>

View File

@ -24,9 +24,7 @@ exports[`should be the sames as the last snapshot when render coupon list 1`] =
</div> </div>
</button> </button>
</div> </div>
<div class="van-tabs van-tabs--line van-coupon-list__tab" <div class="van-tabs van-tabs--line van-coupon-list__tab">
modelvalue="0"
>
<div class="van-tabs__wrap"> <div class="van-tabs__wrap">
<div role="tablist" <div role="tablist"
class="van-tabs__nav van-tabs__nav--line" class="van-tabs__nav van-tabs__nav--line"
@ -304,9 +302,7 @@ exports[`should have two "van-coupon-list__empty" classes when render coupon lis
</div> </div>
</button> </button>
</div> </div>
<div class="van-tabs van-tabs--line van-coupon-list__tab" <div class="van-tabs van-tabs--line van-coupon-list__tab">
modelvalue="0"
>
<div class="van-tabs__wrap"> <div class="van-tabs__wrap">
<div role="tablist" <div role="tablist"
class="van-tabs__nav van-tabs__nav--line" class="van-tabs__nav van-tabs__nav--line"
@ -404,9 +400,7 @@ exports[`should render list-footer slot correctly 1`] = `
</div> </div>
</button> </button>
</div> </div>
<div class="van-tabs van-tabs--line van-coupon-list__tab" <div class="van-tabs van-tabs--line van-coupon-list__tab">
modelvalue="0"
>
<div class="van-tabs__wrap"> <div class="van-tabs__wrap">
<div role="tablist" <div role="tablist"
class="van-tabs__nav van-tabs__nav--line" class="van-tabs__nav van-tabs__nav--line"
@ -506,9 +500,7 @@ exports[`should use custom src when using empty-image prop 1`] = `
</div> </div>
</button> </button>
</div> </div>
<div class="van-tabs van-tabs--line van-coupon-list__tab" <div class="van-tabs van-tabs--line van-coupon-list__tab">
modelvalue="0"
>
<div class="van-tabs__wrap"> <div class="van-tabs__wrap">
<div role="tablist" <div role="tablist"
class="van-tabs__nav van-tabs__nav--line" class="van-tabs__nav van-tabs__nav--line"