mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] GoodsAction: should have tabindex
This commit is contained in:
parent
06cf2f3f57
commit
38afa3dffd
@ -5,9 +5,9 @@ exports[`renders demo correctly 1`] = `
|
||||
<div>
|
||||
<div class="van-circle" style="width: 120px; height: 120px;"><svg viewBox="0 0 1060 1060">
|
||||
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__hover" style="fill: none; stroke: #fff; stroke-width: 40px;"></path>
|
||||
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__layer" style="stroke: #1989fa; stroke-dashoffset: 3140px; stroke-width: 41px;"></path>
|
||||
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__layer" style="stroke: #1989fa; stroke-dashoffset: 3083.48px; stroke-width: 41px;"></path>
|
||||
</svg>
|
||||
<div class="van-circle__text">0%</div>
|
||||
<div class="van-circle__text">2%</div>
|
||||
</div>
|
||||
<div class="van-circle" style="width: 120px; height: 120px;"><svg viewBox="0 0 1060 1060">
|
||||
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__hover" style="fill: #fff; stroke: #ebedf0; stroke-width: 60px;"></path>
|
||||
|
@ -16,6 +16,10 @@
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: @goods-action-icon-active-color;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ function GoodsActionIcon(
|
||||
return (
|
||||
<div
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class={[bem(), 'van-hairline']}
|
||||
onClick={onClick}
|
||||
{...inherit(ctx)}
|
||||
|
@ -4,12 +4,12 @@ exports[`renders demo correctly 1`] = `
|
||||
<div>
|
||||
<div>
|
||||
<div class="van-goods-action">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-chat-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>客服
|
||||
</div>
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-cart-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>购物车
|
||||
@ -18,17 +18,17 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-goods-action">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-chat-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>客服
|
||||
</div>
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-cart-o van-goods-action-icon__icon">
|
||||
<div class="van-info">5</div>
|
||||
</div>购物车
|
||||
</div>
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-shop-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>店铺
|
||||
|
@ -3,7 +3,7 @@
|
||||
exports[`Button render default slot 1`] = `<button class="van-button van-button--default van-button--large van-button--square van-goods-action-button"><span class="van-button__text">Default Content</span></button>`;
|
||||
|
||||
exports[`Icon render default slot 1`] = `
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div role="button" tabindex="0" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-undefined van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>Default Content
|
||||
|
Loading…
x
Reference in New Issue
Block a user