mirror of https://github.com/ElemeFE/element
Pagination: disabled prev and next buttons should not trigger click (#10628)
parent
79325390e2
commit
0ae91ec37f
|
@ -113,7 +113,8 @@ export default {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class={['btn-prev', { disabled: this.$parent.disabled || this.$parent.internalCurrentPage <= 1 }]}
|
class="btn-prev"
|
||||||
|
disabled={ this.$parent.disabled || this.$parent.internalCurrentPage <= 1 }
|
||||||
on-click={ this.$parent.prev }>
|
on-click={ this.$parent.prev }>
|
||||||
{
|
{
|
||||||
this.$parent.prevText
|
this.$parent.prevText
|
||||||
|
@ -130,10 +131,8 @@ export default {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class={[
|
class="btn-next"
|
||||||
'btn-next',
|
disabled={ this.$parent.disabled || this.$parent.internalCurrentPage === this.$parent.internalPageCount || this.$parent.internalPageCount === 0 }
|
||||||
{ disabled: this.$parent.disabled || this.$parent.internalCurrentPage === this.$parent.internalPageCount || this.$parent.internalPageCount === 0 }
|
|
||||||
]}
|
|
||||||
on-click={ this.$parent.next }>
|
on-click={ this.$parent.next }>
|
||||||
{
|
{
|
||||||
this.$parent.nextText
|
this.$parent.nextText
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
color: $--pagination-hover-fill;
|
color: $--pagination-hover-fill;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
&:disabled {
|
||||||
color: $--pagination-button-disabled-color;
|
color: $--pagination-button-disabled-color;
|
||||||
background-color: $--pagination-button-disabled-fill;
|
background-color: $--pagination-button-disabled-fill;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
.btn-prev, .btn-next {
|
.btn-prev, .btn-next {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
&.disabled {
|
&:disabled {
|
||||||
color: $--color-text-placeholder;
|
color: $--color-text-placeholder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue