mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-10 00:11:06 +08:00
Compare commits
3 Commits
fe7f5e28d7
...
8214bf8d02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8214bf8d02 | ||
|
|
5f7e65b637 | ||
|
|
0dd93a0032 |
@ -117,6 +117,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch"
|
||||
style="font-size: 24px;"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
|
||||
@ -222,6 +222,7 @@ exports[`should render AddressEdit with props correctly 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
style="font-size: 24px;"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
|
||||
@ -52,6 +52,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch"
|
||||
style="font-size: 24px;"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
|
||||
@ -172,6 +172,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch"
|
||||
style="font-size: 20px;"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
|
||||
@ -115,7 +115,12 @@ export default defineComponent({
|
||||
const text = slots.error ? slots.error() : props.errorText;
|
||||
if (text) {
|
||||
return (
|
||||
<div class={bem('error-text')} onClick={clickErrorText}>
|
||||
<div
|
||||
role="button"
|
||||
class={bem('error-text')}
|
||||
tabindex={0}
|
||||
onClick={clickErrorText}
|
||||
>
|
||||
{text}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -5,7 +5,10 @@ exports[`should render error slot correctly 1`] = `
|
||||
class="van-list"
|
||||
aria-busy="false"
|
||||
>
|
||||
<div class="van-list__error-text">
|
||||
<div role="button"
|
||||
class="van-list__error-text"
|
||||
tabindex="0"
|
||||
>
|
||||
Custom Error
|
||||
</div>
|
||||
<div class="van-list__placeholder">
|
||||
|
||||
@ -173,6 +173,8 @@ export default defineComponent({
|
||||
role="menuitem"
|
||||
class={[bem('action', { disabled, 'with-icon': icon }), className]}
|
||||
style={{ color }}
|
||||
tabindex={disabled ? undefined : 0}
|
||||
aria-disabled={disabled || undefined}
|
||||
onClick={() => onClickAction(action, index)}
|
||||
>
|
||||
{icon && (
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
exports[`should allow to custom the className of action 1`] = `
|
||||
<div role="menuitem"
|
||||
class="van-popover__action foo"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-popover__action-text van-hairline--bottom">
|
||||
Option
|
||||
@ -22,6 +23,7 @@ exports[`should change icon class prefix when using icon-prefix prop 1`] = `
|
||||
>
|
||||
<div role="menuitem"
|
||||
class="van-popover__action van-popover__action--with-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<i class="van-badge__wrapper my-icon my-icon-success van-popover__action-icon">
|
||||
</i>
|
||||
|
||||
@ -196,7 +196,7 @@ export default defineComponent({
|
||||
style={style}
|
||||
class={bem('item')}
|
||||
tabindex={disabled ? undefined : 0}
|
||||
aria-setsize={+count}
|
||||
aria-setsize={count}
|
||||
aria-posinset={score}
|
||||
aria-checked={!isVoid}
|
||||
onClick={onClickItem}
|
||||
|
||||
@ -47,6 +47,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch"
|
||||
style="font-size: 24px;"
|
||||
tabindex="0"
|
||||
aria-checked="false"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
|
||||
@ -295,9 +295,9 @@ export default defineComponent({
|
||||
role="slider"
|
||||
class={getButtonClassName(index)}
|
||||
tabindex={props.disabled ? undefined : 0}
|
||||
aria-valuemin={+props.min}
|
||||
aria-valuemin={props.min}
|
||||
aria-valuenow={current}
|
||||
aria-valuemax={+props.max}
|
||||
aria-valuemax={props.max}
|
||||
aria-disabled={props.disabled || undefined}
|
||||
aria-readonly={props.readonly || undefined}
|
||||
aria-orientation={props.vertical ? 'vertical' : 'horizontal'}
|
||||
|
||||
@ -313,9 +313,9 @@ export default defineComponent({
|
||||
// set keyboard in modern browsers
|
||||
inputmode={props.integer ? 'numeric' : 'decimal'}
|
||||
placeholder={props.placeholder}
|
||||
aria-valuemax={+props.max}
|
||||
aria-valuemin={+props.min}
|
||||
aria-valuenow={+current.value}
|
||||
aria-valuemax={props.max}
|
||||
aria-valuemin={props.min}
|
||||
aria-valuenow={current.value}
|
||||
onBlur={onBlur}
|
||||
onInput={onInput}
|
||||
onFocus={onFocus}
|
||||
|
||||
@ -206,7 +206,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
inputmode="decimal"
|
||||
aria-valuemax="Infinity"
|
||||
aria-valuemin="1"
|
||||
aria-valuenow="1"
|
||||
aria-valuenow="1.0"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__plus van-haptics-feedback"
|
||||
|
||||
@ -68,6 +68,7 @@ export default defineComponent({
|
||||
disabled,
|
||||
})}
|
||||
style={style}
|
||||
tabindex={disabled ? undefined : 0}
|
||||
aria-checked={checked}
|
||||
onClick={onClick}
|
||||
>
|
||||
|
||||
@ -4,6 +4,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
@ -22,6 +23,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on van-switch--loading"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
@ -46,6 +48,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
style="font-size: 24px;"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
@ -56,6 +59,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
style="background-color: rgb(238, 10, 36);"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
@ -65,6 +69,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div>
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
@ -81,6 +86,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div role="switch"
|
||||
class="van-switch van-switch--on"
|
||||
style="font-size: 24px;"
|
||||
tabindex="0"
|
||||
aria-checked="true"
|
||||
>
|
||||
<div class="van-switch__node">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user