fix(Pagination): button tag missing type (#9904)

This commit is contained in:
neverland 2021-11-19 15:26:24 +08:00 committed by GitHub
parent b35d295ad7
commit 880a075340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 36 deletions

View File

@ -133,6 +133,7 @@ export default defineComponent({
]} ]}
> >
<button <button
type="button"
disabled={disabled} disabled={disabled}
onClick={() => updateModelValue(modelValue - 1)} onClick={() => updateModelValue(modelValue - 1)}
> >
@ -154,6 +155,7 @@ export default defineComponent({
]} ]}
> >
<button <button
type="button"
disabled={disabled} disabled={disabled}
onClick={() => updateModelValue(modelValue + 1)} onClick={() => updateModelValue(modelValue + 1)}
> >
@ -172,6 +174,7 @@ export default defineComponent({
]} ]}
> >
<button <button
type="button"
aria-current={page.active || undefined} aria-current={page.active || undefined}
onClick={() => updateModelValue(page.number)} onClick={() => updateModelValue(page.number)}
> >

View File

@ -7,37 +7,41 @@ exports[`should render demo and match snapshot 1`] = `
> >
<ul class="van-pagination__items"> <ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround"> <li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround">
<button disabled> <button type="button"
disabled
>
Prev Prev
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround">
<button aria-current="true"> <button type="button"
aria-current="true"
>
1 1
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
2 2
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
3 3
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
4 4
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
5 5
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround"> <li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button> <button type="button">
Next Next
</button> </button>
</li> </li>
@ -51,7 +55,9 @@ exports[`should render demo and match snapshot 1`] = `
> >
<ul class="van-pagination__items"> <ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--border van-pagination__item--prev van-hairline--surround"> <li class="van-pagination__item van-pagination__item--disabled van-pagination__item--border van-pagination__item--prev van-hairline--surround">
<button disabled> <button type="button"
disabled
>
Prev Prev
</button> </button>
</li> </li>
@ -59,7 +65,7 @@ exports[`should render demo and match snapshot 1`] = `
1/12 1/12
</li> </li>
<li class="van-pagination__item van-pagination__item--border van-pagination__item--next van-hairline--surround"> <li class="van-pagination__item van-pagination__item--border van-pagination__item--next van-hairline--surround">
<button> <button type="button">
Next Next
</button> </button>
</li> </li>
@ -72,32 +78,36 @@ exports[`should render demo and match snapshot 1`] = `
> >
<ul class="van-pagination__items"> <ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround"> <li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround">
<button disabled> <button type="button"
disabled
>
Prev Prev
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround">
<button aria-current="true"> <button type="button"
aria-current="true"
>
1 1
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
2 2
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
3 3
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
... ...
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround"> <li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button> <button type="button">
Next Next
</button> </button>
</li> </li>
@ -110,38 +120,42 @@ exports[`should render demo and match snapshot 1`] = `
> >
<ul class="van-pagination__items"> <ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround"> <li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround">
<button disabled> <button type="button"
disabled
>
<i class="van-badge__wrapper van-icon van-icon-arrow-left"> <i class="van-badge__wrapper van-icon van-icon-arrow-left">
</i> </i>
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround">
<button aria-current="true"> <button type="button"
aria-current="true"
>
1 1
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
2 2
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
3 3
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
4 4
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
5 5
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround"> <li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button> <button type="button">
<i class="van-badge__wrapper van-icon van-icon-arrow"> <i class="van-badge__wrapper van-icon van-icon-arrow">
</i> </i>
</button> </button>

View File

@ -6,37 +6,37 @@ exports[`should render page slot correctly 1`] = `
> >
<ul class="van-pagination__items"> <ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--prev van-hairline--surround"> <li class="van-pagination__item van-pagination__item--prev van-hairline--surround">
<button> <button type="button">
Previous Previous
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
foo 1 foo 1
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
foo 2 foo 2
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
foo 3 foo 3
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
foo 4 foo 4
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
foo 5 foo 5
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround"> <li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button> <button type="button">
Next Next
</button> </button>
</li> </li>
@ -50,37 +50,37 @@ exports[`should render prev-text、next-text slot correctly 1`] = `
> >
<ul class="van-pagination__items"> <ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--prev van-hairline--surround"> <li class="van-pagination__item van-pagination__item--prev van-hairline--surround">
<button> <button type="button">
Custom PrevText Custom PrevText
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
1 1
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
2 2
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
3 3
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
4 4
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround"> <li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button> <button type="button">
5 5
</button> </button>
</li> </li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround"> <li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button> <button type="button">
Custom NextText Custom NextText
</button> </button>
</li> </li>