This repository was archived by the owner on Aug 6, 2022. It is now read-only.
Commit 638e17c 1 parent 7b24e5e commit 638e17c Copy full SHA for 638e17c
File tree 4 files changed +22
-16
lines changed
4 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 5
5
6
6
< div [hidden] ="config?.scrollbar !== '.swiper-scrollbar' " class ="swiper-scrollbar "> </ div >
7
7
8
- < div [hidden] ="config?.prevButton !== '.swiper-button-prev' " class ="swiper-button-prev " [attr.disabled] ="isAtFirst "> </ div >
9
- < div [hidden] ="config?.nextButton !== '.swiper-button-next' " class ="swiper-button-next " [attr.disabled] ="isAtLast "> </ div >
8
+ < div [hidden] ="config?.prevButton !== '.swiper-button-prev' " class ="swiper-button-prev " [attr.disabled] ="isAtFirst || null "> </ div >
9
+ < div [hidden] ="config?.nextButton !== '.swiper-button-next' " class ="swiper-button-next " [attr.disabled] ="isAtLast || null "> </ div >
10
10
11
- < div [hidden] ="config?.pagination !== '.swiper-pagination' " class ="swiper-pagination " (click) ="directiveRef.setIndex($event.target.attributes. index.value ) "> </ div >
11
+ < div [hidden] ="config?.pagination !== '.swiper-pagination' " class ="swiper-pagination " (click) ="directiveRef.setIndex($event.target.getAttribute(' index') ) "> </ div >
12
12
</ div >
Original file line number Diff line number Diff line change @@ -48,13 +48,16 @@ swiper {
48
48
pointer-events : none ;
49
49
50
50
.swiper-pagination-handle {
51
+ position : relative ;
52
+
53
+ padding : 4px ;
51
54
margin : 2px ;
52
55
53
56
cursor : pointer ;
54
57
pointer-events : all ;
55
58
56
59
.swiper-pagination-bullet {
57
- pointer-events : none ;
60
+ margin : 0 ;
58
61
}
59
62
60
63
.swiper-pagination-bullet-last ,
@@ -105,7 +108,7 @@ swiper {
105
108
106
109
& .swiper-pagination-bullet-last ,
107
110
& .swiper-pagination-bullet-first {
108
- margin : 5 px -1px ;
111
+ margin : 0 -1px ;
109
112
}
110
113
}
111
114
}
@@ -128,7 +131,7 @@ swiper {
128
131
.swiper-pagination-bullet {
129
132
& .swiper-pagination-bullet-last ,
130
133
& .swiper-pagination-bullet-first {
131
- margin : -1px 5 px ;
134
+ margin : -1px 0 ;
132
135
}
133
136
}
134
137
}
Original file line number Diff line number Diff line change @@ -134,18 +134,20 @@ export class SwiperComponent implements DoCheck {
134
134
}
135
135
136
136
if ( options . pagination === '.swiper-pagination' && ! options . paginationBulletRender ) {
137
+ options . paginationClickable = false ;
138
+
137
139
if ( ! this . paginationBulletRender ) {
138
140
this . paginationBulletRender = ( swiper , index , className ) => {
141
+ let bullet = `<span class="${ className } ${ className } -middle" index="${ index } "></span>` ;
142
+
139
143
if ( index === 0 ) {
140
- return ' <span class="swiper-pagination-handle " index=' + index + '>' +
141
- '<span class="' + className + ' ' + className + '-first"></span></span>' ;
144
+ bullet = ` <span class="${ className } ${ className } -first " index=" ${ index } "></span>` ;
145
+
142
146
} else if ( index === ( swiper . slides . length - 1 ) ) {
143
- return '<span class="swiper-pagination-handle" index=' + index + '>' +
144
- '<span class="' + className + ' ' + className + '-last"></span></span>' ;
145
- } else {
146
- return '<span class="swiper-pagination-handle" index=' + index + '>' +
147
- '<span class="' + className + ' ' + className + '-middle"></span></span>' ;
147
+ bullet = `<span class="${ className } ${ className } -last" index="${ index } "></span>` ;
148
148
}
149
+
150
+ return `<span class="swiper-pagination-handle" index="${ index } ">${ bullet } </span>` ;
149
151
} ;
150
152
}
151
153
Original file line number Diff line number Diff line change 79
79
"radix" : true ,
80
80
"semicolon" : [
81
81
true ,
82
- "always"
82
+ "always" ,
83
+ "ignore-interfaces"
83
84
] ,
84
85
"triple-equals" : [
85
86
true ,
107
108
"check-type"
108
109
] ,
109
110
"directive-selector" : [
110
- true ,
111
+ false ,
111
112
"attribute" ,
112
113
false ,
113
114
"camelCase"
114
115
] ,
115
116
"component-selector" : [
116
- true ,
117
+ false ,
117
118
"element" ,
118
119
false ,
119
120
"kebab-case"
You can’t perform that action at this time.
0 commit comments