本WIKI于2021年12月31日由玩家申请创建
该WIKI为开放式WIKI,除首页外编辑权限开放,提倡内容共建,请各位在遵守BWIKI社区规则的前提下对内容进行创建、补充、巡查、修正
如有严重内容错误可联系战火与永恒WIKI交流:801329527群管理员反馈问题,欢迎所有愿意分享内容的大佬加入这里。

全站通知:

Widget:Swiper

来自战火与永恒InfinityKingdomWIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

<link rel="stylesheet" href="//wiki-dev-patch-oss.oss-cn-hangzhou.aliyuncs.com/test/swiper-bundle.css"> <script src="//wiki-dev-patch-oss.oss-cn-hangzhou.aliyuncs.com/test/swiper-bundle.min.js"></script> <script> RLQ.push(['jquery', () => { const swipers = []; Object.assign(mw.bwiki = mw.bwiki || {}, {swipers: swipers}); $.each($(".bwiki-swiper-thumbs").get().concat($(".bwiki-swiper:not('.bwiki-swiper-thumbs')").get()), function (i, el) { const attrs = this.attributes; const options = {}; $.each(attrs, function (i, attr) { if (attr.nodeName.indexOf("data-swiper-") === -1 || attr.nodeName === "data-swiper-options") return true; options[attr.nodeName.replace("data-swiper-", "")] = attr.nodeValue; }); try { const optionsTemp = (new Function('el', 'return ' + decodeURIComponent(($(this).attr("data-swiper-options")) || "{}").replace(/\n|\t/g, "").replace(/\+/g, " ")))(el); $.extend(options, optionsTemp); } catch (e) { console.error(e); } console.log("swiper-options", options); swipers.push(new Swiper($.extend({el:this}, options))); }) }]); </script>