Browse Source

Bug Fix: "child" function didn't split a given class name.

NaotoshiFujita 5 năm trước cách đây
mục cha
commit
9bf1248a25
3 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 0 0
      dist/js/splide.min.js
  2. 3 0
      src/js/components/elements/index.js
  3. 1 1
      src/js/utils/dom.js

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/js/splide.min.js


+ 3 - 0
src/js/components/elements/index.js

@@ -77,6 +77,9 @@ export default ( Splide ) => {
 				next: find( arrows, `.${ classes.next }` ),
 			};
 
+			console.log( arrows );
+			console.log( this.arrows );
+
 			const autoplay = findParts( classes.autoplay );
 			this.bar   = find( findParts( classes.progress ), `.${ classes.bar }` );
 			this.play  = find( autoplay, `.${ classes.play }` );

+ 1 - 1
src/js/utils/dom.js

@@ -35,7 +35,7 @@ export function child( parent, className ) {
 		for ( let i in children ) {
 			const child = children[ i ];
 
-			if ( hasClass( child, className ) ) {
+			if ( hasClass( child, className.split( ' ' )[ 0 ] ) ) {
 				return child;
 			}
 		}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác