@nutui/nutui 2.3.4 → 2.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/.DS_Store +0 -0
- package/dist/assets/img/grid.png +0 -0
- package/dist/nutui.css +4 -2
- package/dist/nutui.css.map +1 -1
- package/dist/nutui.js +393 -154
- package/dist/nutui.js.map +1 -1
- package/dist/nutui.min.css +2 -2
- package/dist/nutui.min.js +3 -3
- package/dist/nutui.min.js.map +1 -1
- package/dist/nutui.scss +2 -1
- package/dist/packages/actionsheet/actionsheet.css +1 -1
- package/dist/packages/actionsheet/actionsheet.js +1 -1
- package/dist/packages/address/address.css +1 -1
- package/dist/packages/address/address.js +2 -2
- package/dist/packages/address/address.js.map +1 -1
- package/dist/packages/avatar/avatar.css +1 -1
- package/dist/packages/avatar/avatar.js +2 -2
- package/dist/packages/avatar/avatar.js.map +1 -1
- package/dist/packages/backtop/backtop.css +1 -1
- package/dist/packages/backtop/backtop.js +2 -2
- package/dist/packages/backtop/backtop.js.map +1 -1
- package/dist/packages/badge/badge.css +1 -1
- package/dist/packages/badge/badge.js +2 -2
- package/dist/packages/badge/badge.js.map +1 -1
- package/dist/packages/button/button.css +1 -1
- package/dist/packages/button/button.js +1 -1
- package/dist/packages/buttongroup/buttongroup.css +1 -1
- package/dist/packages/buttongroup/buttongroup.js +1 -1
- package/dist/packages/calendar/calendar.css +1 -1
- package/dist/packages/calendar/calendar.js +2 -2
- package/dist/packages/calendar/calendar.js.map +1 -1
- package/dist/packages/calendar/calendar.vue +1 -1
- package/dist/packages/cell/cell.css +1 -1
- package/dist/packages/cell/cell.js +2 -2
- package/dist/packages/cell/cell.js.map +1 -1
- package/dist/packages/checkbox/checkbox.css +1 -1
- package/dist/packages/checkbox/checkbox.js +2 -2
- package/dist/packages/checkboxgroup/checkboxgroup.css +1 -1
- package/dist/packages/checkboxgroup/checkboxgroup.js +2 -2
- package/dist/packages/checkboxgroup/checkboxgroup.js.map +1 -1
- package/dist/packages/circleprogress/circleprogress.css +1 -1
- package/dist/packages/circleprogress/circleprogress.js +2 -2
- package/dist/packages/circleprogress/circleprogress.js.map +1 -1
- package/dist/packages/col/col.css +1 -1
- package/dist/packages/col/col.js +1 -1
- package/dist/packages/collapse/collapse.css +1 -1
- package/dist/packages/collapse/collapse.js +2 -2
- package/dist/packages/collapse/collapse.js.map +1 -1
- package/dist/packages/collapseitem/collapseitem.css +1 -1
- package/dist/packages/collapseitem/collapseitem.js +2 -2
- package/dist/packages/collapseitem/collapseitem.js.map +1 -1
- package/dist/packages/countdown/countdown.css +1 -1
- package/dist/packages/countdown/countdown.js +2 -2
- package/dist/packages/countdown/countdown.js.map +1 -1
- package/dist/packages/countup/countup.css +2 -2
- package/dist/packages/countup/countup.js +2 -2
- package/dist/packages/countup/countup.js.map +1 -1
- package/dist/packages/countup/countup.scss +2 -1
- package/dist/packages/countup/countup.vue +22 -10
- package/dist/packages/coupon/coupon.css +1 -1
- package/dist/packages/coupon/coupon.js +2 -2
- package/dist/packages/coupon/coupon.js.map +1 -1
- package/dist/packages/datepicker/datepicker.css +1 -1
- package/dist/packages/datepicker/datepicker.js +2 -2
- package/dist/packages/datepicker/datepicker.js.map +1 -1
- package/dist/packages/dialog/dialog.css +1 -1
- package/dist/packages/dialog/dialog.js +2 -2
- package/dist/packages/dialog/dialog.js.map +1 -1
- package/dist/packages/drag/drag.css +1 -1
- package/dist/packages/drag/drag.js +2 -2
- package/dist/packages/drag/drag.js.map +1 -1
- package/dist/packages/elevator/elevator.css +1 -1
- package/dist/packages/elevator/elevator.js +2 -2
- package/dist/packages/elevator/elevator.js.map +1 -1
- package/dist/packages/fixednav/fixednav.css +1 -1
- package/dist/packages/fixednav/fixednav.js +2 -2
- package/dist/packages/fixednav/fixednav.js.map +1 -1
- package/dist/packages/flex/flex.css +1 -1
- package/dist/packages/flex/flex.js +2 -2
- package/dist/packages/flex/flex.js.map +1 -1
- package/dist/packages/icon/icon.css +1 -1
- package/dist/packages/icon/icon.js +1 -1
- package/dist/packages/imagepicker/imagepicker.css +1 -1
- package/dist/packages/imagepicker/imagepicker.js +2 -2
- package/dist/packages/imagepicker/imagepicker.js.map +1 -1
- package/dist/packages/infiniteloading/infiniteloading.css +1 -1
- package/dist/packages/infiniteloading/infiniteloading.js +2 -2
- package/dist/packages/infiniteloading/infiniteloading.js.map +1 -1
- package/dist/packages/infiniteloading/infiniteloading.vue +5 -1
- package/dist/packages/lazyload/lazyload.css +1 -1
- package/dist/packages/lazyload/lazyload.js +2 -2
- package/dist/packages/lazyload/lazyload.js.map +1 -1
- package/dist/packages/leftslip/leftslip.css +1 -1
- package/dist/packages/leftslip/leftslip.js +2 -2
- package/dist/packages/leftslip/leftslip.js.map +1 -1
- package/dist/packages/luckdraw/luckdraw.css +1 -1
- package/dist/packages/luckdraw/luckdraw.js +2 -2
- package/dist/packages/luckdraw/luckdraw.js.map +1 -1
- package/dist/packages/luckycard/luckycard.css +1 -1
- package/dist/packages/luckycard/luckycard.js +2 -2
- package/dist/packages/luckycard/luckycard.js.map +1 -1
- package/dist/packages/magic/magic.css +1 -1
- package/dist/packages/magic/magic.js +2 -2
- package/dist/packages/magic/magic.js.map +1 -1
- package/dist/packages/menu/menu.css +1 -1
- package/dist/packages/menu/menu.js +2 -2
- package/dist/packages/menu/menu.js.map +1 -1
- package/dist/packages/navbar/navbar.css +1 -1
- package/dist/packages/navbar/navbar.js +2 -2
- package/dist/packages/navbar/navbar.js.map +1 -1
- package/dist/packages/ninegrid/animation.scss +223 -0
- package/dist/packages/ninegrid/index.js +8 -0
- package/dist/packages/ninegrid/ninegrid.css +5 -0
- package/dist/packages/ninegrid/ninegrid.js +7 -0
- package/dist/packages/ninegrid/ninegrid.js.map +1 -0
- package/dist/packages/ninegrid/ninegrid.scss +132 -0
- package/dist/packages/ninegrid/ninegrid.vue +144 -0
- package/dist/packages/noticebar/noticebar.css +1 -1
- package/dist/packages/noticebar/noticebar.js +2 -2
- package/dist/packages/noticebar/noticebar.js.map +1 -1
- package/dist/packages/notify/notify.css +1 -1
- package/dist/packages/notify/notify.js +2 -2
- package/dist/packages/notify/notify.js.map +1 -1
- package/dist/packages/numberkeyboard/numberkeyboard.css +1 -1
- package/dist/packages/numberkeyboard/numberkeyboard.js +2 -2
- package/dist/packages/numberkeyboard/numberkeyboard.js.map +1 -1
- package/dist/packages/picker/picker.css +1 -1
- package/dist/packages/picker/picker.js +2 -2
- package/dist/packages/picker/picker.js.map +1 -1
- package/dist/packages/popup/popup.css +1 -1
- package/dist/packages/popup/popup.js +1 -1
- package/dist/packages/price/price.css +1 -1
- package/dist/packages/price/price.js +2 -2
- package/dist/packages/price/price.js.map +1 -1
- package/dist/packages/progress/progress.css +1 -1
- package/dist/packages/progress/progress.js +2 -2
- package/dist/packages/progress/progress.js.map +1 -1
- package/dist/packages/radio/radio.css +1 -1
- package/dist/packages/radio/radio.js +2 -2
- package/dist/packages/radio/radio.js.map +1 -1
- package/dist/packages/radiogroup/radiogroup.css +1 -1
- package/dist/packages/radiogroup/radiogroup.js +2 -2
- package/dist/packages/radiogroup/radiogroup.js.map +1 -1
- package/dist/packages/range/range.css +1 -1
- package/dist/packages/range/range.js +2 -2
- package/dist/packages/range/range.js.map +1 -1
- package/dist/packages/rate/rate.css +1 -1
- package/dist/packages/rate/rate.js +2 -2
- package/dist/packages/rate/rate.js.map +1 -1
- package/dist/packages/row/row.css +1 -1
- package/dist/packages/row/row.js +1 -1
- package/dist/packages/scroller/scroller.css +1 -1
- package/dist/packages/scroller/scroller.js +2 -2
- package/dist/packages/scroller/scroller.js.map +1 -1
- package/dist/packages/scroller/scroller.vue +5 -0
- package/dist/packages/scroller/vertical-scroll.vue +7 -2
- package/dist/packages/searchbar/searchbar.css +1 -1
- package/dist/packages/searchbar/searchbar.js +2 -2
- package/dist/packages/searchbar/searchbar.js.map +1 -1
- package/dist/packages/shortpassword/shortpassword.css +1 -1
- package/dist/packages/shortpassword/shortpassword.js +2 -2
- package/dist/packages/shortpassword/shortpassword.js.map +1 -1
- package/dist/packages/sidenavbar/sidenavbar.css +1 -1
- package/dist/packages/sidenavbar/sidenavbar.js +2 -2
- package/dist/packages/sidenavbar/sidenavbar.js.map +1 -1
- package/dist/packages/sidenavbaritem/sidenavbaritem.css +1 -1
- package/dist/packages/sidenavbaritem/sidenavbaritem.js +1 -1
- package/dist/packages/signature/signature.css +1 -1
- package/dist/packages/signature/signature.js +2 -2
- package/dist/packages/signature/signature.js.map +1 -1
- package/dist/packages/skeleton/skeleton.css +1 -1
- package/dist/packages/skeleton/skeleton.js +2 -2
- package/dist/packages/skeleton/skeleton.js.map +1 -1
- package/dist/packages/slider/slider.css +1 -1
- package/dist/packages/slider/slider.js +2 -2
- package/dist/packages/slider/slider.js.map +1 -1
- package/dist/packages/stepper/stepper.css +1 -1
- package/dist/packages/stepper/stepper.js +2 -2
- package/dist/packages/stepper/stepper.js.map +1 -1
- package/dist/packages/steps/steps.css +1 -1
- package/dist/packages/steps/steps.js +2 -2
- package/dist/packages/steps/steps.js.map +1 -1
- package/dist/packages/subsidenavbar/subsidenavbar.css +1 -1
- package/dist/packages/subsidenavbar/subsidenavbar.js +1 -1
- package/dist/packages/swiper/swiper.css +1 -1
- package/dist/packages/swiper/swiper.js +2 -2
- package/dist/packages/swiper/swiper.js.map +1 -1
- package/dist/packages/switch/switch.css +1 -1
- package/dist/packages/switch/switch.js +2 -2
- package/dist/packages/switch/switch.js.map +1 -1
- package/dist/packages/tab/tab.css +1 -1
- package/dist/packages/tab/tab.js +2 -2
- package/dist/packages/tab/tab.js.map +1 -1
- package/dist/packages/tab/tab.vue +1 -0
- package/dist/packages/tabbar/tabbar.css +1 -1
- package/dist/packages/tabbar/tabbar.js +2 -2
- package/dist/packages/tabbar/tabbar.js.map +1 -1
- package/dist/packages/tabbar/tabbar.vue +1 -1
- package/dist/packages/tabpanel/tabpanel.css +1 -1
- package/dist/packages/tabpanel/tabpanel.js +2 -2
- package/dist/packages/tabpanel/tabpanel.js.map +1 -1
- package/dist/packages/tabselect/tabselect.css +1 -1
- package/dist/packages/tabselect/tabselect.js +2 -2
- package/dist/packages/tabselect/tabselect.js.map +1 -1
- package/dist/packages/textbox/textbox.css +1 -1
- package/dist/packages/textbox/textbox.js +2 -2
- package/dist/packages/textbox/textbox.js.map +1 -1
- package/dist/packages/textinput/textinput.css +1 -1
- package/dist/packages/textinput/textinput.js +2 -2
- package/dist/packages/textinput/textinput.js.map +1 -1
- package/dist/packages/timeline/timeline.css +1 -1
- package/dist/packages/timeline/timeline.js +2 -2
- package/dist/packages/timeline/timeline.js.map +1 -1
- package/dist/packages/timelineitem/timelineitem.css +1 -1
- package/dist/packages/timelineitem/timelineitem.js +2 -2
- package/dist/packages/timelineitem/timelineitem.js.map +1 -1
- package/dist/packages/toast/toast.css +1 -1
- package/dist/packages/toast/toast.js +2 -2
- package/dist/packages/toast/toast.js.map +1 -1
- package/dist/packages/uploader/uploader.css +1 -1
- package/dist/packages/uploader/uploader.js +2 -2
- package/dist/packages/uploader/uploader.js.map +1 -1
- package/dist/packages/video/video.css +1 -1
- package/dist/packages/video/video.js +2 -2
- package/dist/packages/video/video.js.map +1 -1
- package/dist/types/nutui.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - subsidenavbar.css, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/.nut-subsidenavbar{display:grid;float:left;width:100%;position:relative}.nut-subsidenavbar .item-title{display:block;width:100%;height:40px;position:relative;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:1px solid #f6f6f6;color:#2d2d2d;font-size:16px;background-color:#f6f6f6}.nut-subsidenavbar .item-title .sidenavbar-title{line-height:40px;color:#2d2d2d}.nut-subsidenavbar .sidenavbar-icon{position:absolute;top:50%;right:20px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.nut-subsidenavbar .sidenavbar-icon i{-webkit-transition:-webkit-transform .25s cubic-bezier(.445,.05,.55,.95);transition:-webkit-transform .25s cubic-bezier(.445,.05,.55,.95);-o-transition:transform .25s cubic-bezier(.445,.05,.55,.95);transition:transform .25s cubic-bezier(.445,.05,.55,.95);transition:transform .25s cubic-bezier(.445,.05,.55,.95),-webkit-transform .25s cubic-bezier(.445,.05,.55,.95)}.nut-subsidenavbar .sidenavbar-icon i.up{-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg)}.nut-subsidenavbar .sub-sidenavbar-list{width:100%}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - subsidenavbar.js, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - swiper.css, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/.nut-swiper{position:relative;overflow:hidden;height:200px}.nut-swiper .nut-swiper-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;display:-webkit-flex;width:100%;height:100%;-o-transition:all 0ms ease;transition:all 0ms ease;-webkit-transition:all 0ms ease}.nut-swiper .nut-swiper-slide{overflow:hidden;-ms-flex-negative:0;flex-shrink:0;-webkit-flex-shrink:0;width:100%;height:100%;cursor:default;position:relative}@-webkit-keyframes nut-preloader-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes nut-preloader-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.nut-swiper .nut-swiper-slide .nut-lazy.img{width:100%;height:100%;background-repeat:no-repeat;background-size:100% 100%}.nut-swiper .nut-swiper-slide .nut-lazy.preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:nut-preloader-spin 1s linear infinite;animation:nut-preloader-spin 1s linear infinite;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:50%;border-radius:50%;border:4px solid #fff;border-top-color:transparent}.nut-swiper.horizontal .nut-swiper-wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-flex-direction:row}.nut-swiper.vertical .nut-swiper-wrap{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-flex-direction:column}.nut-swiper .nut-swiper-pagination{position:absolute}.nut-swiper .nut-swiper-pagination .swiper-pagination-bullet{width:8px;height:8px;-webkit-border-radius:50%;border-radius:50%;background-color:#000;opacity:.2;-o-transition:all .5s ease;transition:all .5s ease;-webkit-transition:all .5s ease}.nut-swiper .nut-swiper-pagination .swiper-pagination-bullet.active{background-color:#007aff;opacity:1}.nut-swiper.vertical .nut-swiper-pagination{right:10px;top:50%;transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0)}.nut-swiper.vertical .nut-swiper-pagination .swiper-pagination-bullet{display:block;margin:6px 0}.nut-swiper.horizontal .nut-swiper-pagination{bottom:10px;width:100%;text-align:center}.nut-swiper.horizontal .nut-swiper-pagination .swiper-pagination-bullet{display:inline-block;margin:0 3px}.nut-swiper img{pointer-events:none}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - swiper.js, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("swiper",[],e):"object"==typeof exports?exports.swiper=e():t.swiper=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="./",i(i.s=180)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,r,a,o){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):s&&(l=o?function(){s.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(u.functional){u._injectStyles=l;var h=u.render;u.render=function(t,e){return l.call(e),h(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}i.d(e,"a",(function(){return n}))},106:function(t,e,i){},13:function(t,e,i){var n=i(9);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},180:function(t,e,i){"use strict";i.r(e);var n=i(4),s=i.n(n),r="vertical",a="horizontal",o={name:"nut-swiper",props:{direction:{type:String,default:a,validator:function(t){return[r,a].indexOf(t)>-1}},paginationVisible:{type:Boolean,default:!1},paginationClickable:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},speed:{type:Number,default:500},canDragging:{type:Boolean,default:!0},autoPlay:{type:Number,default:0},initPage:{type:Number,default:1},newCurrentPage:{type:Number,default:1},lazyLoad:{type:Boolean,default:!1},lazyLoadUrl:{type:String,default:""},swiperData:{type:[Array],default:function(){return[]}}},watch:{swiperData:function(t,e){this.updateEvent()},newCurrentPage:function(t){var e=t%this.slideEls.length;(t=0==e?this.slideEls.length:e<0?this.slideEls.length+e:e)>=this.currentPage?this.next(t-this.currentPage):this.prev(this.currentPage-t)}},data:function(){return{dragging:!1,currentPage:this.initPage||this.newCurrentPage,lastPage:1,translateX:0,translateY:0,startTranslate:0,slideEls:[],translateOffset:0,transitionDuration:0,startPos:null,delta:0,startTime:null,isLoop:this.loop,timer:null,domTimer:null,stopAutoPlay:!1,swiperWrap:null,oneSlideTranslate:0}},methods:{next:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.currentPage;e+t<this.slideEls.length||this.isLoop?this.setPage(e+t,!0,"NEXT"):this._revert()},prev:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.currentPage;e-t>1||this.isLoop?this.setPage(e-t,!0,"PREV"):this._revert()},setPage:function(t,e,i){0===t?this.currentPage=this.slideEls.length:t>this.slideEls.length?this.currentPage=t-this.slideEls.length:this.currentPage=t,this._setTranslate(this._getTranslateOfPage(t)),e?this._onTransitionStart(i):this._slideClassHandle()},isHorizontal:function(){return this.direction===a},isVertical:function(){return this.direction===r},renderLazyDom:function(t){var e=this;return t.forEach((function(t,i){t.getAttribute("data-src");if("nut-swiper-slide nut-swiper-slide-selected"!=t.className){var n=document.createElement("div");e.lazyLoadUrl?(n.style.backgroundImage="url('".concat(e.lazyLoadUrl,"')"),n.className="nut-lazy img"):n.className="nut-lazy preloader",t.appendChild(n)}})),!0},updateEvent:function(t){var e=this;this.$nextTick((function(){e.domTimer=setTimeout((function(){null!=t&&(e.currentPage=t),e.swiperWrap=e.$el.querySelector(".nut-swiper-wrap"),e.slideEls=s()(e.swiperWrap.children),0!==e.slideEls.length&&(e._getSlideDistance(e.slideEls[0]),0!=e.autoPlay&&(e.isLoop=!0,e._createAutoPlay()),e.isLoop&&e._createLoop(),e.setPage(e.currentPage,!1),e.lazyLoad&&e.renderLazyDom(e.slideEls)&&e._imgLazyLoad())}),0)}))},_slideClassHandle:function(){var t=this.$el.querySelector(".nut-swiper-slide-selected");t&&t.classList.remove("nut-swiper-slide-selected"),this.slideEls[this.currentPage-1].classList.add("nut-swiper-slide-selected"),this.lastPage=this.currentPage},_getSlideDistance:function(t){var e=getComputedStyle(t),i=e.marginTop.replace("px","")-0,n=e.marginBottom.replace("px","")-0,s=e.marginRight.replace("px","")-0,r=e.marginLeft.replace("px","")-0;this.isHorizontal()?this.oneSlideTranslate=s+r+t.offsetWidth:this.oneSlideTranslate=i+n+t.offsetHeight},_onTouchStart:function(t){this.swiperWrap.addEventListener("touchmove",this._onTouchMove,!1),this.swiperWrap.addEventListener("touchend",this._onTouchEnd,!1),this.swiperWrap.addEventListener("mousemove",this._onTouchMove,!1),this.swiperWrap.addEventListener("mouseup",this._onTouchEnd,!1),this.startPos=this._getTouchPos(t),this.delta=0,this.startTranslate=this._getTranslateOfPage(this.currentPage),this.isLoop&&this._setTranslate(this.startTranslate),this.startTime=(new Date).getTime(),this.dragging=!0,this.transitionDuration=0,this.stopAutoPlay=!0},_onTouchMove:function(t){this.dragging&&(this.isHorizontal()?this.delta=this._getTouchPos(t).x-this.startPos.x:this.delta=this._getTouchPos(t).y-this.startPos.y,this.canDragging&&this._computePreventDefault(t)&&(t.preventDefault(),this._setTranslate(this.startTranslate+this.delta),this.$emit("slideMove",this._getTranslate(),this.$el),this.$emit("slide-move",this._getTranslate(),this.$el)))},_onTouchEnd:function(t){if(this.dragging){this.dragging=!1,this.transitionDuration=this.speed;var e=(new Date).getTime()-this.startTime<1e3;this.delta<-this.oneSlideTranslate/2||e&&this.delta<-15?this.next():this.delta>this.oneSlideTranslate/2||e&&this.delta>15?this.prev():this._revert(),this.swiperWrap.removeEventListener("touchmove",this._onTouchMove,!1),this.swiperWrap.removeEventListener("touchend",this._onTouchEnd,!1),this.swiperWrap.removeEventListener("mousemove",this._onTouchMove,!1),this.swiperWrap.removeEventListener("mouseup",this._onTouchEnd,!1)}},_revert:function(){this.setPage(this.currentPage,!0)},_computePreventDefault:function(t){var e=this._getTouchPos(t),i=Math.abs(this.startPos.x-e.x),n=Math.abs(this.startPos.y-e.y);return!(i<=5&&i>=0)&&!(n>5&&n/i>.5)},_getTouchPos:function(t){return{x:t.changedTouches?t.changedTouches[0].pageX:t.pageX,y:t.changedTouches?t.changedTouches[0].pageY:t.pageY}},_onTransitionStart:function(t){this.transitionDuration=this.speed,this.lazyLoad&&this._imgLazyLoad(1),this._isPageChanged()?(this.$emit("slideChangeStart",this.currentPage,this.$el,t),this.$emit("slide-change-start",this.currentPage,this.$el,t)):(this.$emit("slideRevertStart",this.currentPage,this.$el,t),this.$emit("slide-revert-start",this.currentPage,this.$el,t))},_onTransitionEnd:function(){this._isPageChanged()?(this.$emit("slideChangeEnd",this.currentPage,this.$el),this.$emit("slide-change-end",this.currentPage,this.$el)):(this.$emit("slideRevertEnd",this.currentPage,this.$el),this.$emit("slide-revert-end",this.currentPage,this.$el)),this.transitionDuration=0,this.delta=0,this.lastPage=this.currentPage,this._slideClassHandle(),this.isLoop&&this._setTranslate(this._getTranslateOfPage(this.currentPage)),this.stopAutoPlay=!1},_isPageChanged:function(){return this.lastPage!==this.currentPage},_setTranslate:function(t){this[this.isHorizontal()?"translateX":"translateY"]=t},_getTranslate:function(){return this[this.isHorizontal()?"translateX":"translateY"]},_getTranslateOfPage:function(t){if(0===t)return 0;this.isHorizontal();var e=this;return-[].reduce.call(this.slideEls,(function(i,n,s){return s>t-2?i:i+e.oneSlideTranslate}),0)+this.translateOffset},_createLoop:function(){this.isHorizontal();var t=this.$el.querySelector(".nut-swiper-wrap"),e=t.firstElementChild.cloneNode(!0),i=t.lastElementChild.cloneNode(!0);t.insertBefore(i,t.firstElementChild),t.appendChild(e),this.translateOffset=-this.oneSlideTranslate},_createAutoPlay:function(){var t=this;clearInterval(this.timer),this.timer=setInterval((function(){t.stopAutoPlay||t.next()}),this.autoPlay)},_requestAniFrame:function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}},_imgLazyLoad:function(t){var e,i=this;this._requestAniFrame()((function(){e=i.swiperWrap.querySelectorAll(".nut-img-lazyload"),1==t&&(e=i.slideEls[i.currentPage-1].querySelectorAll(".nut-img-lazyload")),e.forEach((function(e,n){if(i._checkInView(e)||1==t){var s=e.getAttribute("data-src"),r=new Image;r.src=s,r.onload=function(){var t=e.parentElement.querySelector(".nut-lazy");t&&e.parentElement.removeChild(t),e.src=s,e.classList.remove("nut-img-lazyload")},r.onerror=function(){e.src=i.lazyLoadUrl,e.classList.remove("nut-img-lazyload")}}}))}))},_checkInView:function(t){var e=t.getBoundingClientRect(),i=this.$el.getBoundingClientRect(),n=e.top,s=e.left,r=this.$el.clientWidth,a=this.$el.clientHeight,o=i.top,l=i.left,u=!0;return(n>o+a||s>l+r)&&(u=!1),u}},created:function(){},mounted:function(){this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this.updateEvent()},destroyed:function(){this.timer&&clearInterval(this.timer),this.domTimer&&clearTimeout(this.domTimer)},activated:function(){this.keepAlive&&(this.keepAlive=!1,this.updateEvent())},deactivated:function(){this.keepAlive=!0,this.timer&&clearInterval(this.timer),this.domTimer&&clearTimeout(this.domTimer)}},l=i(0),u=Object(l.a)(o,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nut-swiper",class:[t.direction,{dragging:t.dragging}],on:{touchstart:function(e){return t._onTouchStart(e)},mousedown:function(e){return t._onTouchStart(e)}}},[i("div",{staticClass:"nut-swiper-wrap",style:{transform:"translate3d("+t.translateX+"px,"+t.translateY+"px,0)","transition-duration":t.transitionDuration+"ms","-webkit-transform":"translate3d("+t.translateX+"px,"+t.translateY+"px,0)","-webkit-transition-duration":t.transitionDuration+"ms","transition-timing-function":"ease"},on:{transitionend:t._onTransitionEnd}},[t._t("default")],2),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.paginationVisible,expression:"paginationVisible"}],staticClass:"nut-swiper-pagination"},t._l(t.slideEls,(function(e,n){return i("span",{key:n,staticClass:"swiper-pagination-bullet",class:{active:n+1===t.currentPage},on:{click:function(e){t.paginationClickable&&t.setPage(n+1,!0)}}})})),0)])}),[],!1,null,null,null).exports;i(106);u.install=function(t){t.component(u.name,u)};e.default=u},4:function(t,e,i){var n=i(46),s=i(47),r=i(13),a=i(48);t.exports=function(t){return n(t)||s(t)||r(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},46:function(t,e,i){var n=i(9);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},47:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},48:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},9:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.default=t.exports,t.exports.__esModule=!0}})}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("swiper",[],e):"object"==typeof exports?exports.swiper=e():t.swiper=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="./",i(i.s=181)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,r,a,o){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):s&&(l=o?function(){s.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(u.functional){u._injectStyles=l;var h=u.render;u.render=function(t,e){return l.call(e),h(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}i.d(e,"a",(function(){return n}))},106:function(t,e,i){},13:function(t,e,i){var n=i(9);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},181:function(t,e,i){"use strict";i.r(e);var n=i(4),s=i.n(n),r="vertical",a="horizontal",o={name:"nut-swiper",props:{direction:{type:String,default:a,validator:function(t){return[r,a].indexOf(t)>-1}},paginationVisible:{type:Boolean,default:!1},paginationClickable:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},speed:{type:Number,default:500},canDragging:{type:Boolean,default:!0},autoPlay:{type:Number,default:0},initPage:{type:Number,default:1},newCurrentPage:{type:Number,default:1},lazyLoad:{type:Boolean,default:!1},lazyLoadUrl:{type:String,default:""},swiperData:{type:[Array],default:function(){return[]}}},watch:{swiperData:function(t,e){this.updateEvent()},newCurrentPage:function(t){var e=t%this.slideEls.length;(t=0==e?this.slideEls.length:e<0?this.slideEls.length+e:e)>=this.currentPage?this.next(t-this.currentPage):this.prev(this.currentPage-t)}},data:function(){return{dragging:!1,currentPage:this.initPage||this.newCurrentPage,lastPage:1,translateX:0,translateY:0,startTranslate:0,slideEls:[],translateOffset:0,transitionDuration:0,startPos:null,delta:0,startTime:null,isLoop:this.loop,timer:null,domTimer:null,stopAutoPlay:!1,swiperWrap:null,oneSlideTranslate:0}},methods:{next:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.currentPage;e+t<this.slideEls.length||this.isLoop?this.setPage(e+t,!0,"NEXT"):this._revert()},prev:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.currentPage;e-t>1||this.isLoop?this.setPage(e-t,!0,"PREV"):this._revert()},setPage:function(t,e,i){0===t?this.currentPage=this.slideEls.length:t>this.slideEls.length?this.currentPage=t-this.slideEls.length:this.currentPage=t,this._setTranslate(this._getTranslateOfPage(t)),e?this._onTransitionStart(i):this._slideClassHandle()},isHorizontal:function(){return this.direction===a},isVertical:function(){return this.direction===r},renderLazyDom:function(t){var e=this;return t.forEach((function(t,i){t.getAttribute("data-src");if("nut-swiper-slide nut-swiper-slide-selected"!=t.className){var n=document.createElement("div");e.lazyLoadUrl?(n.style.backgroundImage="url('".concat(e.lazyLoadUrl,"')"),n.className="nut-lazy img"):n.className="nut-lazy preloader",t.appendChild(n)}})),!0},updateEvent:function(t){var e=this;this.$nextTick((function(){e.domTimer=setTimeout((function(){null!=t&&(e.currentPage=t),e.swiperWrap=e.$el.querySelector(".nut-swiper-wrap"),e.slideEls=s()(e.swiperWrap.children),0!==e.slideEls.length&&(e._getSlideDistance(e.slideEls[0]),0!=e.autoPlay&&(e.isLoop=!0,e._createAutoPlay()),e.isLoop&&e._createLoop(),e.setPage(e.currentPage,!1),e.lazyLoad&&e.renderLazyDom(e.slideEls)&&e._imgLazyLoad())}),0)}))},_slideClassHandle:function(){var t=this.$el.querySelector(".nut-swiper-slide-selected");t&&t.classList.remove("nut-swiper-slide-selected"),this.slideEls[this.currentPage-1].classList.add("nut-swiper-slide-selected"),this.lastPage=this.currentPage},_getSlideDistance:function(t){var e=getComputedStyle(t),i=e.marginTop.replace("px","")-0,n=e.marginBottom.replace("px","")-0,s=e.marginRight.replace("px","")-0,r=e.marginLeft.replace("px","")-0;this.isHorizontal()?this.oneSlideTranslate=s+r+t.offsetWidth:this.oneSlideTranslate=i+n+t.offsetHeight},_onTouchStart:function(t){this.swiperWrap.addEventListener("touchmove",this._onTouchMove,!1),this.swiperWrap.addEventListener("touchend",this._onTouchEnd,!1),this.swiperWrap.addEventListener("mousemove",this._onTouchMove,!1),this.swiperWrap.addEventListener("mouseup",this._onTouchEnd,!1),this.startPos=this._getTouchPos(t),this.delta=0,this.startTranslate=this._getTranslateOfPage(this.currentPage),this.isLoop&&this._setTranslate(this.startTranslate),this.startTime=(new Date).getTime(),this.dragging=!0,this.transitionDuration=0,this.stopAutoPlay=!0},_onTouchMove:function(t){this.dragging&&(this.isHorizontal()?this.delta=this._getTouchPos(t).x-this.startPos.x:this.delta=this._getTouchPos(t).y-this.startPos.y,this.canDragging&&this._computePreventDefault(t)&&(t.preventDefault(),this._setTranslate(this.startTranslate+this.delta),this.$emit("slideMove",this._getTranslate(),this.$el),this.$emit("slide-move",this._getTranslate(),this.$el)))},_onTouchEnd:function(t){if(this.dragging){this.dragging=!1,this.transitionDuration=this.speed;var e=(new Date).getTime()-this.startTime<1e3;this.delta<-this.oneSlideTranslate/2||e&&this.delta<-15?this.next():this.delta>this.oneSlideTranslate/2||e&&this.delta>15?this.prev():this._revert(),this.swiperWrap.removeEventListener("touchmove",this._onTouchMove,!1),this.swiperWrap.removeEventListener("touchend",this._onTouchEnd,!1),this.swiperWrap.removeEventListener("mousemove",this._onTouchMove,!1),this.swiperWrap.removeEventListener("mouseup",this._onTouchEnd,!1)}},_revert:function(){this.setPage(this.currentPage,!0)},_computePreventDefault:function(t){var e=this._getTouchPos(t),i=Math.abs(this.startPos.x-e.x),n=Math.abs(this.startPos.y-e.y);return!(i<=5&&i>=0)&&!(n>5&&n/i>.5)},_getTouchPos:function(t){return{x:t.changedTouches?t.changedTouches[0].pageX:t.pageX,y:t.changedTouches?t.changedTouches[0].pageY:t.pageY}},_onTransitionStart:function(t){this.transitionDuration=this.speed,this.lazyLoad&&this._imgLazyLoad(1),this._isPageChanged()?(this.$emit("slideChangeStart",this.currentPage,this.$el,t),this.$emit("slide-change-start",this.currentPage,this.$el,t)):(this.$emit("slideRevertStart",this.currentPage,this.$el,t),this.$emit("slide-revert-start",this.currentPage,this.$el,t))},_onTransitionEnd:function(){this._isPageChanged()?(this.$emit("slideChangeEnd",this.currentPage,this.$el),this.$emit("slide-change-end",this.currentPage,this.$el)):(this.$emit("slideRevertEnd",this.currentPage,this.$el),this.$emit("slide-revert-end",this.currentPage,this.$el)),this.transitionDuration=0,this.delta=0,this.lastPage=this.currentPage,this._slideClassHandle(),this.isLoop&&this._setTranslate(this._getTranslateOfPage(this.currentPage)),this.stopAutoPlay=!1},_isPageChanged:function(){return this.lastPage!==this.currentPage},_setTranslate:function(t){this[this.isHorizontal()?"translateX":"translateY"]=t},_getTranslate:function(){return this[this.isHorizontal()?"translateX":"translateY"]},_getTranslateOfPage:function(t){if(0===t)return 0;this.isHorizontal();var e=this;return-[].reduce.call(this.slideEls,(function(i,n,s){return s>t-2?i:i+e.oneSlideTranslate}),0)+this.translateOffset},_createLoop:function(){this.isHorizontal();var t=this.$el.querySelector(".nut-swiper-wrap"),e=t.firstElementChild.cloneNode(!0),i=t.lastElementChild.cloneNode(!0);t.insertBefore(i,t.firstElementChild),t.appendChild(e),this.translateOffset=-this.oneSlideTranslate},_createAutoPlay:function(){var t=this;clearInterval(this.timer),this.timer=setInterval((function(){t.stopAutoPlay||t.next()}),this.autoPlay)},_requestAniFrame:function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}},_imgLazyLoad:function(t){var e,i=this;this._requestAniFrame()((function(){e=i.swiperWrap.querySelectorAll(".nut-img-lazyload"),1==t&&(e=i.slideEls[i.currentPage-1].querySelectorAll(".nut-img-lazyload")),e.forEach((function(e,n){if(i._checkInView(e)||1==t){var s=e.getAttribute("data-src"),r=new Image;r.src=s,r.onload=function(){var t=e.parentElement.querySelector(".nut-lazy");t&&e.parentElement.removeChild(t),e.src=s,e.classList.remove("nut-img-lazyload")},r.onerror=function(){e.src=i.lazyLoadUrl,e.classList.remove("nut-img-lazyload")}}}))}))},_checkInView:function(t){var e=t.getBoundingClientRect(),i=this.$el.getBoundingClientRect(),n=e.top,s=e.left,r=this.$el.clientWidth,a=this.$el.clientHeight,o=i.top,l=i.left,u=!0;return(n>o+a||s>l+r)&&(u=!1),u}},created:function(){},mounted:function(){this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this.updateEvent()},destroyed:function(){this.timer&&clearInterval(this.timer),this.domTimer&&clearTimeout(this.domTimer)},activated:function(){this.keepAlive&&(this.keepAlive=!1,this.updateEvent())},deactivated:function(){this.keepAlive=!0,this.timer&&clearInterval(this.timer),this.domTimer&&clearTimeout(this.domTimer)}},l=i(0),u=Object(l.a)(o,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nut-swiper",class:[t.direction,{dragging:t.dragging}],on:{touchstart:function(e){return t._onTouchStart(e)},mousedown:function(e){return t._onTouchStart(e)}}},[i("div",{staticClass:"nut-swiper-wrap",style:{transform:"translate3d("+t.translateX+"px,"+t.translateY+"px,0)","transition-duration":t.transitionDuration+"ms","-webkit-transform":"translate3d("+t.translateX+"px,"+t.translateY+"px,0)","-webkit-transition-duration":t.transitionDuration+"ms","transition-timing-function":"ease"},on:{transitionend:t._onTransitionEnd}},[t._t("default")],2),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.paginationVisible,expression:"paginationVisible"}],staticClass:"nut-swiper-pagination"},t._l(t.slideEls,(function(e,n){return i("span",{key:n,staticClass:"swiper-pagination-bullet",class:{active:n+1===t.currentPage},on:{click:function(e){t.paginationClickable&&t.setPage(n+1,!0)}}})})),0)])}),[],!1,null,null,null).exports;i(106);u.install=function(t){t.component(u.name,u)};e.default=u},4:function(t,e,i){var n=i(46),s=i(47),r=i(13),a=i(48);t.exports=function(t){return n(t)||s(t)||r(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},46:function(t,e,i){var n=i(9);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},47:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},48:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},9:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.default=t.exports,t.exports.__esModule=!0}})}));
|
|
7
7
|
//# sourceMappingURL=swiper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition","webpack://[name]/webpack/bootstrap","webpack://[name]/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://[name]/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://[name]/./src/packages/swiper/swiper.vue?9b7b","webpack://[name]/src/packages/swiper/swiper.vue","webpack://[name]/./src/packages/swiper/swiper.vue?f144","webpack://[name]/./src/packages/swiper/swiper.vue","webpack://[name]/./src/packages/swiper/index.js","webpack://[name]/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://[name]/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://[name]/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://[name]/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://[name]/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","arrayLikeToArray","minLen","toString","slice","constructor","Array","from","test","props","direction","type","String","default","HORIZONTAL","validator","paginationVisible","Boolean","paginationClickable","loop","speed","Number","canDragging","autoPlay","initPage","newCurrentPage","lazyLoad","lazyLoadUrl","swiperData","watch","updateEvent","newPage","modTempNum","slideEls","length","currentPage","next","prev","data","dragging","lastPage","translateX","translateY","startTranslate","translateOffset","transitionDuration","startPos","delta","startTime","isLoop","timer","domTimer","stopAutoPlay","swiperWrap","oneSlideTranslate","methods","page","turnPageCount","setPage","_revert","_setTranslate","_getTranslateOfPage","isHasAnimation","_onTransitionStart","_slideClassHandle","isHorizontal","isVertical","VERTICAL","renderLazyDom","forEach","item","className","dom","document","createElement","style","backgroundImage","appendChild","$nextTick","undefined","pageSize","selectedSlide","classList","remove","_getSlideDistance","marginRight","marginLeft","el","marginTop","marginBottom","_onTouchStart","addEventListener","_onTouchMove","_onTouchEnd","_getTouchPos","e","Date","getTime","x","y","_computePreventDefault","preventDefault","$emit","_getTranslate","$el","removeEventListener","xDis","_imgLazyLoad","_isPageChanged","_onTransitionEnd","_createLoop","swiperWrapEl","insertBefore","duplicateLastChild","firstElementChild","duplicateFirstChild","_createAutoPlay","clearInterval","setInterval","_requestAniFrame","requestAniFrame","imgLazyLoadEl","img","src","onload","lazyLoadingEle","parentElement","removeChild","onerror","_checkInView","imgTop","swiperTop","swiperHeight","imgLeft","swiperLeft","swiperWidth","isInView","created","mounted","destroyed","clearTimeout","activated","keepAlive","deactivated","_vm","_h","$createElement","_c","_self","staticClass","class","on","$event","transform","_t","_v","directives","rawName","expression","_l","slide","index","active","Swiper","install","Vue","component","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","arr","isArray","iter","iterator","TypeError","len","arr2"],"mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,SAAU,GAAIH,GACK,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,IARnB,CASoB,oBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,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'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"swiper\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"swiper\"] = factory();\n\telse\n\t\troot[\"swiper\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 180);\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"nut-swiper\",class:[_vm.direction, { dragging: _vm.dragging }],on:{\"touchstart\":function($event){return _vm._onTouchStart($event)},\"mousedown\":function($event){return _vm._onTouchStart($event)}}},[_c('div',{staticClass:\"nut-swiper-wrap\",style:({\n transform: 'translate3d(' + _vm.translateX + 'px,' + _vm.translateY + 'px,0)',\n 'transition-duration': _vm.transitionDuration + 'ms',\n '-webkit-transform': 'translate3d(' + _vm.translateX + 'px,' + _vm.translateY + 'px,0)',\n '-webkit-transition-duration': _vm.transitionDuration + 'ms',\n 'transition-timing-function': 'ease'\n }),on:{\"transitionend\":_vm._onTransitionEnd}},[_vm._t(\"default\")],2),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.paginationVisible),expression:\"paginationVisible\"}],staticClass:\"nut-swiper-pagination\"},_vm._l((_vm.slideEls),function(slide,index){return _c('span',{key:index,staticClass:\"swiper-pagination-bullet\",class:{ active: index + 1 === _vm.currentPage },on:{\"click\":function($event){_vm.paginationClickable && _vm.setPage(index + 1, true)}}})}),0)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"nut-swiper\" :class=\"[direction, { dragging: dragging }]\" @touchstart=\"_onTouchStart($event)\" @mousedown=\"_onTouchStart($event)\">\n <div\n class=\"nut-swiper-wrap\"\n :style=\"{\n transform: 'translate3d(' + translateX + 'px,' + translateY + 'px,0)',\n 'transition-duration': transitionDuration + 'ms',\n '-webkit-transform': 'translate3d(' + translateX + 'px,' + translateY + 'px,0)',\n '-webkit-transition-duration': transitionDuration + 'ms',\n 'transition-timing-function': 'ease'\n }\"\n @transitionend=\"_onTransitionEnd\"\n >\n <slot></slot>\n </div>\n <div class=\"nut-swiper-pagination\" v-show=\"paginationVisible\">\n <span\n class=\"swiper-pagination-bullet\"\n :class=\"{ active: index + 1 === currentPage }\"\n v-for=\"(slide, index) in slideEls\"\n :key=\"index\"\n @click=\"paginationClickable && setPage(index + 1, true)\"\n >\n </span>\n </div>\n </div>\n</template>\n<script>\nconst VERTICAL = 'vertical';\nconst HORIZONTAL = 'horizontal';\nexport default {\n name: 'nut-swiper',\n props: {\n direction: {\n type: String,\n default: HORIZONTAL,\n validator: value => [VERTICAL, HORIZONTAL].indexOf(value) > -1\n },\n paginationVisible: {\n type: Boolean,\n default: false\n },\n paginationClickable: {\n type: Boolean,\n default: false\n },\n loop: {\n type: Boolean,\n default: false\n },\n speed: {\n type: Number,\n default: 500\n },\n canDragging: {\n type: Boolean,\n default: true\n },\n autoPlay: {\n type: Number,\n default: 0\n },\n initPage: {\n type: Number,\n default: 1\n },\n newCurrentPage: {\n type: Number,\n default: 1\n },\n lazyLoad: {\n type: Boolean,\n default: false\n },\n lazyLoadUrl: {\n type: String,\n default: ''\n },\n swiperData: {\n type: [Array],\n default: function() {\n return [];\n }\n }\n },\n watch: {\n swiperData(newValue, oldValue) {\n this.updateEvent();\n },\n newCurrentPage(newPage) {\n let modTempNum = newPage % this.slideEls.length;\n newPage = modTempNum == 0 ? this.slideEls.length : modTempNum < 0 ? this.slideEls.length + modTempNum : modTempNum;\n\n if (newPage >= this.currentPage) {\n this.next(newPage - this.currentPage);\n } else {\n this.prev(this.currentPage - newPage);\n }\n }\n },\n data() {\n return {\n dragging: false,\n currentPage: this.initPage || this.newCurrentPage,\n lastPage: 1,\n translateX: 0,\n translateY: 0,\n startTranslate: 0,\n slideEls: [],\n translateOffset: 0, //当前偏移初始位置距离\n transitionDuration: 0, //切换动画时间\n startPos: null,\n delta: 0, //拖动距离\n startTime: null,\n isLoop: this.loop,\n timer: null, //自动播放定时器\n domTimer: null, //渲染延迟查找\n stopAutoPlay: false, //停止自动播放\n swiperWrap: null,\n oneSlideTranslate: 0 //一个slide的大小\n };\n },\n methods: {\n //下一张\n next(turnPageCount = 1) {\n let page = this.currentPage;\n if (page + turnPageCount < this.slideEls.length || this.isLoop) {\n this.setPage(page + turnPageCount, true, 'NEXT');\n } else {\n this._revert();\n }\n },\n //上一张\n prev(turnPageCount = 1) {\n let page = this.currentPage;\n if (page - turnPageCount > 1 || this.isLoop) {\n this.setPage(page - turnPageCount, true, 'PREV');\n } else {\n this._revert();\n }\n },\n setPage(page, isHasAnimation, type) {\n if (page === 0) {\n this.currentPage = this.slideEls.length;\n } else if (page > this.slideEls.length) {\n this.currentPage = page - this.slideEls.length;\n } else {\n this.currentPage = page;\n }\n this._setTranslate(this._getTranslateOfPage(page));\n if (!isHasAnimation) {\n this._slideClassHandle();\n } else {\n this._onTransitionStart(type);\n }\n },\n isHorizontal() {\n return this.direction === HORIZONTAL;\n },\n isVertical() {\n return this.direction === VERTICAL;\n },\n renderLazyDom(slideEls) {\n slideEls.forEach((item, index) => {\n let src = item.getAttribute('data-src');\n if (item.className != 'nut-swiper-slide nut-swiper-slide-selected') {\n var dom = document.createElement('div');\n //jd 图片占位图)\n if (this.lazyLoadUrl) {\n dom.style.backgroundImage = `url('${this.lazyLoadUrl}')`;\n dom.className = 'nut-lazy img';\n } else {\n dom.className = 'nut-lazy preloader';\n }\n item.appendChild(dom);\n }\n });\n return true;\n },\n updateEvent(pageSize) {\n this.$nextTick(() => {\n this.domTimer = setTimeout(() => {\n if (pageSize != undefined) this.currentPage = pageSize;\n this.swiperWrap = this.$el.querySelector('.nut-swiper-wrap');\n this.slideEls = [...this.swiperWrap.children];\n if (this.slideEls.length === 0) return;\n this._getSlideDistance(this.slideEls[0]);\n if (this.autoPlay != 0) {\n this.isLoop = true;\n this._createAutoPlay();\n }\n this.isLoop && this._createLoop();\n this.setPage(this.currentPage, false);\n this.lazyLoad && this.renderLazyDom(this.slideEls) && this._imgLazyLoad();\n }, 0);\n });\n },\n _slideClassHandle() {\n let selectedSlide = this.$el.querySelector('.nut-swiper-slide-selected');\n selectedSlide && selectedSlide.classList.remove('nut-swiper-slide-selected');\n this.slideEls[this.currentPage - 1].classList.add('nut-swiper-slide-selected');\n this.lastPage = this.currentPage;\n },\n _getSlideDistance(el) {\n let styleArr = getComputedStyle(el);\n let marginTop = styleArr['marginTop'].replace('px', '') - 0;\n let marginBottom = styleArr['marginBottom'].replace('px', '') - 0;\n let marginRight = styleArr['marginRight'].replace('px', '') - 0;\n let marginLeft = styleArr['marginLeft'].replace('px', '') - 0;\n if (this.isHorizontal()) {\n this.oneSlideTranslate = marginRight + marginLeft + el['offsetWidth'];\n } else {\n this.oneSlideTranslate = marginTop + marginBottom + el['offsetHeight'];\n }\n },\n _onTouchStart(e) {\n this.swiperWrap.addEventListener('touchmove', this._onTouchMove, false);\n this.swiperWrap.addEventListener('touchend', this._onTouchEnd, false);\n this.swiperWrap.addEventListener('mousemove', this._onTouchMove, false);\n this.swiperWrap.addEventListener('mouseup', this._onTouchEnd, false);\n this.startPos = this._getTouchPos(e);\n this.delta = 0;\n this.startTranslate = this._getTranslateOfPage(this.currentPage);\n if (this.isLoop) {\n this._setTranslate(this.startTranslate);\n }\n this.startTime = new Date().getTime();\n this.dragging = true;\n this.transitionDuration = 0;\n this.stopAutoPlay = true;\n },\n _onTouchMove(e) {\n if (!this.dragging) return;\n if (this.isHorizontal()) {\n this.delta = this._getTouchPos(e).x - this.startPos.x;\n } else {\n this.delta = this._getTouchPos(e).y - this.startPos.y;\n }\n //let isQuickAction = (new Date().getTime() - this.startTime) < 200;\n if (this.canDragging && this._computePreventDefault(e)) {\n e.preventDefault();\n this._setTranslate(this.startTranslate + this.delta);\n this.$emit('slideMove', this._getTranslate(), this.$el);\n this.$emit('slide-move', this._getTranslate(), this.$el);\n }\n },\n _onTouchEnd(e) {\n if (!this.dragging) return;\n this.dragging = false;\n this.transitionDuration = this.speed;\n let isQuickAction = new Date().getTime() - this.startTime < 1000;\n if (this.delta < -this.oneSlideTranslate / 2 || (isQuickAction && this.delta < -15)) {\n this.next();\n } else if (this.delta > this.oneSlideTranslate / 2 || (isQuickAction && this.delta > 15)) {\n this.prev();\n } else {\n this._revert();\n }\n this.swiperWrap.removeEventListener('touchmove', this._onTouchMove, false);\n this.swiperWrap.removeEventListener('touchend', this._onTouchEnd, false);\n this.swiperWrap.removeEventListener('mousemove', this._onTouchMove, false);\n this.swiperWrap.removeEventListener('mouseup', this._onTouchEnd, false);\n },\n _revert() {\n this.setPage(this.currentPage, true);\n },\n _computePreventDefault(e) {\n let pos = this._getTouchPos(e);\n let xDis = Math.abs(this.startPos.x - pos.x);\n let yDis = Math.abs(this.startPos.y - pos.y);\n if (xDis <= 5 && xDis >= 0) {\n return false;\n } else if (yDis > 5 && yDis / xDis > 0.5) {\n return false;\n } else {\n return true;\n }\n },\n _getTouchPos(e) {\n let x = e.changedTouches ? e.changedTouches[0]['pageX'] : e['pageX'];\n let y = e.changedTouches ? e.changedTouches[0]['pageY'] : e['pageY'];\n return { x, y };\n },\n _onTransitionStart(type) {\n this.transitionDuration = this.speed;\n this.lazyLoad && this._imgLazyLoad(1);\n if (this._isPageChanged()) {\n this.$emit('slideChangeStart', this.currentPage, this.$el, type);\n this.$emit('slide-change-start', this.currentPage, this.$el, type);\n } else {\n this.$emit('slideRevertStart', this.currentPage, this.$el, type);\n this.$emit('slide-revert-start', this.currentPage, this.$el, type);\n }\n },\n _onTransitionEnd() {\n if (this._isPageChanged()) {\n this.$emit('slideChangeEnd', this.currentPage, this.$el);\n this.$emit('slide-change-end', this.currentPage, this.$el);\n } else {\n this.$emit('slideRevertEnd', this.currentPage, this.$el);\n this.$emit('slide-revert-end', this.currentPage, this.$el);\n }\n this.transitionDuration = 0;\n this.delta = 0;\n this.lastPage = this.currentPage;\n\n this._slideClassHandle();\n if (this.isLoop) {\n this._setTranslate(this._getTranslateOfPage(this.currentPage));\n }\n this.stopAutoPlay = false;\n },\n _isPageChanged() {\n return this.lastPage !== this.currentPage;\n },\n _setTranslate(value) {\n let translateName = this.isHorizontal() ? 'translateX' : 'translateY';\n this[translateName] = value;\n },\n _getTranslate() {\n let translateName = this.isHorizontal() ? 'translateX' : 'translateY';\n return this[translateName];\n },\n _getTranslateOfPage(page) {\n if (page === 0) return 0;\n let propName = this.isHorizontal() ? 'offsetWidth' : 'offsetHeight';\n let _this = this;\n return (\n -[].reduce.call(\n this.slideEls,\n function(total, el, i) {\n return i > page - 2 ? total : total + _this.oneSlideTranslate;\n },\n 0\n ) + this.translateOffset\n );\n },\n _createLoop() {\n let propName = this.isHorizontal() ? 'offsetWidth' : 'offsetHeight';\n let swiperWrapEl = this.$el.querySelector('.nut-swiper-wrap');\n let duplicateFirstChild = swiperWrapEl.firstElementChild.cloneNode(true);\n let duplicateLastChild = swiperWrapEl.lastElementChild.cloneNode(true);\n swiperWrapEl.insertBefore(duplicateLastChild, swiperWrapEl.firstElementChild);\n swiperWrapEl.appendChild(duplicateFirstChild);\n this.translateOffset = -this.oneSlideTranslate;\n },\n _createAutoPlay() {\n clearInterval(this.timer);\n this.timer = setInterval(() => {\n if (!this.stopAutoPlay) {\n this.next();\n }\n }, this.autoPlay);\n },\n _requestAniFrame() {\n return (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n function(callback) {\n window.setTimeout(callback, 1000 / 60);\n }\n );\n },\n _imgLazyLoad(type) {\n let requestAniFrame = this._requestAniFrame();\n let imgLazyLoadEl;\n requestAniFrame(() => {\n imgLazyLoadEl = this.swiperWrap.querySelectorAll('.nut-img-lazyload');\n if (type == 1) {\n imgLazyLoadEl = this.slideEls[this.currentPage - 1].querySelectorAll('.nut-img-lazyload');\n }\n imgLazyLoadEl.forEach((item, index) => {\n if (!this._checkInView(item) && type != 1) return;\n let src = item.getAttribute('data-src');\n let img = new Image();\n img.src = src;\n img.onload = () => {\n let lazyLoadingEle = item.parentElement.querySelector('.nut-lazy');\n if (lazyLoadingEle) {\n item.parentElement.removeChild(lazyLoadingEle);\n }\n item.src = src;\n item.classList.remove('nut-img-lazyload');\n };\n img.onerror = () => {\n item.src = this.lazyLoadUrl;\n item.classList.remove('nut-img-lazyload');\n };\n });\n });\n },\n _checkInView(imgItem) {\n let imgRect = imgItem.getBoundingClientRect();\n let swiperRect = this.$el.getBoundingClientRect();\n let imgTop = imgRect.top;\n let imgLeft = imgRect.left;\n let swiperWidth = this.$el.clientWidth;\n let swiperHeight = this.$el.clientHeight;\n let swiperTop = swiperRect.top;\n let swiperLeft = swiperRect.left;\n let isInView = true;\n if (imgTop > swiperTop + swiperHeight || imgLeft > swiperLeft + swiperWidth) {\n isInView = false;\n }\n return isInView;\n }\n },\n created() {},\n mounted() {\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this.updateEvent();\n },\n destroyed() {\n this.timer && clearInterval(this.timer);\n this.domTimer && clearTimeout(this.domTimer);\n },\n activated() {\n if (this.keepAlive) {\n this.keepAlive = false;\n this.updateEvent();\n }\n },\n deactivated() {\n this.keepAlive = true;\n this.timer && clearInterval(this.timer);\n this.domTimer && clearTimeout(this.domTimer);\n }\n};\n</script>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./swiper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./swiper.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./swiper.vue?vue&type=template&id=0aa414e9&\"\nimport script from \"./swiper.vue?vue&type=script&lang=js&\"\nexport * from \"./swiper.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Swiper from './swiper.vue';\nimport './swiper.scss';\n\nSwiper.install = function(Vue) {\n Vue.component(Swiper.name, Swiper);\n};\n\nexport default Swiper;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition","webpack://[name]/webpack/bootstrap","webpack://[name]/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://[name]/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://[name]/./src/packages/swiper/swiper.vue?9b7b","webpack://[name]/src/packages/swiper/swiper.vue","webpack://[name]/./src/packages/swiper/swiper.vue?f144","webpack://[name]/./src/packages/swiper/swiper.vue","webpack://[name]/./src/packages/swiper/index.js","webpack://[name]/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://[name]/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://[name]/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://[name]/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://[name]/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","arrayLikeToArray","minLen","toString","slice","constructor","Array","from","test","props","direction","type","String","default","HORIZONTAL","validator","paginationVisible","Boolean","paginationClickable","loop","speed","Number","canDragging","autoPlay","initPage","newCurrentPage","lazyLoad","lazyLoadUrl","swiperData","watch","updateEvent","newPage","modTempNum","slideEls","length","currentPage","next","prev","data","dragging","lastPage","translateX","translateY","startTranslate","translateOffset","transitionDuration","startPos","delta","startTime","isLoop","timer","domTimer","stopAutoPlay","swiperWrap","oneSlideTranslate","methods","page","turnPageCount","setPage","_revert","_setTranslate","_getTranslateOfPage","isHasAnimation","_onTransitionStart","_slideClassHandle","isHorizontal","isVertical","VERTICAL","renderLazyDom","forEach","item","className","dom","document","createElement","style","backgroundImage","appendChild","$nextTick","undefined","pageSize","selectedSlide","classList","remove","_getSlideDistance","marginRight","marginLeft","el","marginTop","marginBottom","_onTouchStart","addEventListener","_onTouchMove","_onTouchEnd","_getTouchPos","e","Date","getTime","x","y","_computePreventDefault","preventDefault","$emit","_getTranslate","$el","removeEventListener","xDis","_imgLazyLoad","_isPageChanged","_onTransitionEnd","_createLoop","swiperWrapEl","insertBefore","duplicateLastChild","firstElementChild","duplicateFirstChild","_createAutoPlay","clearInterval","setInterval","_requestAniFrame","requestAniFrame","imgLazyLoadEl","img","src","onload","lazyLoadingEle","parentElement","removeChild","onerror","_checkInView","imgTop","swiperTop","swiperHeight","imgLeft","swiperLeft","swiperWidth","isInView","created","mounted","destroyed","clearTimeout","activated","keepAlive","deactivated","_vm","_h","$createElement","_c","_self","staticClass","class","on","$event","transform","_t","_v","directives","rawName","expression","_l","slide","index","active","Swiper","install","Vue","component","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","arr","isArray","iter","iterator","TypeError","len","arr2"],"mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,SAAU,GAAIH,GACK,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,IARnB,CASoB,oBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WA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module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"swiper\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"swiper\"] = factory();\n\telse\n\t\troot[\"swiper\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 181);\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"nut-swiper\",class:[_vm.direction, { dragging: _vm.dragging }],on:{\"touchstart\":function($event){return _vm._onTouchStart($event)},\"mousedown\":function($event){return _vm._onTouchStart($event)}}},[_c('div',{staticClass:\"nut-swiper-wrap\",style:({\n transform: 'translate3d(' + _vm.translateX + 'px,' + _vm.translateY + 'px,0)',\n 'transition-duration': _vm.transitionDuration + 'ms',\n '-webkit-transform': 'translate3d(' + _vm.translateX + 'px,' + _vm.translateY + 'px,0)',\n '-webkit-transition-duration': _vm.transitionDuration + 'ms',\n 'transition-timing-function': 'ease'\n }),on:{\"transitionend\":_vm._onTransitionEnd}},[_vm._t(\"default\")],2),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.paginationVisible),expression:\"paginationVisible\"}],staticClass:\"nut-swiper-pagination\"},_vm._l((_vm.slideEls),function(slide,index){return _c('span',{key:index,staticClass:\"swiper-pagination-bullet\",class:{ active: index + 1 === _vm.currentPage },on:{\"click\":function($event){_vm.paginationClickable && _vm.setPage(index + 1, true)}}})}),0)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"nut-swiper\" :class=\"[direction, { dragging: dragging }]\" @touchstart=\"_onTouchStart($event)\" @mousedown=\"_onTouchStart($event)\">\n <div\n class=\"nut-swiper-wrap\"\n :style=\"{\n transform: 'translate3d(' + translateX + 'px,' + translateY + 'px,0)',\n 'transition-duration': transitionDuration + 'ms',\n '-webkit-transform': 'translate3d(' + translateX + 'px,' + translateY + 'px,0)',\n '-webkit-transition-duration': transitionDuration + 'ms',\n 'transition-timing-function': 'ease'\n }\"\n @transitionend=\"_onTransitionEnd\"\n >\n <slot></slot>\n </div>\n <div class=\"nut-swiper-pagination\" v-show=\"paginationVisible\">\n <span\n class=\"swiper-pagination-bullet\"\n :class=\"{ active: index + 1 === currentPage }\"\n v-for=\"(slide, index) in slideEls\"\n :key=\"index\"\n @click=\"paginationClickable && setPage(index + 1, true)\"\n >\n </span>\n </div>\n </div>\n</template>\n<script>\nconst VERTICAL = 'vertical';\nconst HORIZONTAL = 'horizontal';\nexport default {\n name: 'nut-swiper',\n props: {\n direction: {\n type: String,\n default: HORIZONTAL,\n validator: value => [VERTICAL, HORIZONTAL].indexOf(value) > -1\n },\n paginationVisible: {\n type: Boolean,\n default: false\n },\n paginationClickable: {\n type: Boolean,\n default: false\n },\n loop: {\n type: Boolean,\n default: false\n },\n speed: {\n type: Number,\n default: 500\n },\n canDragging: {\n type: Boolean,\n default: true\n },\n autoPlay: {\n type: Number,\n default: 0\n },\n initPage: {\n type: Number,\n default: 1\n },\n newCurrentPage: {\n type: Number,\n default: 1\n },\n lazyLoad: {\n type: Boolean,\n default: false\n },\n lazyLoadUrl: {\n type: String,\n default: ''\n },\n swiperData: {\n type: [Array],\n default: function() {\n return [];\n }\n }\n },\n watch: {\n swiperData(newValue, oldValue) {\n this.updateEvent();\n },\n newCurrentPage(newPage) {\n let modTempNum = newPage % this.slideEls.length;\n newPage = modTempNum == 0 ? this.slideEls.length : modTempNum < 0 ? this.slideEls.length + modTempNum : modTempNum;\n\n if (newPage >= this.currentPage) {\n this.next(newPage - this.currentPage);\n } else {\n this.prev(this.currentPage - newPage);\n }\n }\n },\n data() {\n return {\n dragging: false,\n currentPage: this.initPage || this.newCurrentPage,\n lastPage: 1,\n translateX: 0,\n translateY: 0,\n startTranslate: 0,\n slideEls: [],\n translateOffset: 0, //当前偏移初始位置距离\n transitionDuration: 0, //切换动画时间\n startPos: null,\n delta: 0, //拖动距离\n startTime: null,\n isLoop: this.loop,\n timer: null, //自动播放定时器\n domTimer: null, //渲染延迟查找\n stopAutoPlay: false, //停止自动播放\n swiperWrap: null,\n oneSlideTranslate: 0 //一个slide的大小\n };\n },\n methods: {\n //下一张\n next(turnPageCount = 1) {\n let page = this.currentPage;\n if (page + turnPageCount < this.slideEls.length || this.isLoop) {\n this.setPage(page + turnPageCount, true, 'NEXT');\n } else {\n this._revert();\n }\n },\n //上一张\n prev(turnPageCount = 1) {\n let page = this.currentPage;\n if (page - turnPageCount > 1 || this.isLoop) {\n this.setPage(page - turnPageCount, true, 'PREV');\n } else {\n this._revert();\n }\n },\n setPage(page, isHasAnimation, type) {\n if (page === 0) {\n this.currentPage = this.slideEls.length;\n } else if (page > this.slideEls.length) {\n this.currentPage = page - this.slideEls.length;\n } else {\n this.currentPage = page;\n }\n this._setTranslate(this._getTranslateOfPage(page));\n if (!isHasAnimation) {\n this._slideClassHandle();\n } else {\n this._onTransitionStart(type);\n }\n },\n isHorizontal() {\n return this.direction === HORIZONTAL;\n },\n isVertical() {\n return this.direction === VERTICAL;\n },\n renderLazyDom(slideEls) {\n slideEls.forEach((item, index) => {\n let src = item.getAttribute('data-src');\n if (item.className != 'nut-swiper-slide nut-swiper-slide-selected') {\n var dom = document.createElement('div');\n //jd 图片占位图)\n if (this.lazyLoadUrl) {\n dom.style.backgroundImage = `url('${this.lazyLoadUrl}')`;\n dom.className = 'nut-lazy img';\n } else {\n dom.className = 'nut-lazy preloader';\n }\n item.appendChild(dom);\n }\n });\n return true;\n },\n updateEvent(pageSize) {\n this.$nextTick(() => {\n this.domTimer = setTimeout(() => {\n if (pageSize != undefined) this.currentPage = pageSize;\n this.swiperWrap = this.$el.querySelector('.nut-swiper-wrap');\n this.slideEls = [...this.swiperWrap.children];\n if (this.slideEls.length === 0) return;\n this._getSlideDistance(this.slideEls[0]);\n if (this.autoPlay != 0) {\n this.isLoop = true;\n this._createAutoPlay();\n }\n this.isLoop && this._createLoop();\n this.setPage(this.currentPage, false);\n this.lazyLoad && this.renderLazyDom(this.slideEls) && this._imgLazyLoad();\n }, 0);\n });\n },\n _slideClassHandle() {\n let selectedSlide = this.$el.querySelector('.nut-swiper-slide-selected');\n selectedSlide && selectedSlide.classList.remove('nut-swiper-slide-selected');\n this.slideEls[this.currentPage - 1].classList.add('nut-swiper-slide-selected');\n this.lastPage = this.currentPage;\n },\n _getSlideDistance(el) {\n let styleArr = getComputedStyle(el);\n let marginTop = styleArr['marginTop'].replace('px', '') - 0;\n let marginBottom = styleArr['marginBottom'].replace('px', '') - 0;\n let marginRight = styleArr['marginRight'].replace('px', '') - 0;\n let marginLeft = styleArr['marginLeft'].replace('px', '') - 0;\n if (this.isHorizontal()) {\n this.oneSlideTranslate = marginRight + marginLeft + el['offsetWidth'];\n } else {\n this.oneSlideTranslate = marginTop + marginBottom + el['offsetHeight'];\n }\n },\n _onTouchStart(e) {\n this.swiperWrap.addEventListener('touchmove', this._onTouchMove, false);\n this.swiperWrap.addEventListener('touchend', this._onTouchEnd, false);\n this.swiperWrap.addEventListener('mousemove', this._onTouchMove, false);\n this.swiperWrap.addEventListener('mouseup', this._onTouchEnd, false);\n this.startPos = this._getTouchPos(e);\n this.delta = 0;\n this.startTranslate = this._getTranslateOfPage(this.currentPage);\n if (this.isLoop) {\n this._setTranslate(this.startTranslate);\n }\n this.startTime = new Date().getTime();\n this.dragging = true;\n this.transitionDuration = 0;\n this.stopAutoPlay = true;\n },\n _onTouchMove(e) {\n if (!this.dragging) return;\n if (this.isHorizontal()) {\n this.delta = this._getTouchPos(e).x - this.startPos.x;\n } else {\n this.delta = this._getTouchPos(e).y - this.startPos.y;\n }\n //let isQuickAction = (new Date().getTime() - this.startTime) < 200;\n if (this.canDragging && this._computePreventDefault(e)) {\n e.preventDefault();\n this._setTranslate(this.startTranslate + this.delta);\n this.$emit('slideMove', this._getTranslate(), this.$el);\n this.$emit('slide-move', this._getTranslate(), this.$el);\n }\n },\n _onTouchEnd(e) {\n if (!this.dragging) return;\n this.dragging = false;\n this.transitionDuration = this.speed;\n let isQuickAction = new Date().getTime() - this.startTime < 1000;\n if (this.delta < -this.oneSlideTranslate / 2 || (isQuickAction && this.delta < -15)) {\n this.next();\n } else if (this.delta > this.oneSlideTranslate / 2 || (isQuickAction && this.delta > 15)) {\n this.prev();\n } else {\n this._revert();\n }\n this.swiperWrap.removeEventListener('touchmove', this._onTouchMove, false);\n this.swiperWrap.removeEventListener('touchend', this._onTouchEnd, false);\n this.swiperWrap.removeEventListener('mousemove', this._onTouchMove, false);\n this.swiperWrap.removeEventListener('mouseup', this._onTouchEnd, false);\n },\n _revert() {\n this.setPage(this.currentPage, true);\n },\n _computePreventDefault(e) {\n let pos = this._getTouchPos(e);\n let xDis = Math.abs(this.startPos.x - pos.x);\n let yDis = Math.abs(this.startPos.y - pos.y);\n if (xDis <= 5 && xDis >= 0) {\n return false;\n } else if (yDis > 5 && yDis / xDis > 0.5) {\n return false;\n } else {\n return true;\n }\n },\n _getTouchPos(e) {\n let x = e.changedTouches ? e.changedTouches[0]['pageX'] : e['pageX'];\n let y = e.changedTouches ? e.changedTouches[0]['pageY'] : e['pageY'];\n return { x, y };\n },\n _onTransitionStart(type) {\n this.transitionDuration = this.speed;\n this.lazyLoad && this._imgLazyLoad(1);\n if (this._isPageChanged()) {\n this.$emit('slideChangeStart', this.currentPage, this.$el, type);\n this.$emit('slide-change-start', this.currentPage, this.$el, type);\n } else {\n this.$emit('slideRevertStart', this.currentPage, this.$el, type);\n this.$emit('slide-revert-start', this.currentPage, this.$el, type);\n }\n },\n _onTransitionEnd() {\n if (this._isPageChanged()) {\n this.$emit('slideChangeEnd', this.currentPage, this.$el);\n this.$emit('slide-change-end', this.currentPage, this.$el);\n } else {\n this.$emit('slideRevertEnd', this.currentPage, this.$el);\n this.$emit('slide-revert-end', this.currentPage, this.$el);\n }\n this.transitionDuration = 0;\n this.delta = 0;\n this.lastPage = this.currentPage;\n\n this._slideClassHandle();\n if (this.isLoop) {\n this._setTranslate(this._getTranslateOfPage(this.currentPage));\n }\n this.stopAutoPlay = false;\n },\n _isPageChanged() {\n return this.lastPage !== this.currentPage;\n },\n _setTranslate(value) {\n let translateName = this.isHorizontal() ? 'translateX' : 'translateY';\n this[translateName] = value;\n },\n _getTranslate() {\n let translateName = this.isHorizontal() ? 'translateX' : 'translateY';\n return this[translateName];\n },\n _getTranslateOfPage(page) {\n if (page === 0) return 0;\n let propName = this.isHorizontal() ? 'offsetWidth' : 'offsetHeight';\n let _this = this;\n return (\n -[].reduce.call(\n this.slideEls,\n function(total, el, i) {\n return i > page - 2 ? total : total + _this.oneSlideTranslate;\n },\n 0\n ) + this.translateOffset\n );\n },\n _createLoop() {\n let propName = this.isHorizontal() ? 'offsetWidth' : 'offsetHeight';\n let swiperWrapEl = this.$el.querySelector('.nut-swiper-wrap');\n let duplicateFirstChild = swiperWrapEl.firstElementChild.cloneNode(true);\n let duplicateLastChild = swiperWrapEl.lastElementChild.cloneNode(true);\n swiperWrapEl.insertBefore(duplicateLastChild, swiperWrapEl.firstElementChild);\n swiperWrapEl.appendChild(duplicateFirstChild);\n this.translateOffset = -this.oneSlideTranslate;\n },\n _createAutoPlay() {\n clearInterval(this.timer);\n this.timer = setInterval(() => {\n if (!this.stopAutoPlay) {\n this.next();\n }\n }, this.autoPlay);\n },\n _requestAniFrame() {\n return (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n function(callback) {\n window.setTimeout(callback, 1000 / 60);\n }\n );\n },\n _imgLazyLoad(type) {\n let requestAniFrame = this._requestAniFrame();\n let imgLazyLoadEl;\n requestAniFrame(() => {\n imgLazyLoadEl = this.swiperWrap.querySelectorAll('.nut-img-lazyload');\n if (type == 1) {\n imgLazyLoadEl = this.slideEls[this.currentPage - 1].querySelectorAll('.nut-img-lazyload');\n }\n imgLazyLoadEl.forEach((item, index) => {\n if (!this._checkInView(item) && type != 1) return;\n let src = item.getAttribute('data-src');\n let img = new Image();\n img.src = src;\n img.onload = () => {\n let lazyLoadingEle = item.parentElement.querySelector('.nut-lazy');\n if (lazyLoadingEle) {\n item.parentElement.removeChild(lazyLoadingEle);\n }\n item.src = src;\n item.classList.remove('nut-img-lazyload');\n };\n img.onerror = () => {\n item.src = this.lazyLoadUrl;\n item.classList.remove('nut-img-lazyload');\n };\n });\n });\n },\n _checkInView(imgItem) {\n let imgRect = imgItem.getBoundingClientRect();\n let swiperRect = this.$el.getBoundingClientRect();\n let imgTop = imgRect.top;\n let imgLeft = imgRect.left;\n let swiperWidth = this.$el.clientWidth;\n let swiperHeight = this.$el.clientHeight;\n let swiperTop = swiperRect.top;\n let swiperLeft = swiperRect.left;\n let isInView = true;\n if (imgTop > swiperTop + swiperHeight || imgLeft > swiperLeft + swiperWidth) {\n isInView = false;\n }\n return isInView;\n }\n },\n created() {},\n mounted() {\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this.updateEvent();\n },\n destroyed() {\n this.timer && clearInterval(this.timer);\n this.domTimer && clearTimeout(this.domTimer);\n },\n activated() {\n if (this.keepAlive) {\n this.keepAlive = false;\n this.updateEvent();\n }\n },\n deactivated() {\n this.keepAlive = true;\n this.timer && clearInterval(this.timer);\n this.domTimer && clearTimeout(this.domTimer);\n }\n};\n</script>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./swiper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./swiper.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./swiper.vue?vue&type=template&id=0aa414e9&\"\nimport script from \"./swiper.vue?vue&type=script&lang=js&\"\nexport * from \"./swiper.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Swiper from './swiper.vue';\nimport './swiper.scss';\n\nSwiper.install = function(Vue) {\n Vue.component(Swiper.name, Swiper);\n};\n\nexport default Swiper;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;"],"sourceRoot":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - switch.css, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/.nut-switch{position:relative;width:auto;display:inline-block!important;background:#fff;-webkit-border-radius:1000px;border-radius:1000px;vertical-align:bottom;-webkit-box-sizing:content-box;box-sizing:content-box;border:2px solid #dadada;-webkit-transition:all .2s cubic-bezier(.55,.085,.68,.53);-o-transition:all .2s cubic-bezier(.55,.085,.68,.53);transition:all .2s cubic-bezier(.55,.085,.68,.53)}.nut-switch .nut-switch-label{position:relative;width:auto;left:0;margin-left:20px;margin-right:3px;padding:0 2px!important;text-align:center!important;color:#999!important;font-style:normal!important;font-size:12px}.nut-switch .nut-switch-btn{position:absolute;left:0;background:#dadada;border:2px solid #fff;-webkit-border-radius:50%;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .2s cubic-bezier(.55,.085,.68,.53);-o-transition:all .2s cubic-bezier(.55,.085,.68,.53);transition:all .2s cubic-bezier(.55,.085,.68,.53)}.nut-switch.nut-switch-active{border-color:#f0250f}.nut-switch.nut-switch-active .nut-switch-label{left:4px;margin-left:0;color:red!important;margin-right:22px}.nut-switch.nut-switch-active .nut-switch-btn{background-color:#f0250f}.nut-switch.nut-switch-disabled{opacity:.6}.nut-switch-small{height:14px;min-width:30px}.nut-switch-small .nut-switch-label{font-size:10px;top:-2px;margin-left:-25px}.nut-switch-small .nut-switch-btn{height:14px;width:14px}.nut-switch-small.nut-switch-active .nut-switch-btn{left:100%;margin-left:-15px}.nut-switch-base{height:20px;line-height:20px;min-width:38px}.nut-switch-base .nut-switch-btn{height:20px;width:22px}.nut-switch-base.nut-switch-active .nut-switch-btn{left:100%;margin-left:-21px}.nut-switch-large{height:28px;line-height:28px;min-width:58px;font-size:14px}.nut-switch-large .nut-switch-label{margin-right:8px;left:6px}.nut-switch-large .nut-switch-btn{height:28px;min-width:28px}.nut-switch-large.nut-switch-active .nut-switch-label{margin-right:30px}.nut-switch-large.nut-switch-active .nut-switch-btn{left:100%;margin-left:-28px}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - switch.js, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("switch",[],e):"object"==typeof exports?exports.switch=e():t.switch=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./",n(n.s=
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("switch",[],e):"object"==typeof exports?exports.switch=e():t.switch=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="./",n(n.s=175)}({0:function(t,e,n){"use strict";function i(t,e,n,i,o,r,s,c){var a,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=a):o&&(a=c?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),a)if(u.functional){u._injectStyles=a;var l=u.render;u.render=function(t,e){return a.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,a):[a]}return{exports:t,options:u}}n.d(e,"a",(function(){return i}))},175:function(t,e,n){"use strict";n.r(e);var i={name:"nut-switch",props:{active:{type:Boolean,default:!1},size:{type:String,default:"base"},disabled:{type:Boolean,default:!1},label:{type:String,default:""}},data:function(){return{isActive:!1,arrLabel:(this.label||"").split("|")}},created:function(){this.isActive=this.active},watch:{active:function(t){this.isActive=t}},methods:{toggle:function(){var t=this,e=this.isActive;this.disabled||(this.isActive=!e,setTimeout((function(){t.$emit("change",t.isActive),t.$emit("update:active",t.isActive)}),300))}}},o=n(0),r=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"nut-switch",class:[{"nut-switch-active":t.isActive},"nut-switch-"+t.size,{"nut-switch-disabled":t.disabled}],on:{click:t.toggle}},[n("div",{staticClass:"nut-switch-btn"}),t._v(" "),t.isActive?n("div",{staticClass:"nut-switch-label"},[t._v(t._s(t.arrLabel[0]))]):n("div",{staticClass:"nut-switch-label"},[t._v(t._s(t.arrLabel[1]))])])}),[],!1,null,null,null).exports;n(92);r.install=function(t){t.component(r.name,r)};e.default=r},92:function(t,e,n){}})}));
|
|
7
7
|
//# sourceMappingURL=switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition","webpack://[name]/webpack/bootstrap","webpack://[name]/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://[name]/./src/packages/switch/switch.vue?bd4c","webpack://[name]/./src/packages/switch/switch.vue?e547","webpack://[name]/src/packages/switch/switch.vue","webpack://[name]/./src/packages/switch/switch.vue","webpack://[name]/./src/packages/switch/index.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","props","active","type","Boolean","default","size","String","disabled","label","data","isActive","arrLabel","split","created","watch","newVal","methods","toggle","status","setTimeout","_vm","_h","$createElement","_c","_self","staticClass","class","on","_v","_s","Switch","install","Vue","component"],"mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,SAAU,GAAIH,GACK,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,IARnB,CASoB,oBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,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CACRL,KAAMC,QACNC,SAAS,GAEXI,MAAO,CACLN,KAAMI,OACNF,QAAS,KAGbK,KApBF,WAqBI,MAAO,CACLC,UAAU,EACVC,UAAW9E,KAAK2E,OAAS,IAAII,MAAM,OAGvCC,QA1BF,WA2BIhF,KAAK6E,SAAW7E,KAAKoE,QAEvBa,MAAO,CACLb,OADJ,SACA,GACMpE,KAAK6E,SAAWK,IAGpBC,QAAS,CACPC,OADJ,WACA,WACA,gBACWpF,KAAK0E,WACR1E,KAAK6E,UAAYQ,EACjBC,YAAW,WACT,EAAV,2BACU,EAAV,oCACA,S,OChCe,EAXC,YACd,GHRW,WAAa,IAAIC,EAAIvF,KAASwF,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,aAAaC,MAAM,CAAC,CAAE,oBAAqBN,EAAIV,UAAY,cAAgBU,EAAIf,KAAM,CAAE,sBAAuBe,EAAIb,WAAYoB,GAAG,CAAC,MAAQP,EAAIH,SAAS,CAACM,EAAG,MAAM,CAACE,YAAY,mBAAmBL,EAAIQ,GAAG,KAAMR,EAAY,SAAEG,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACL,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIT,SAAS,OAAOY,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACL,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIT,SAAS,WAC/c,IGUpB,EACA,KACA,KACA,M,cCXFmB,EAAOC,QAAU,SAASC,GACxBA,EAAIC,UAAUH,EAAOtF,KAAMsF,IAGdA,a","file":"switch/switch.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"switch\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"switch\"] = factory();\n\telse\n\t\troot[\"switch\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 174);\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"nut-switch\",class:[{ 'nut-switch-active': _vm.isActive }, 'nut-switch-' + _vm.size, { 'nut-switch-disabled': _vm.disabled }],on:{\"click\":_vm.toggle}},[_c('div',{staticClass:\"nut-switch-btn\"}),_vm._v(\" \"),(_vm.isActive)?_c('div',{staticClass:\"nut-switch-label\"},[_vm._v(_vm._s(_vm.arrLabel[0]))]):_c('div',{staticClass:\"nut-switch-label\"},[_vm._v(_vm._s(_vm.arrLabel[1]))])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./switch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./switch.vue?vue&type=script&lang=js&\"","<template>\n <div class=\"nut-switch\" :class=\"[{ 'nut-switch-active': isActive }, 'nut-switch-' + size, { 'nut-switch-disabled': disabled }]\" @click=\"toggle\">\n <div class=\"nut-switch-btn\"> </div>\n <div class=\"nut-switch-label\" v-if=\"isActive\">{{ arrLabel[0] }}</div>\n <div class=\"nut-switch-label\" v-else>{{ arrLabel[1] }}</div>\n </div>\n</template>\n<script>\nexport default {\n name: 'nut-switch',\n props: {\n active: {\n type: Boolean,\n default: false\n },\n size: {\n type: String,\n default: 'base'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n label: {\n type: String,\n default: ''\n }\n },\n data() {\n return {\n isActive: false,\n arrLabel: (this.label || '').split('|')\n };\n },\n created() {\n this.isActive = this.active;\n },\n watch: {\n active(newVal) {\n this.isActive = newVal;\n }\n },\n methods: {\n toggle() {\n const status = this.isActive;\n if (!this.disabled) {\n this.isActive = !status;\n setTimeout(() => {\n this.$emit('change', this.isActive);\n this.$emit('update:active', this.isActive);\n }, 300);\n }\n }\n }\n};\n</script>\n","import { render, staticRenderFns } from \"./switch.vue?vue&type=template&id=4b7a9d67&\"\nimport script from \"./switch.vue?vue&type=script&lang=js&\"\nexport * from \"./switch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Switch from './switch.vue';\nimport './switch.scss';\n\nSwitch.install = function(Vue) {\n Vue.component(Switch.name, Switch);\n};\n\nexport default Switch;\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition","webpack://[name]/webpack/bootstrap","webpack://[name]/./node_modules/vue-loader/lib/runtime/componentNormalizer.js","webpack://[name]/./src/packages/switch/switch.vue?bd4c","webpack://[name]/./src/packages/switch/switch.vue?e547","webpack://[name]/src/packages/switch/switch.vue","webpack://[name]/./src/packages/switch/switch.vue","webpack://[name]/./src/packages/switch/index.js"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","normalizeComponent","scriptExports","render","staticRenderFns","functionalTemplate","injectStyles","scopeId","moduleIdentifier","shadowMode","hook","options","_compiled","functional","_scopeId","context","$vnode","ssrContext","parent","__VUE_SSR_CONTEXT__","_registeredComponents","add","_ssrRegister","$root","$options","shadowRoot","_injectStyles","originalRender","h","existing","beforeCreate","concat","props","active","type","Boolean","default","size","String","disabled","label","data","isActive","arrLabel","split","created","watch","newVal","methods","toggle","status","setTimeout","_vm","_h","$createElement","_c","_self","staticClass","class","on","_v","_s","Switch","install","Vue","component"],"mappings":";;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,SAAU,GAAIH,GACK,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,IARnB,CASoB,oBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASO,GAG/DN,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAO,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASf,EAASgB,EAAMC,GAC3CV,EAAoBW,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASvB,GACX,oBAAXwB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAepB,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAepB,EAAS,aAAc,CAAE0B,OAAO,KAQvD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AAE,oBAAqBN,EAAIV,UAAY,cAAgBU,EAAIf,KAAM,CAAE,sBAAuBe,EAAIb,WAAYoB,GAAG,CAAC,MAAQP,EAAIH,SAAS,CAACM,EAAG,MAAM,CAACE,YAAY,mBAAmBL,EAAIQ,GAAG,KAAMR,EAAY,SAAEG,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACL,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIT,SAAS,OAAOY,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACL,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIT,SAAS,WAC/c,IGUpB,EACA,KACA,KACA,M,cCXFmB,EAAOC,QAAU,SAASC,GACxBA,EAAIC,UAAUH,EAAOtF,KAAMsF,IAGdA,a","file":"switch/switch.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"switch\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"switch\"] = factory();\n\telse\n\t\troot[\"switch\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 175);\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () {\n injectStyles.call(\n this,\n (options.functional ? this.parent : this).$root.$options.shadowRoot\n )\n }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functional component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"nut-switch\",class:[{ 'nut-switch-active': _vm.isActive }, 'nut-switch-' + _vm.size, { 'nut-switch-disabled': _vm.disabled }],on:{\"click\":_vm.toggle}},[_c('div',{staticClass:\"nut-switch-btn\"}),_vm._v(\" \"),(_vm.isActive)?_c('div',{staticClass:\"nut-switch-label\"},[_vm._v(_vm._s(_vm.arrLabel[0]))]):_c('div',{staticClass:\"nut-switch-label\"},[_vm._v(_vm._s(_vm.arrLabel[1]))])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./switch.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./switch.vue?vue&type=script&lang=js&\"","<template>\n <div class=\"nut-switch\" :class=\"[{ 'nut-switch-active': isActive }, 'nut-switch-' + size, { 'nut-switch-disabled': disabled }]\" @click=\"toggle\">\n <div class=\"nut-switch-btn\"> </div>\n <div class=\"nut-switch-label\" v-if=\"isActive\">{{ arrLabel[0] }}</div>\n <div class=\"nut-switch-label\" v-else>{{ arrLabel[1] }}</div>\n </div>\n</template>\n<script>\nexport default {\n name: 'nut-switch',\n props: {\n active: {\n type: Boolean,\n default: false\n },\n size: {\n type: String,\n default: 'base'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n label: {\n type: String,\n default: ''\n }\n },\n data() {\n return {\n isActive: false,\n arrLabel: (this.label || '').split('|')\n };\n },\n created() {\n this.isActive = this.active;\n },\n watch: {\n active(newVal) {\n this.isActive = newVal;\n }\n },\n methods: {\n toggle() {\n const status = this.isActive;\n if (!this.disabled) {\n this.isActive = !status;\n setTimeout(() => {\n this.$emit('change', this.isActive);\n this.$emit('update:active', this.isActive);\n }, 300);\n }\n }\n }\n};\n</script>\n","import { render, staticRenderFns } from \"./switch.vue?vue&type=template&id=4b7a9d67&\"\nimport script from \"./switch.vue?vue&type=script&lang=js&\"\nexport * from \"./switch.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Switch from './switch.vue';\nimport './switch.scss';\n\nSwitch.install = function(Vue) {\n Vue.component(Switch.name, Switch);\n};\n\nexport default Switch;\n"],"sourceRoot":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - tab.css, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/.nut-tab{position:relative;border:1px solid #eee;padding:10px;font-size:12px;background:#eee}.nut-tab-horizontal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;position:relative}.close-btn,.nut-tab-horizontal .close-btn{position:absolute;width:17px;height:17px;text-align:center;line-height:14px;font-size:16px;background:#999;font-weight:400;color:#fff;right:0;top:0;-webkit-border-radius:50%;border-radius:50%}.nut-tab-title{border-bottom:1px solid #ededed;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:50px;line-height:48px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;overflow-x:auto;overflow-y:hidden}.nut-tab-title::-webkit-scrollbar{display:none}.nut-tab-title-smooth{scroll-behavior:smooth}.nav-bar{position:absolute;height:2px;bottom:0;left:0;z-index:2;background:red;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.nut-tab-title-leftnav{border-right:1px solid #ededed;scroll-behavior:smooth;width:100px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background:#fff;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;overflow-y:auto;overflow-x:hidden}.nut-tab-title-leftnav::-webkit-scrollbar{display:none}.nut-tab-title-leftnav .nav-bar-left{position:absolute;width:2px;right:0;top:0;z-index:2;background:#eee;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.nut-tab-title-leftnav .nut-title-nav{border:0;border-left:1px solid #f5f7fa}.nut-tab-title-leftnav .nut-tab-active{background:#fff}.nut-tab-title-leftnav .nut-tab-active a{color:red}.nut-tab-title-rightnav{background:#fff;scroll-behavior:smooth;border-left:1px solid #ededed;width:100px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;overflow-y:auto;overflow-x:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.nut-tab-title-rightnav::-webkit-scrollbar{display:none}.nut-tab-title-rightnav .nav-bar-right{position:absolute;width:2px;left:0;top:0;z-index:2;background:#eee;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.nut-tab-link{color:#333;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-size:12px;text-decoration:none;line-height:1;height:100%}.nut-tab-link,.nut-tab-title-bottomnav{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%}.nut-tab-title-bottomnav{scroll-behavior:smooth;border:1px solid #fff;border-top-color:#ededed;height:50px;line-height:49px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;overflow-x:auto;overflow-y:hidden}.nut-tab-title-bottomnav::-webkit-scrollbar{display:none}.nut-tab-title-bottomnav .nav-bar-bottom{position:absolute;height:2px;left:0;top:0;z-index:2;background:#eee;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.nut-title-nav-list{-webkit-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box}.nut-title-nav-leftnav,.nut-title-nav-list{-webkit-box-flex:1;position:relative;-webkit-box-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.nut-title-nav-leftnav{-webkit-flex:1;-ms-flex:1;flex:1;padding-left:5px;-ms-flex-align:center}.nut-title-nav-rightnav{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding-right:5px;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.nut-title-nav-rightnav,.nut-title-nav-scroll{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative}.nut-title-nav-scroll{min-width:100px}.nut-title-nav-scroll,.nut-title-vertical-scroll{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box}.nut-title-vertical-scroll{min-height:55px;position:relative;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.nut-tab-icon{display:inline-block;margin-right:5px;width:20px;height:20px;background-repeat:no-repeat;background-size:100% 100%}.nut-tab-active{background:#fff;border:0}.nut-tab-active a{color:red}.nut-tab-item{height:200px;border:1px solid #fff;background:#fff;width:100%;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box}.nut-tab-item .hide{display:none}.nut-tab-disable{background:#e1e1e1!important}.tabbar-nav-word{font-size:12px}
|
package/dist/packages/tab/tab.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v2.3.
|
|
2
|
+
* @nutui/nutui v2.3.7 - tab.js, 78f455d4cba8a497b5f5, Wed Dec 22 2021 20:57:26 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2017-2020 JDC
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("tab",[],e):"object"==typeof exports?exports.tab=e():t.tab=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="./",i(i.s=84)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,a,s,r){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),n&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=l):o&&(l=r?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(t,e){return l.call(e),d(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}i.d(e,"a",(function(){return n}))},13:function(t,e,i){var n=i(9);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},4:function(t,e,i){var n=i(46),o=i(47),a=i(13),s=i(48);t.exports=function(t){return n(t)||o(t)||a(t)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},46:function(t,e,i){var n=i(9);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},47:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},48:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},56:function(t,e,i){"use strict";var n=i(4),o=i.n(n),a={name:"nut-tab",props:{isScroll:{type:Boolean,default:!1},isShowLine:{type:Boolean,default:!0},defIndex:{type:Number,default:0},positionNav:{type:String,default:"top"},initData:{type:Array,default:function(){return[]}},wrapperHeight:{type:[String,Number],default:"200"},lineWidth:{type:Number,default:0}},data:function(){return{tabTitleList:[],activeIndex:this.defIndex,initX:"0",navWidth:0,tapWidth:0,smoothFlag:!0}},watch:{$route:{handler:function(t,e){this.smoothFlag=!1,this.scrollTab(this.activeIndex)},deep:!0},isScroll:function(){this.updeteTab()},lineWidth:function(){this.updeteTab()},defIndex:function(){this.updeteTab()},initData:{handler:function(){this.updeteTab()},deep:!0}},computed:{positionNavCss:function(){if("left"===this.positionNav||"right"===this.positionNav)return!0},titleClass:function(){var t=this.smoothFlag?"nut-tab-title-smooth":"";return"top"==this.positionNav?"nut-tab-title "+t:"nut-tab-title-"+this.positionNav+"nav "+t},navBarClass:function(){return"top"==this.positionNav?"nav-bar":"nav-bar-"+this.positionNav},titleNavList:function(){return"top"==this.positionNav||"bottom"==this.positionNav?this.isScroll?"nut-title-nav-scroll":"nut-title-nav-list":this.isScroll?"nut-title-vertical-scroll":"nut-title-nav-"+this.positionNav+"nav"},navBarStyle:function(){return"top"===this.positionNav||"bottom"===this.positionNav?{transform:"translateX(".concat(this.initX,"px)"),width:(this.lineWidth?this.lineWidth:this.navWidth)+"px"}:{transform:"translateY(".concat(this.initX,"px)"),height:(this.lineWidth?this.lineWidth:this.navWidth)+"px"}},customHeight:function(){return!this.isScroll||"left"!==this.positionNav&&"right"!==this.positionNav?null:{height:this.wrapperHeight+"px"}}},mounted:function(){var t=this;this.$nextTick((function(){t.$slots.default&&t.updeteTab(t.$slots.default)}))},methods:{updeteTab:function(){var t=this;this.$nextTick((function(){t.tabTitleList=[],t.activeIndex=t.defIndex,t.initTab(o()(t.$slots.default))}))},initTab:function(t){for(var e=this,i=0;i<t.length;i++){var n=t[i].tag;if("string"==typeof n&&-1!=n.indexOf("nut-tab-panel")){var o=t[i].data.attrs,a={tabTitle:o["tab-title"]||o.tabTitle,disable:!1===o.disable,iconUrl:o.iconUrl||o["icon-url"],tabSlot:o["tab-slot"]||o.tabSlot||"",badge:o.badge||!1};this.tabTitleList.push(a)}}this.$nextTick((function(){var t;"top"==e.positionNav||"bottom"==e.positionNav?(e.navWidth=e.$refs.navlist.querySelector(".nut-title-nav").offsetWidth,t=e.$refs.navlist.offsetWidth):(e.navWidth=e.$refs.navlist.querySelector(".nut-title-nav").offsetHeight,t=e.$refs.navlist.offsetHeight),e.lineWidth>0&&e.lineWidth<e.navWidth?e.initX=parseInt((e.navWidth-e.lineWidth)/2+e.navWidth*e.defIndex):(e.initX=parseInt(e.navWidth*e.defIndex),e.tapWidth=t/2-e.navWidth/2),e.scrollTab(e.activeIndex)}))},findParent:function(t,e){for(var i=t.target,n=0;i&&n<10&&(n++,!i.className||i.className!==e);)i=i.parentNode;return i},switchTab:function(t,e,i){i||(this.smoothFlag=!0,this.activeIndex=t,this.scrollTab(t),this.$emit("tab-switch",t,e),this.$emit("tabSwitch",t,e))},scrollTab:function(t){this.lineWidth>0&&this.lineWidth<this.navWidth?this.initX=parseInt((this.navWidth-this.lineWidth)/2+this.navWidth*t):this.initX=parseInt(this.navWidth*t),this.$refs.navlist.scroll&&("top"==this.positionNav||"bottom"==this.positionNav?this.$refs.navlist.scroll(this.initX-this.tapWidth,0,0):this.$refs.navlist.scroll(0,this.initX-this.tapWidth));for(var e=this.$refs.items.children,i=0;i<e.length;i++)i==t?e[i].classList.remove("hide"):e[i].classList.add("hide")}}},s=i(0),r=Object(s.a)(a,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nut-tab-part"},[i("div",{staticClass:"nut-tab",class:{"nut-tab-horizontal":t.positionNavCss}},["right"==t.positionNav||"bottom"==t.positionNav?i("div",{ref:"items",staticClass:"nut-tab-item"},[t._t("default")],2):t._e(),t._v(" "),i("div",{ref:"navlist",class:t.titleClass,style:t.customHeight},[t.isShowLine?i("b",{class:t.navBarClass,style:t.navBarStyle}):t._e(),t._v(" "),t._l(t.tabTitleList,(function(e,n){return i("span",{key:n,class:[t.titleNavList,"nut-title-nav",{"nut-tab-disable":e.disable},{"nut-tab-active":t.activeIndex==n}]},[i("a",{staticClass:"nut-tab-link",on:{click:function(i){return t.switchTab(n,i,e.disable)}}},[e.tabSlot?t._t(e.tabSlot,null,{item:e}):e.badge?i("nut-badge",{attrs:{value:e.badge.value,max:e.badge.max,zIndex:e.badge.zIndex,isDot:e.badge.isDot,hidden:e.badge.hidden,top:e.badge.top,left:e.badge.left}},[e.iconUrl?i("i",{staticClass:"nut-tab-icon",style:{backgroundImage:"url("+e.iconUrl+")"}}):t._e(),t._v("\n "+t._s(e.tabTitle)+"\n ")]):[e.iconUrl?i("i",{staticClass:"nut-tab-icon",style:{backgroundImage:"url("+e.iconUrl+")"}}):t._e(),t._v("\n "+t._s(e.tabTitle)+"\n ")]],2)])}))],2),t._v(" "),"top"==t.positionNav||"left"==t.positionNav?i("div",{ref:"items",staticClass:"nut-tab-item",style:t.customHeight},[t._t("default")],2):t._e()])])}),[],!1,null,null,null);e.a=r.exports},65:function(t,e,i){},84:function(t,e,i){"use strict";i.r(e);var n=i(56);i(65);n.a.install=function(t){t.component(n.a.name,n.a)},e.default=n.a},9:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.default=t.exports,t.exports.__esModule=!0}})}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("tab",[],e):"object"==typeof exports?exports.tab=e():t.tab=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="./",i(i.s=84)}({0:function(t,e,i){"use strict";function n(t,e,i,n,o,a,s,r){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=i,u._compiled=!0),n&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=l):o&&(l=r?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(t,e){return l.call(e),d(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}i.d(e,"a",(function(){return n}))},13:function(t,e,i){var n=i(9);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},4:function(t,e,i){var n=i(46),o=i(47),a=i(13),s=i(48);t.exports=function(t){return n(t)||o(t)||a(t)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},46:function(t,e,i){var n=i(9);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},47:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},48:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},56:function(t,e,i){"use strict";var n=i(4),o=i.n(n),a={name:"nut-tab",props:{isScroll:{type:Boolean,default:!1},isShowLine:{type:Boolean,default:!0},defIndex:{type:Number,default:0},positionNav:{type:String,default:"top"},initData:{type:Array,default:function(){return[]}},wrapperHeight:{type:[String,Number],default:"200"},lineWidth:{type:Number,default:0}},data:function(){return{tabTitleList:[],activeIndex:this.defIndex,initX:"0",navWidth:0,tapWidth:0,smoothFlag:!0}},watch:{$route:{handler:function(t,e){this.smoothFlag=!1,this.scrollTab(this.activeIndex)},deep:!0},isScroll:function(){this.updeteTab()},lineWidth:function(){this.updeteTab()},defIndex:function(){this.updeteTab()},initData:{handler:function(){this.updeteTab()},deep:!0}},computed:{positionNavCss:function(){if("left"===this.positionNav||"right"===this.positionNav)return!0},titleClass:function(){var t=this.smoothFlag?"nut-tab-title-smooth":"";return"top"==this.positionNav?"nut-tab-title "+t:"nut-tab-title-"+this.positionNav+"nav "+t},navBarClass:function(){return"top"==this.positionNav?"nav-bar":"nav-bar-"+this.positionNav},titleNavList:function(){return"top"==this.positionNav||"bottom"==this.positionNav?this.isScroll?"nut-title-nav-scroll":"nut-title-nav-list":this.isScroll?"nut-title-vertical-scroll":"nut-title-nav-"+this.positionNav+"nav"},navBarStyle:function(){return"top"===this.positionNav||"bottom"===this.positionNav?{transform:"translateX(".concat(this.initX,"px)"),width:(this.lineWidth?this.lineWidth:this.navWidth)+"px"}:{transform:"translateY(".concat(this.initX,"px)"),height:(this.lineWidth?this.lineWidth:this.navWidth)+"px"}},customHeight:function(){return!this.isScroll||"left"!==this.positionNav&&"right"!==this.positionNav?null:{height:this.wrapperHeight+"px"}}},mounted:function(){var t=this;this.$nextTick((function(){t.$slots.default&&t.updeteTab(t.$slots.default)}))},methods:{updeteTab:function(){var t=this;this.$nextTick((function(){t.tabTitleList=[],t.activeIndex=t.defIndex,t.initTab(o()(t.$slots.default))}))},initTab:function(t){for(var e=this,i=0;i<t.length;i++){var n=t[i].tag;if("string"==typeof n&&-1!=n.indexOf("nut-tab-panel")){var o=t[i].data.attrs,a={tabTitle:o["tab-title"]||o.tabTitle,disable:!1===o.disable,iconUrl:o.iconUrl||o["icon-url"],tabSlot:o["tab-slot"]||o.tabSlot||"",badge:o.badge||!1};this.tabTitleList.push(a)}}this.$nextTick((function(){var t;"top"==e.positionNav||"bottom"==e.positionNav?(e.navWidth=e.$refs.navlist.querySelector(".nut-title-nav").offsetWidth,t=e.$refs.navlist.offsetWidth):(e.navWidth=e.$refs.navlist.querySelector(".nut-title-nav").offsetHeight,t=e.$refs.navlist.offsetHeight),e.lineWidth>0&&e.lineWidth<e.navWidth?(e.initX=parseInt((e.navWidth-e.lineWidth)/2+e.navWidth*e.defIndex),e.tapWidth=t/2-e.navWidth/2):(e.initX=parseInt(e.navWidth*e.defIndex),e.tapWidth=t/2-e.navWidth/2),e.scrollTab(e.activeIndex)}))},findParent:function(t,e){for(var i=t.target,n=0;i&&n<10&&(n++,!i.className||i.className!==e);)i=i.parentNode;return i},switchTab:function(t,e,i){i||(this.smoothFlag=!0,this.activeIndex=t,this.scrollTab(t),this.$emit("tab-switch",t,e),this.$emit("tabSwitch",t,e))},scrollTab:function(t){this.lineWidth>0&&this.lineWidth<this.navWidth?this.initX=parseInt((this.navWidth-this.lineWidth)/2+this.navWidth*t):this.initX=parseInt(this.navWidth*t),this.$refs.navlist.scroll&&("top"==this.positionNav||"bottom"==this.positionNav?this.$refs.navlist.scroll(this.initX-this.tapWidth,0,0):this.$refs.navlist.scroll(0,this.initX-this.tapWidth));for(var e=this.$refs.items.children,i=0;i<e.length;i++)i==t?e[i].classList.remove("hide"):e[i].classList.add("hide")}}},s=i(0),r=Object(s.a)(a,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"nut-tab-part"},[i("div",{staticClass:"nut-tab",class:{"nut-tab-horizontal":t.positionNavCss}},["right"==t.positionNav||"bottom"==t.positionNav?i("div",{ref:"items",staticClass:"nut-tab-item"},[t._t("default")],2):t._e(),t._v(" "),i("div",{ref:"navlist",class:t.titleClass,style:t.customHeight},[t.isShowLine?i("b",{class:t.navBarClass,style:t.navBarStyle}):t._e(),t._v(" "),t._l(t.tabTitleList,(function(e,n){return i("span",{key:n,class:[t.titleNavList,"nut-title-nav",{"nut-tab-disable":e.disable},{"nut-tab-active":t.activeIndex==n}]},[i("a",{staticClass:"nut-tab-link",on:{click:function(i){return t.switchTab(n,i,e.disable)}}},[e.tabSlot?t._t(e.tabSlot,null,{item:e}):e.badge?i("nut-badge",{attrs:{value:e.badge.value,max:e.badge.max,zIndex:e.badge.zIndex,isDot:e.badge.isDot,hidden:e.badge.hidden,top:e.badge.top,left:e.badge.left}},[e.iconUrl?i("i",{staticClass:"nut-tab-icon",style:{backgroundImage:"url("+e.iconUrl+")"}}):t._e(),t._v("\n "+t._s(e.tabTitle)+"\n ")]):[e.iconUrl?i("i",{staticClass:"nut-tab-icon",style:{backgroundImage:"url("+e.iconUrl+")"}}):t._e(),t._v("\n "+t._s(e.tabTitle)+"\n ")]],2)])}))],2),t._v(" "),"top"==t.positionNav||"left"==t.positionNav?i("div",{ref:"items",staticClass:"nut-tab-item",style:t.customHeight},[t._t("default")],2):t._e()])])}),[],!1,null,null,null);e.a=r.exports},65:function(t,e,i){},84:function(t,e,i){"use strict";i.r(e);var n=i(56);i(65);n.a.install=function(t){t.component(n.a.name,n.a)},e.default=n.a},9:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.default=t.exports,t.exports.__esModule=!0}})}));
|
|
7
7
|
//# sourceMappingURL=tab.js.map
|