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

View File

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

View File

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