u-swiper.js.map 22.4 KB
{"version":3,"sources":["webpack:///C:/Users/15121/Desktop/xytext1119/node_modules/uview-ui/components/u-swiper/u-swiper.vue?b8e3","webpack:///C:/Users/15121/Desktop/xytext1119/node_modules/uview-ui/components/u-swiper/u-swiper.vue?e54c","webpack:///C:/Users/15121/Desktop/xytext1119/node_modules/uview-ui/components/u-swiper/u-swiper.vue?c9ec","webpack:///C:/Users/15121/Desktop/xytext1119/node_modules/uview-ui/components/u-swiper/u-swiper.vue?f430","uni-app:///node_modules/uview-ui/components/u-swiper/u-swiper.vue","webpack:///C:/Users/15121/Desktop/xytext1119/node_modules/uview-ui/components/u-swiper/u-swiper.vue?ee2c","webpack:///C:/Users/15121/Desktop/xytext1119/node_modules/uview-ui/components/u-swiper/u-swiper.vue?eda7"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiI;AACjI;AAC4D;AACL;AACsC;;;AAG7F;AAC6L;AAC7L,gBAAgB,2LAAU;AAC1B,EAAE,8EAAM;AACR,EAAE,+FAAM;AACR,EAAE,wGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,qUAEN;AACP,KAAK;AACL;AACA,aAAa,6VAEN;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnGA;AAAA;AAAA;AAAA;AAAuuB,CAAgB,wrBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4F3vB,gF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgCA,EACA,gBADA,EAEA,sDAFA,EAGA,IAHA,kBAGA,CACA,SACA,eADA,GAGA,CAPA,EAQA,SACA,OADA,mBACA,GADA,EACA,MADA,EACA,CACA,2BACA,wBAFA,CAEA;AACA,KAJA,EARA,EAcA,YACA,SADA,uBACA,kBACA,yBACA,eADA,CAGA;AACA;AACA,uDACA,kDACA,kEACA,CAEA,aACA,CAXA,CAYA,CAdA,EAdA,EA8BA,WACA,WADA,uBACA,IADA,EACA,CACA,iGACA,+CACA,mFACA,0CACA,0CACA,eACA,CACA,CATA,EAUA;AACA,aAXA,qBAWA,IAXA,EAWA,CACA,0CACA,6EACA,2BACA,UACA,CAhBA,EAiBA;AACA,UAlBA,kBAkBA,CAlBA,EAkBA,CACA;AADA,UAGA,OAHA,GAIA,QAJA,CAGA,OAHA,CAKA,mCACA,4BACA,+BACA,CA1BA,EA2BA;AACA,cA5BA,sBA4BA,KA5BA,EA4BA,CACA,gDACA,kCACA;AACA,yEACA,cACA,CACA,CAnCA,EAoCA;AACA,aArCA,qBAqCA,IArCA,EAqCA,CACA,kEACA,CAvCA,EAwCA;AACA,gBAzCA,wBAyCA,KAzCA,EAyCA,CACA,2BACA,CA3CA,EA9BA,E;;;;;;;;;;;;;AC7HA;AAAA;AAAA;AAAA;AAAk5C,CAAgB,uvCAAG,EAAC,C;;;;;;;;;;;ACAt6C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"node-modules/uview-ui/components/u-swiper/u-swiper.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-swiper.vue?vue&type=template&id=7b038a67&scoped=true&\"\nvar renderjs\nimport script from \"./u-swiper.vue?vue&type=script&lang=js&\"\nexport * from \"./u-swiper.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-swiper.vue?vue&type=style&index=0&id=7b038a67&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"7b038a67\",\n  null,\n  false,\n  components,\n  renderjs\n)\n\ncomponent.options.__file = \"node_modules/uview-ui/components/u-swiper/u-swiper.vue\"\nexport default component.exports","export * from \"-!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-swiper.vue?vue&type=template&id=7b038a67&scoped=true&\"","var components\ntry {\n  components = {\n    uLoadingIcon: function() {\n      return import(\n        /* webpackChunkName: \"node-modules/uview-ui/components/u-loading-icon/u-loading-icon\" */ \"uview-ui/components/u-loading-icon/u-loading-icon.vue\"\n      )\n    },\n    uSwiperIndicator: function() {\n      return import(\n        /* webpackChunkName: \"node-modules/uview-ui/components/u-swiper-indicator/u-swiper-indicator\" */ \"uview-ui/components/u-swiper-indicator/u-swiper-indicator.vue\"\n      )\n    }\n  }\n} catch (e) {\n  if (\n    e.message.indexOf(\"Cannot find module\") !== -1 &&\n    e.message.indexOf(\".vue\") !== -1\n  ) {\n    console.error(e.message)\n    console.error(\"1. 排查组件名称拼写是否正确\")\n    console.error(\n      \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n    )\n    console.error(\n      \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n    )\n  } else {\n    throw e\n  }\n}\nvar render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  var g0 = _vm.$u.addUnit(_vm.height)\n  var g1 = _vm.$u.addUnit(_vm.radius)\n  var g2 = !_vm.loading ? _vm.$u.addUnit(_vm.height) : null\n  var g3 = !_vm.loading ? _vm.$u.addUnit(_vm.previousMargin) : null\n  var g4 = !_vm.loading ? _vm.$u.addUnit(_vm.nextMargin) : null\n  var l0 = !_vm.loading\n    ? _vm.__map(_vm.list, function(item, index) {\n        var $orig = _vm.__get_orig(item)\n\n        var s0 = _vm.__get_style([_vm.itemStyle(index)])\n\n        var m0 = _vm.getItemType(item)\n        var g5 = m0 === \"image\" ? _vm.$u.addUnit(_vm.height) : null\n        var g6 = m0 === \"image\" ? _vm.$u.addUnit(_vm.radius) : null\n        var m1 = m0 === \"image\" ? _vm.getSource(item) : null\n        var m2 = _vm.getItemType(item)\n        var g7 = m2 === \"video\" ? _vm.$u.addUnit(_vm.height) : null\n        var m3 = m2 === \"video\" ? _vm.getSource(item) : null\n        var m4 = m2 === \"video\" ? _vm.getPoster(item) : null\n        var g8 =\n          m2 === \"video\"\n            ? _vm.showTitle && _vm.$u.test.object(item) && item.title\n            : null\n        var g9 =\n          _vm.showTitle &&\n          _vm.$u.test.object(item) &&\n          item.title &&\n          _vm.$u.test.image(_vm.getSource(item))\n        return {\n          $orig: $orig,\n          s0: s0,\n          m0: m0,\n          g5: g5,\n          g6: g6,\n          m1: m1,\n          m2: m2,\n          g7: g7,\n          m3: m3,\n          m4: m4,\n          g8: g8,\n          g9: g9\n        }\n      })\n    : null\n\n  var s1 = _vm.__get_style([_vm.$u.addStyle(_vm.indicatorStyle)])\n\n  _vm.$mp.data = Object.assign(\n    {},\n    {\n      $root: {\n        g0: g0,\n        g1: g1,\n        g2: g2,\n        g3: g3,\n        g4: g4,\n        l0: l0,\n        s1: s1\n      }\n    }\n  )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-swiper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-swiper.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view\r\n\t\tclass=\"u-swiper\"\r\n\t\t:style=\"{\r\n\t\t\tbackgroundColor: bgColor,\r\n\t\t\theight: $u.addUnit(height),\r\n\t\t\tborderRadius: $u.addUnit(radius)\r\n\t\t}\"\r\n\t>\r\n\t\t<view\r\n\t\t\tclass=\"u-swiper__loading\"\r\n\t\t\tv-if=\"loading\"\r\n\t\t>\r\n\t\t\t<u-loading-icon mode=\"circle\"></u-loading-icon>\r\n\t\t</view>\r\n\t\t<swiper\r\n\t\t\tv-else\r\n\t\t\tclass=\"u-swiper__wrapper\"\r\n\t\t\t:style=\"{\r\n\t\t\t\theight: $u.addUnit(height),\r\n\t\t\t}\"\r\n\t\t\t@change=\"change\"\r\n\t\t\t:circular=\"circular\"\r\n\t\t\t:interval=\"interval\"\r\n\t\t\t:duration=\"duration\"\r\n\t\t\t:autoplay=\"autoplay\"\r\n\t\t\t:current=\"current\"\r\n\t\t\t:currentItemId=\"currentItemId\"\r\n\t\t\t:previousMargin=\"$u.addUnit(previousMargin)\"\r\n\t\t\t:nextMargin=\"$u.addUnit(nextMargin)\"\r\n\t\t\t:acceleration=\"acceleration\"\r\n\t\t\t:displayMultipleItems=\"displayMultipleItems\"\r\n\t\t\t:easingFunction=\"easingFunction\"\r\n\t\t>\r\n\t\t\t<swiper-item\r\n\t\t\t\tclass=\"u-swiper__wrapper__item\"\r\n\t\t\t\tv-for=\"(item, index) in list\"\r\n\t\t\t\t:key=\"index\"\r\n\t\t\t>\r\n\t\t\t\t<view\r\n\t\t\t\t\tclass=\"u-swiper__wrapper__item__wrapper\"\r\n\t\t\t\t\t:style=\"[itemStyle(index)]\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<!-- 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 -->\r\n\t\t\t\t\t<image\r\n\t\t\t\t\t\tclass=\"u-swiper__wrapper__item__wrapper__image\"\r\n\t\t\t\t\t\tv-if=\"getItemType(item) === 'image'\"\r\n\t\t\t\t\t\t:src=\"getSource(item)\"\r\n\t\t\t\t\t\t:mode=\"imgMode\"\r\n\t\t\t\t\t\t@tap=\"clickHandler(index)\"\r\n\t\t\t\t\t\t:style=\"{\r\n\t\t\t\t\t\t\theight: $u.addUnit(height),\r\n\t\t\t\t\t\t\tborderRadius: $u.addUnit(radius)\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></image>\r\n\t\t\t\t\t<video\r\n\t\t\t\t\t\tclass=\"u-swiper__wrapper__item__wrapper__video\"\r\n\t\t\t\t\t\tv-if=\"getItemType(item) === 'video'\"\r\n\t\t\t\t\t\t:id=\"`video-${index}`\"\r\n\t\t\t\t\t\t:enable-progress-gesture=\"false\"\r\n\t\t\t\t\t\t:src=\"getSource(item)\"\r\n\t\t\t\t\t\t:poster=\"getPoster(item)\"\r\n\t\t\t\t\t\t:title=\"showTitle && $u.test.object(item) && item.title ? item.title : ''\"\r\n\t\t\t\t\t\t:style=\"{\r\n\t\t\t\t\t\t\theight: $u.addUnit(height)\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\tcontrols\r\n\t\t\t\t\t\t@tap=\"clickHandler(index)\"\r\n\t\t\t\t\t></video>\r\n\t\t\t\t\t<text\r\n\t\t\t\t\t\tv-if=\"showTitle && $u.test.object(item) && item.title && $u.test.image(getSource(item))\"\r\n\t\t\t\t\t\tclass=\"u-swiper__wrapper__item__wrapper__title u-line-1\"\r\n\t\t\t\t\t>{{ item.title }}</text>\r\n\t\t\t\t</view>\r\n\t\t\t</swiper-item>\r\n\t\t</swiper>\r\n\t\t<view class=\"u-swiper__indicator\" :style=\"[$u.addStyle(indicatorStyle)]\">\r\n\t\t\t<slot name=\"indicator\">\r\n\t\t\t\t<u-swiper-indicator\r\n\t\t\t\t\tv-if=\"!loading && indicator && !showTitle\"\r\n\t\t\t\t\t:indicatorActiveColor=\"indicatorActiveColor\"\r\n\t\t\t\t\t:indicatorInactiveColor=\"indicatorInactiveColor\"\r\n\t\t\t\t\t:length=\"list.length\"\r\n\t\t\t\t\t:current=\"currentIndex\"\r\n\t\t\t\t\t:indicatorMode=\"indicatorMode\"\r\n\t\t\t\t></u-swiper-indicator>\r\n\t\t\t</slot>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport props from './props.js';\r\n\t/**\r\n\t * Swiper 轮播图\r\n\t * @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用,\r\n\t * @tutorial https://www.uviewui.com/components/swiper.html\r\n\t * @property {Array}\t\t\tlist\t\t\t\t\t轮播图数据\r\n\t * @property {Boolean}\t\t\tindicator\t\t\t\t是否显示面板指示器(默认 false )\r\n\t * @property {String}\t\t\tindicatorActiveColor\t指示器非激活颜色(默认 '#FFFFFF' )\r\n\t * @property {String}\t\t\tindicatorInactiveColor\t指示器的激活颜色(默认 'rgba(255, 255, 255, 0.35)' )\r\n\t * @property {String | Object}\tindicatorStyle\t\t\t指示器样式,可通过bottom,left,right进行定位\r\n\t * @property {String}\t\t\tindicatorMode\t\t\t指示器模式(默认 'line' )\r\n\t * @property {Boolean}\t\t\tautoplay\t\t\t\t是否自动切换(默认 true )\r\n\t * @property {String | Number}\tcurrent\t\t\t\t\t当前所在滑块的 index(默认 0 )\r\n\t * @property {String}\t\t\tcurrentItemId\t\t\t当前所在滑块的 item-id ,不能与 current 被同时指定\r\n\t * @property {String | Number}\tinterval\t\t\t\t滑块自动切换时间间隔(ms)(默认 3000 )\r\n\t * @property {String | Number}\tduration\t\t\t\t滑块切换过程所需时间(ms)(默认 300 )\r\n\t * @property {Boolean}\t\t\tcircular\t\t\t\t播放到末尾后是否重新回到开头(默认 false )\r\n\t * @property {String | Number}\tpreviousMargin\t\t\t前边距,可用于露出前一项的一小部分,nvue和支付宝不支持(默认 0 )\r\n\t * @property {String | Number}\tnextMargin\t\t\t\t后边距,可用于露出后一项的一小部分,nvue和支付宝不支持(默认 0 )\r\n\t * @property {Boolean}\t\t\tacceleration\t\t\t当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持(默认 false )\r\n\t * @property {Number}\t\t\tdisplayMultipleItems\t同时显示的滑块数量,nvue、支付宝小程序不支持(默认 1 )\r\n\t * @property {String}\t\t\teasingFunction\t\t\t指定swiper切换缓动动画类型, 只对微信小程序有效(默认 'default' )\r\n\t * @property {String}\t\t\tkeyName\t\t\t\t\tlist数组中指定对象的目标属性名(默认 'url' )\r\n\t * @property {String}\t\t\timgMode\t\t\t\t\t图片的裁剪模式(默认 'aspectFill' )\r\n\t * @property {String | Number}\theight\t\t\t\t\t组件高度(默认 130 )\r\n\t * @property {String}\t\t\tbgColor\t\t\t\t\t背景颜色(默认 \t'#f3f4f6' )\r\n\t * @property {String | Number}\tradius\t\t\t\t\t组件圆角,数值或带单位的字符串(默认 4 )\r\n\t * @property {Boolean}\t\t\tloading\t\t\t\t\t是否加载中(默认 false )\r\n\t * @property {Boolean}\t\t\tshowTitle\t\t\t\t是否显示标题,要求数组对象中有title属性(默认 false )\r\n\t * @event {Function(index)}\tclick\t点击轮播图时触发\tindex:点击了第几张图片,从0开始\r\n\t * @event {Function(index)}\tchange\t轮播图切换时触发(自动或者手动切换)\tindex:切换到了第几张图片,从0开始\r\n\t * @example\t<u-swiper :list=\"list4\" keyName=\"url\" :autoplay=\"false\"></u-swiper>\r\n\t */\r\n\texport default {\r\n\t\tname: 'u-swiper',\r\n\t\tmixins: [uni.$u.mpMixin, uni.$u.mixin, props],\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tcurrentIndex: 0\r\n\t\t\t}\r\n\t\t},\r\n\t\twatch: {\r\n\t\t\tcurrent(val, preVal) {\r\n\t\t\t\tif(val === preVal) return;\r\n\t\t\t\tthis.currentIndex = val; // 和上游数据关联上\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\titemStyle() {\r\n\t\t\t\treturn index => {\r\n\t\t\t\t\tconst style = {}\r\n\t\t\t\t\t// #ifndef APP-NVUE || MP-TOUTIAO\r\n\t\t\t\t\t// 左右流出空间的写法不支持nvue和头条\r\n\t\t\t\t\t// 只有配置了此二值,才加上对应的圆角,以及缩放\r\n\t\t\t\t\tif (this.nextMargin && this.previousMargin) {\r\n\t\t\t\t\t\tstyle.borderRadius = uni.$u.addUnit(this.radius)\r\n\t\t\t\t\t\tif (index !== this.currentIndex) style.transform = 'scale(0.92)'\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\treturn style\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n      getItemType(item) {\r\n        if (typeof item === 'string') return uni.$u.test.video(this.getSource(item)) ? 'video' : 'image'\r\n        if (typeof item === 'object' && this.keyName) {\r\n          if (!item.type) return uni.$u.test.video(this.getSource(item)) ? 'video' : 'image'\r\n          if (item.type === 'image') return 'image'\r\n          if (item.type === 'video') return 'video'\r\n          return 'image'\r\n        }\r\n      },\r\n\t\t\t// 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName\r\n\t\t\tgetSource(item) {\r\n\t\t\t\tif (typeof item === 'string') return item\r\n\t\t\t\tif (typeof item === 'object' && this.keyName) return item[this.keyName]\r\n\t\t\t\telse uni.$u.error('请按格式传递列表参数')\r\n\t\t\t\treturn ''\r\n\t\t\t},\r\n\t\t\t// 轮播切换事件\r\n\t\t\tchange(e) {\r\n\t\t\t\t// 当前的激活索引\r\n\t\t\t\tconst {\r\n\t\t\t\t\tcurrent\r\n\t\t\t\t} = e.detail\r\n\t\t\t\tthis.pauseVideo(this.currentIndex)\r\n\t\t\t\tthis.currentIndex = current\r\n\t\t\t\tthis.$emit('change', e.detail)\r\n\t\t\t},\r\n\t\t\t// 切换轮播时,暂停视频播放\r\n\t\t\tpauseVideo(index) {\r\n\t\t\t\tconst lastItem = this.getSource(this.list[index])\r\n\t\t\t\tif (uni.$u.test.video(lastItem)) {\r\n\t\t\t\t\t// 当视频隐藏时,暂停播放\r\n\t\t\t\t\tconst video = uni.createVideoContext(`video-${index}`, this)\r\n\t\t\t\t\tvideo.pause()\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 当一个轮播item为视频时,获取它的视频海报\r\n\t\t\tgetPoster(item) {\r\n\t\t\t\treturn typeof item === 'object' && item.poster ? item.poster : ''\r\n\t\t\t},\r\n\t\t\t// 点击某个item\r\n\t\t\tclickHandler(index) {\r\n\t\t\t\tthis.$emit('click', index)\r\n\t\t\t}\r\n\t\t},\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n\t@import \"../../libs/css/components.scss\";\r\n\r\n\t.u-swiper {\r\n\t\t@include flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tposition: relative;\r\n\t\toverflow: hidden;\r\n\r\n\t\t&__wrapper {\r\n\t\t\tflex: 1;\r\n\r\n\t\t\t&__item {\r\n\t\t\t\tflex: 1;\r\n\r\n\t\t\t\t&__wrapper {\r\n\t\t\t\t\t@include flex;\r\n\t\t\t\t\tposition: relative;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\ttransition: transform 0.3s;\r\n\t\t\t\t\tflex: 1;\r\n\r\n\t\t\t\t\t&__image {\r\n\t\t\t\t\t\tflex: 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&__video {\r\n\t\t\t\t\t\tflex: 1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t&__title {\r\n\t\t\t\t\t\tposition: absolute;\r\n\t\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.3);\r\n\t\t\t\t\t\tbottom: 0;\r\n\t\t\t\t\t\tleft: 0;\r\n\t\t\t\t\t\tright: 0;\r\n\t\t\t\t\t\tfont-size: 28rpx;\r\n\t\t\t\t\t\tpadding: 12rpx 24rpx;\r\n\t\t\t\t\t\tcolor: #FFFFFF;\r\n\t\t\t\t\t\tflex: 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t&__indicator {\r\n\t\t\tposition: absolute;\r\n\t\t\tbottom: 10px;\r\n\t\t}\r\n\t}\r\n</style>\r\n","import mod from \"-!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-swiper.vue?vue&type=style&index=0&id=7b038a67&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-swiper.vue?vue&type=style&index=0&id=7b038a67&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n    if(module.hot) {\n      // 1668843638871\n      var cssReload = require(\"C:/Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n      module.hot.dispose(cssReload);\n      module.hot.accept(undefined, cssReload);\n    }\n  "],"sourceRoot":""}