fix(button): fix button disabled & loading active ui (#5084)

* fix(button): fix button disabled active ui

* fix(button): fix button loading active ui

Co-authored-by: liuhaihonggia <liuhaihong@youzan.com>
This commit is contained in:
landluck 2022-11-03 10:18:25 +08:00 committed by GitHub
parent 763acff12a
commit 66c967b782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
id="{{ id }}"
data-detail="{{ dataset }}"
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
hover-class="van-button--active hover-class"
hover-class="{{ disabled || loading ? '' : 'van-button--active hover-class'}}"
lang="{{ lang }}"
form-type="{{ formType }}"
style="{{ computed.rootStyle({ plain, color, customStyle }) }}"

View File

@ -376,7 +376,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--primary van-button--normal van-button--disabled van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""
@ -410,7 +410,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--info van-button--normal van-button--disabled van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""
@ -457,7 +457,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--primary van-button--normal van-button--loading van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""
@ -504,7 +504,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--primary van-button--normal van-button--loading van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""
@ -586,7 +586,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--info van-button--normal van-button--loading van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""

View File

@ -178,7 +178,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--danger van-button--normal van-button--round van-button--disabled van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""
@ -274,7 +274,7 @@ exports[`should render demo and match snapshot 1`] = `
class="custom-class van-button van-button--danger van-button--normal van-button--round van-button--loading van-button--unclickable "
data-detail="{{null}}"
formType=""
hoverClass="van-button--active hover-class"
hoverClass=""
id=""
lang=""
openType=""