浏览代码

galleri fix

amic 1 年之前
父节点
当前提交
24f8448d7d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      views/news/view.php

+ 2 - 1
views/news/view.php

@@ -289,7 +289,8 @@ if( strpos( $model->text, 'class="InviewElement' ) !== false ){
         var gallery = document.getElementById("gallery-0");
 		g = Array.from(document.getElementsByClassName('gallery'));
 		g.forEach( (gallery) =>{ console.log(gallery);
-        if(gallery!==null) {
+
+        if(gallery!==null && !gallery.classList.contains("splide")) {
             var wrapper = document.createElement("div");
             wrapper.classList.add('gallery-wrapper')
             gallery.parentNode.insertBefore(wrapper, gallery)