diff --git a/lib/action-sheet/action-sheet.min.css b/lib/action-sheet/action-sheet.min.css index 8850eeb64..a4d26b28d 100644 --- a/lib/action-sheet/action-sheet.min.css +++ b/lib/action-sheet/action-sheet.min.css @@ -1 +1 @@ -.cube-action-sheet-fade-enter,.cube-action-sheet-fade-leave-active{opacity:0}.cube-action-sheet-fade-enter-active,.cube-action-sheet-fade-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-panel{text-align:center;font-size:14px;background-color:#fff}.cube-action-sheet-move-enter,.cube-action-sheet-move-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.cube-action-sheet-move-enter-active,.cube-action-sheet-move-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-cancel{background-color:#fff}.cube-action-sheet-cancel span,.cube-action-sheet-item,.cube-action-sheet-title{display:block;padding:17px 16px;margin:0;text-align:center;overflow:hidden;white-space:nowrap;font-size:16px;font-weight:400;line-height:1;color:#666;background-color:#fff}.cube-action-sheet-cancel span:active,.cube-action-sheet-item:active{background-color:rgba(0,0,0,.04)}.cube-action-sheet-title{padding-top:16px;padding-bottom:16px;color:#333;font-size:18px}.cube-action-sheet-content{overflow:hidden;background:#fff}.cube-action-sheet-list{list-style:none}.cube-action-sheet-item{list-style:none;-webkit-user-select:none;user-select:none}.cube-action-sheet-item:last-of-type:after,.cube-action-sheet-item:last-of-type:before{display:none}.cube-action-sheet-item[data-align=left]{text-align:left}.cube-action-sheet-item[data-align=right]{text-align:right}.cube-action-sheet-space{height:6px;background-color:rgba(37,38,45,.4)}.cube-action-sheet-item_active{color:#fc9153}.cube-action-sheet_picker .cube-action-sheet-space{height:0}.cube-action-sheet_picker .cube-action-sheet-title{height:1em;padding-top:21px;padding-bottom:21px}.cube-action-sheet_picker .cube-action-sheet-cancel{position:absolute;top:0;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span{padding-top:23px;padding-bottom:23px;color:#999;font-size:14px;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span:active{color:#ccc;background-color:transparent}.cube-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:100}.cube-popup-container,.cube-popup-mask{position:absolute;width:100%;height:100%}.cube-popup-mask{overflow:hidden;background-color:#25262d;opacity:.4}.cube-popup-mask:before{content:".";display:block;width:1px;height:1px;background-color:rgba(0,0,0,.1);margin-left:-10px}.cube-popup-container{-webkit-transform:translate(100%,100%);transform:translate(100%,100%)}.cube-popup-content{position:absolute;top:0;left:0;width:100%;box-sizing:border-box;-webkit-transform:translate(-100%,-100%);transform:translate(-100%,-100%)}.cube-popup-center .cube-popup-content{position:absolute;top:-50%;left:-50%;width:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)} \ No newline at end of file +.cube-action-sheet-fade-enter,.cube-action-sheet-fade-leave-active{opacity:0}.cube-action-sheet-fade-enter-active,.cube-action-sheet-fade-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-panel{text-align:center;font-size:14px;background-color:#fff}.cube-action-sheet-move-enter,.cube-action-sheet-move-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.cube-action-sheet-move-enter-active,.cube-action-sheet-move-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-cancel{background-color:#fff}.cube-action-sheet-cancel span,.cube-action-sheet-item,.cube-action-sheet-title{display:block;padding:17px 16px;margin:0;text-align:center;overflow:hidden;white-space:nowrap;font-size:16px;font-weight:400;line-height:1;color:#666;background-color:#fff}.cube-action-sheet-cancel span:active,.cube-action-sheet-item:active{background-color:rgba(0,0,0,.04)}.cube-action-sheet-title{padding-top:16px;padding-bottom:16px;color:#333;font-size:18px}.cube-action-sheet-content{overflow:hidden;background:#fff}.cube-action-sheet-list{list-style:none}.cube-action-sheet-item{list-style:none;-webkit-user-select:none;user-select:none}.cube-action-sheet-item:last-of-type:after,.cube-action-sheet-item:last-of-type:before{display:none}.cube-action-sheet-item[data-align=left]{text-align:left}.cube-action-sheet-item[data-align=right]{text-align:right}.cube-action-sheet-space{height:6px;background-color:rgba(37,38,45,.4)}.cube-action-sheet-item_active{color:#fc9153}.cube-action-sheet_picker .cube-action-sheet-space{height:0}.cube-action-sheet_picker .cube-action-sheet-title{height:1em;padding-top:21px;padding-bottom:21px}.cube-action-sheet_picker .cube-action-sheet-cancel{position:absolute;top:0;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span{padding-top:23px;padding-bottom:23px;color:#999;font-size:14px;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span:active{color:#ccc;background-color:transparent}.cube-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:100;pointer-events:none}.cube-popup_mask{pointer-events:auto}.cube-popup_mask .cube-popup-mask{display:block}.cube-popup-container,.cube-popup-mask{position:absolute;width:100%;height:100%}.cube-popup-mask{display:none;overflow:hidden;background-color:#25262d;opacity:.4;pointer-events:auto}.cube-popup-mask:before{content:".";display:block;width:1px;height:1px;background-color:rgba(0,0,0,.1);margin-left:-10px}.cube-popup-container{-webkit-transform:translate(100%,100%);transform:translate(100%,100%)}.cube-popup-content{position:absolute;top:0;left:0;width:100%;box-sizing:border-box;-webkit-transform:translate(-100%,-100%);transform:translate(-100%,-100%);pointer-events:auto}.cube-popup-center .cube-popup-content{position:absolute;top:-50%;left:-50%;width:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)} \ No newline at end of file diff --git a/lib/action-sheet/action-sheet.min.js b/lib/action-sheet/action-sheet.min.js index 6a152c8f0..e7b7c9e1a 100644 --- a/lib/action-sheet/action-sheet.min.js +++ b/lib/action-sheet/action-sheet.min.js @@ -1 +1 @@ -module.exports=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=221)}({0:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},1:function(t,e){t.exports=function(t,e,n,r,o){var i,u=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(i=t,u=t.default);var a="function"==typeof u?u.options:u;e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns),r&&(a._scopeId=r);var s;if(o?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},a._ssrRegister=s):n&&(s=n),s){var f=a.functional,l=f?a.render:a.beforeCreate;f?a.render=function(t,e){return s.call(e),l(t,e)}:a.beforeCreate=l?[].concat(l,s):[s]}return{esModule:i,exports:u,options:a}}},10:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},11:function(t,e,n){var r=n(0),o=n(3),i=n(21),u=n(7),c=n(5),a=function(t,e,n){var s,f,l,p=t&a.F,d=t&a.G,v=t&a.S,_=t&a.P,y=t&a.B,h=t&a.W,b=d?o:o[e]||(o[e]={}),m=b.prototype,x=d?r:v?r[e]:(r[e]||{}).prototype;d&&(n=e);for(s in n)(f=!p&&x&&void 0!==x[s])&&c(b,s)||(l=f?x[s]:n[s],b[s]=d&&"function"!=typeof x[s]?n[s]:y&&f?i(l,r):h&&x[s]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):_&&"function"==typeof l?i(Function.call,l):l,_&&((b.virtual||(b.virtual={}))[s]=l,t&a.R&&m&&!m[s]&&u(m,s,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},12:function(t,e,n){var r=n(23),o=n(13);t.exports=function(t){return r(o(t))}},13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},14:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},15:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},16:function(t,e,n){var r=n(25)("keys"),o=n(20);t.exports=function(t){return r[t]||(r[t]=o(t))}},17:function(t,e,n){var r=n(13);t.exports=function(t){return Object(r(t))}},18:function(t,e,n){var r=n(34),o=n(26);t.exports=Object.keys||function(t){return r(t,o)}},19:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},20:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},21:function(t,e,n){var r=n(28);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},221:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(222),n(226)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=o(n),u=o(r);i.default.install=function(t){t.component(i.default.name,i.default),(0,u.default)(t,i.default)},e.default=i.default,t.exports=e.default})},222:function(t,e,n){function r(t){n(223)}var o=n(1)(n(224),n(225),r,null,null);t.exports=o.exports},223:function(t,e){},224:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(60),n(32)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=o(n),u=o(r);e.default={name:"cube-action-sheet",mixins:[u.default],props:{data:{type:Array,default:function(){return[]}},active:{type:Number,default:-1},title:{type:String,default:" "},pickerStyle:{type:Boolean,default:!1},zIndex:{type:Number}},methods:{noop:function(){},cancel:function(){this.hide(),this.$emit("cancel")},itemClick:function(t,e){this.hide(),this.$emit("select",t,e)}},components:{CubePopup:i.default}},t.exports=e.default})},225:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"cube-action-sheet-fade"}},[n("cube-popup",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],class:{"cube-action-sheet_picker":t.pickerStyle},attrs:{type:"action-sheet",center:!1,mask:!0,"z-index":t.zIndex},on:{touchmove:function(e){return e.preventDefault(),t.noop(e)},"mask-click":t.cancel}},[n("transition",{attrs:{name:"cube-action-sheet-move"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"cube-action-sheet-panel cube-safe-area-pb",on:{click:function(e){return e.stopPropagation(),t.noop(e)}}},[n("h1",{directives:[{name:"show",rawName:"v-show",value:t.pickerStyle||t.title,expression:"pickerStyle || title"}],staticClass:"cube-action-sheet-title border-bottom-1px"},[t._v(t._s(t.title))]),t._v(" "),n("div",{staticClass:"cube-action-sheet-content"},[n("ul",{staticClass:"cube-action-sheet-list"},t._l(t.data,function(e,r){return n("li",{staticClass:"cube-action-sheet-item border-bottom-1px",class:[e.class||"",r===t.active?"cube-action-sheet-item_active":""],attrs:{"data-align":e.align},domProps:{innerHTML:t._s(e.content)},on:{click:function(n){t.itemClick(e,r)}}})}))]),t._v(" "),n("div",{staticClass:"cube-action-sheet-space"}),t._v(" "),n("div",{staticClass:"cube-action-sheet-cancel",on:{click:t.cancel}},[n("span",[t._v("取消")])])])])],1)],1)},staticRenderFns:[]}},226:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(46)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n){"use strict";function r(t,e){(0,o.default)(t,e,["select","cancel"],!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var o=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=e.default})},23:function(t,e,n){var r=n(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},24:function(t,e,n){var r=n(6),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},25:function(t,e,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},26:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},27:function(t,e,n){var r=n(14),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},28:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},29:function(t,e,n){t.exports={default:n(42),__esModule:!0}},3:function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},30:function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},31:function(t,e){e.f={}.propertyIsEnumerable},32:function(t,e,n){var r,o,i;!function(n,u){o=[t,e],r=u,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!0},hide:function(){this.isVisible=!1}}},t.exports=e.default})},33:function(t,e,n){t.exports=!n(4)&&!n(10)(function(){return 7!=Object.defineProperty(n(24)("div"),"a",{get:function(){return 7}}).a})},34:function(t,e,n){var r=n(5),o=n(12),i=n(37)(!1),u=n(16)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),a=0,s=[];for(n in c)n!=u&&r(c,n)&&s.push(n);for(;e.length>a;)r(c,n=e[a++])&&(~i(s,n)||s.push(n));return s}},36:function(t,e){e.f=Object.getOwnPropertySymbols},37:function(t,e,n){var r=n(12),o=n(27),i=n(38);t.exports=function(t){return function(e,n,u){var c,a=r(e),s=o(a.length),f=i(u,s);if(t&&n!=n){for(;s>f;)if((c=a[f++])!=c)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},38:function(t,e,n){var r=n(14),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},39:function(t,e,n){"use strict";e.__esModule=!0;var r=n(29),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default||function(t){for(var e=1;es;)for(var p,d=c(arguments[s++]),v=f?r(d).concat(f(d)):r(d),_=v.length,y=0;_>y;)l.call(d,p=v[y++])&&(n[p]=d[p]);return n}:a},46:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(40),n(51)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t,e,r,o){var u=i.default.apply(this,arguments),c=e.name,a=c.replace(/^cube-/i,""),s="$"+(0,n.camelize)("create-"+a);return t.prototype[s]=u.create,e.$create=u.create,u}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.default})},5:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},51:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(52),n(53)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=void 0,i=void 0,a=[],s={before:function(t){a.push(t)},open:function(n,c,s){if("function"!=typeof c&&(s=c,c=null),a.forEach(function(t){t(n,c,s)}),void 0===s&&(s=r),s&&o)return i.updateRenderData(n,c),i.$forceUpdate(),o;var f=(0,u.default)(t,e,n,c),l=f.$parent,p=f.remove;f.remove=function(){l.__cube__destroyed||(p&&p.call(this),l.destroy(),l.__cube__destroyed=!0,s&&(o=null,i=null))};var d=f.show;f.show=function(){return d&&d.call(this),this};var v=f.hide;return f.hide=function(){return v&&v.call(this),this},s&&(o=f,i=l),f},create:function(t,e,r){var o=this,i=s.open((0,c.default)(t,n),e,r);if(i.__cube__parent!==o){i.__cube__parent=o;var u=function t(){i.__cube__parent===o&&i.remove(),o.$off("hook:beforeDestroy",t),i.__cube__parent=null};o.$on("hook:beforeDestroy",u)}return i}};return s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var u=o(n),c=o(r);t.exports=e.default})},52:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(29),n(39)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,r){var o=void 0,i=void 0,a=new t({render:function(t){var n=i&&i(t);return n&&!Array.isArray(n)&&(n=[n]),t(e,(0,c.default)({},o),n||[])},methods:{init:function(){document.body.appendChild(this.$el)},destroy:function(){this.$destroy(),document.body.removeChild(this.$el)}}});a.updateRenderData=function(t,e){o=t,i=e},a.updateRenderData(n,r),a.$mount(),a.init();var s=a.$children[0];return s.$updateProps=function(t){(0,u.default)(o.props,t),a.$forceUpdate()},s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var u=o(n),c=o(r);t.exports=e.default})},53:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(39),n(40)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=i(e);var n=(0,u.default)({},t),r={};for(var o in e)if(e.hasOwnProperty(o)){var c=e[o];n[c]&&(r[o]=n[c],delete n[c])}return{props:n,on:r}}function i(t){var e={};return t.forEach(function(t){e[t]=(0,r.camelize)("on-"+t)}),e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var u=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=e.default})},6:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},60:function(t,e,n){function r(t){n(61)}var o=n(1)(n(62),n(63),r,null,null);t.exports=o.exports},61:function(t,e){},62:function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(32)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={name:"cube-popup",mixins:[r.default],props:{type:{type:String,default:""},mask:{type:Boolean,default:!0},content:{type:String,default:""},center:{type:Boolean,default:!0},zIndex:{type:Number,default:100}},computed:{typeClass:function(){return this.type?"cube-"+this.type:""}},methods:{maskClick:function(t){this.$emit("mask-click",t)}}},t.exports=e.default})},63:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"cube-popup",class:t.typeClass,style:{"z-index":t.zIndex}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.mask,expression:"mask"}],staticClass:"cube-popup-mask",on:{click:t.maskClick}},[t._t("mask")],2),t._v(" "),n("div",{staticClass:"cube-popup-container",class:{"cube-popup-center":t.center}},[t.$slots.default?n("div",{staticClass:"cube-popup-content"},[t._t("default")],2):n("div",{staticClass:"cube-popup-content",domProps:{innerHTML:t._s(t.content)}})])])},staticRenderFns:[]}},7:function(t,e,n){var r=n(8),o=n(15);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},8:function(t,e,n){var r=n(9),o=n(33),i=n(30),u=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},9:function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}}}); \ No newline at end of file +module.exports=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=223)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t,e,n,r,o){var i,u=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(i=t,u=t.default);var a="function"==typeof u?u.options:u;e&&(a.render=e.render,a.staticRenderFns=e.staticRenderFns),r&&(a._scopeId=r);var s;if(o?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},a._ssrRegister=s):n&&(s=n),s){var f=a.functional,l=f?a.render:a.beforeCreate;f?a.render=function(t,e){return s.call(e),l(t,e)}:a.beforeCreate=l?[].concat(l,s):[s]}return{esModule:i,exports:u,options:a}}},,function(t,e,n){t.exports=!n(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(11),o=n(33),i=n(29),u=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(0),o=n(1),i=n(22),u=n(10),c=n(6),a=function(t,e,n){var s,f,l,p=t&a.F,d=t&a.G,v=t&a.S,_=t&a.P,h=t&a.B,y=t&a.W,b=d?o:o[e]||(o[e]={}),x=b.prototype,m=d?r:v?r[e]:(r[e]||{}).prototype;d&&(n=e);for(s in n)(f=!p&&m&&void 0!==m[s])&&c(b,s)||(l=f?m[s]:n[s],b[s]=d&&"function"!=typeof m[s]?n[s]:h&&f?i(l,r):y&&m[s]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):_&&"function"==typeof l?i(Function.call,l):l,_&&((b.virtual||(b.virtual={}))[s]=l,t&a.R&&x&&!x[s]&&u(x,s,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(8),o=n(17);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(23),o=n(15);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(32),o=n(25);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(24)("keys"),o=n(20);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},,function(t,e,n){var r=n(28);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(7),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(16),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(7);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports={default:n(46),__esModule:!0}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(6),o=n(12),i=n(38)(!1),u=n(18)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),a=0,s=[];for(n in c)n!=u&&r(c,n)&&s.push(n);for(;e.length>a;)r(c,n=e[a++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){t.exports=!n(4)&&!n(5)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},,function(t,e,n){var r,o,i;!function(n,u){o=[t,e],r=u,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!0},hide:function(){this.isVisible=!1}}},t.exports=e.default})},function(t,e,n){t.exports={default:n(43),__esModule:!0}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(12),o=n(27),i=n(39);t.exports=function(t){return function(e,n,u){var c,a=r(e),s=o(a.length),f=i(u,s);if(t&&n!=n){for(;s>f;)if((c=a[f++])!=c)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(16),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(30),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default||function(t){for(var e=1;es;)for(var p,d=c(arguments[s++]),v=f?r(d).concat(f(d)):r(d),_=v.length,h=0;_>h;)l.call(d,p=v[h++])&&(n[p]=d[p]);return n}:a},,function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(41),n(55)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t,e,r,o){var u=i.default.apply(this,arguments),c=e.name,a=c.replace(/^cube-/i,""),s="$"+(0,n.camelize)("create-"+a);return t.prototype[s]=u.create,e.$create=u.create,u}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.default})},,,,,function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(36),n(56),n(57)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=void 0,i=void 0,u=[],f={before:function(t){u.push(t)},open:function(n,c,s){if("function"!=typeof c&&(s=c,c=null),u.forEach(function(t){t(n,c,s)}),void 0===s&&(s=r),s&&o)return i.updateRenderData(n,c),i.$forceUpdate(),o;var f=(0,a.default)(t,e,n,c),l=f.$parent,p=f.remove;f.remove=function(){l.__cube__destroyed||(p&&p.call(this),l.destroy(),l.__cube__destroyed=!0,s&&(o=null,i=null))};var d=f.show;f.show=function(){return d&&d.call(this),this};var v=f.hide;return f.hide=function(){return v&&v.call(this),this},s&&(o=f,i=l),f},create:function(t,e,r){function o(){i.__createAPI_watcher&&(i.__createAPI_watcher(),i.__createAPI_watcher=null)}var i=this,u=(0,s.default)(t,n);o(),function(){var t=u.props.$props;if(t){delete u.props.$props;var e=[],n=[];(0,c.default)(t).forEach(function(r){var o=t[r];"string"==typeof o&&o in i?(u.props[r]=i[o],e.push(r),n.push(o)):u.props[r]=o}),i.$watch&&(i.__createAPI_watcher=i.$watch(function(){var t={};return e.forEach(function(e,r){t[e]=i[n[r]]}),t},function(t){a&&a.$updateProps(t)}))}}(),function(){var t=u.props.$events;t&&(delete u.props.$events,(0,c.default)(t).forEach(function(e){var n=t[e];"string"==typeof n&&(n=i[n]),u.on[e]=n}))}();var a=f.open(u,e,r);if(a.__cube__parent!==i){a.__cube__parent=i;var l=function t(){o(),a.__cube__parent===i&&a.remove(),i.$off("hook:beforeDestroy",t),a.__cube__parent=null};i.$on&&i.$on("hook:beforeDestroy",l)}return a}};return f}Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var c=i(n),a=i(r),s=i(o);t.exports=e.default})},function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(30),n(40)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n,r){var o=void 0,i=void 0,a=new t({render:function(t){var n=i&&i(t);return n&&!Array.isArray(n)&&(n=[n]),t(e,(0,c.default)({},o),n||[])},methods:{init:function(){document.body.appendChild(this.$el)},destroy:function(){this.$destroy(),document.body.removeChild(this.$el)}}});a.updateRenderData=function(t,e){o=t,i=e},a.updateRenderData(n,r),a.$mount(),a.init();var s=a.$children[0];return s.$updateProps=function(t){(0,u.default)(o.props,t),a.$forceUpdate()},s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var u=o(n),c=o(r);t.exports=e.default})},function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(40),n(41)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=i(e);var n=(0,u.default)({},t),r={};for(var o in e)if(e.hasOwnProperty(o)){var c=e[o];n[c]&&(r[o]=n[c],delete n[c])}return{props:n,on:r}}function i(t){var e={};return t.forEach(function(t){e[t]=(0,r.camelize)("on-"+t)}),e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var u=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=e.default})},,,,,,,,function(t,e,n){function r(t){n(66)}var o=n(2)(n(67),n(68),r,null,null);t.exports=o.exports},function(t,e){},function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(35)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={name:"cube-popup",mixins:[r.default],props:{type:{type:String,default:""},mask:{type:Boolean,default:!0},content:{type:String,default:""},center:{type:Boolean,default:!0},zIndex:{type:Number,default:100}},computed:{rootClass:function(){var t={"cube-popup_mask":this.mask};return this.type&&(t["cube-"+this.type]=!0),t}},methods:{maskClick:function(t){this.$emit("mask-click",t)}}},t.exports=e.default})},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"cube-popup",class:t.rootClass,style:{"z-index":t.zIndex}},[n("div",{staticClass:"cube-popup-mask",on:{click:t.maskClick}},[t._t("mask")],2),t._v(" "),n("div",{staticClass:"cube-popup-container",class:{"cube-popup-center":t.center}},[t.$slots.default?n("div",{staticClass:"cube-popup-content"},[t._t("default")],2):n("div",{staticClass:"cube-popup-content",domProps:{innerHTML:t._s(t.content)}})])])},staticRenderFns:[]}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(224),n(228)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=o(n),u=o(r);i.default.install=function(t){t.component(i.default.name,i.default),(0,u.default)(t,i.default)},e.default=i.default,t.exports=e.default})},function(t,e,n){function r(t){n(225)}var o=n(2)(n(226),n(227),r,null,null);t.exports=o.exports},function(t,e){},function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(65),n(35)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=o(n),u=o(r);e.default={name:"cube-action-sheet",mixins:[u.default],props:{data:{type:Array,default:function(){return[]}},active:{type:Number,default:-1},title:{type:String,default:" "},pickerStyle:{type:Boolean,default:!1},zIndex:{type:Number}},methods:{noop:function(){},cancel:function(){this.hide(),this.$emit("cancel")},itemClick:function(t,e){this.hide(),this.$emit("select",t,e)}},components:{CubePopup:i.default}},t.exports=e.default})},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"cube-action-sheet-fade"}},[n("cube-popup",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],class:{"cube-action-sheet_picker":t.pickerStyle},attrs:{type:"action-sheet",center:!1,mask:!0,"z-index":t.zIndex},on:{touchmove:function(e){return e.preventDefault(),t.noop(e)},"mask-click":t.cancel}},[n("transition",{attrs:{name:"cube-action-sheet-move"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isVisible,expression:"isVisible"}],staticClass:"cube-action-sheet-panel cube-safe-area-pb",on:{click:function(e){return e.stopPropagation(),t.noop(e)}}},[n("h1",{directives:[{name:"show",rawName:"v-show",value:t.pickerStyle||t.title,expression:"pickerStyle || title"}],staticClass:"cube-action-sheet-title border-bottom-1px"},[t._v(t._s(t.title))]),t._v(" "),n("div",{staticClass:"cube-action-sheet-content"},[n("ul",{staticClass:"cube-action-sheet-list"},t._l(t.data,function(e,r){return n("li",{staticClass:"cube-action-sheet-item border-bottom-1px",class:[e.class||"",r===t.active?"cube-action-sheet-item_active":""],attrs:{"data-align":e.align},domProps:{innerHTML:t._s(e.content)},on:{click:function(n){t.itemClick(e,r)}}})}))]),t._v(" "),n("div",{staticClass:"cube-action-sheet-space"}),t._v(" "),n("div",{staticClass:"cube-action-sheet-cancel",on:{click:t.cancel}},[n("span",[t._v("取消")])])])])],1)],1)},staticRenderFns:[]}},function(t,e,n){var r,o,i;!function(u,c){o=[t,e,n(50)],r=c,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i)}(0,function(t,e,n){"use strict";function r(t,e){(0,o.default)(t,e,["select","cancel"],!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var o=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=e.default})}]); \ No newline at end of file diff --git a/lib/action-sheet/index.js b/lib/action-sheet/index.js index 4fe441ac9..9b99d94ab 100644 --- a/lib/action-sheet/index.js +++ b/lib/action-sheet/index.js @@ -61,12 +61,11 @@ module.exports = /******/ __webpack_require__.p = "./"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 221); +/******/ return __webpack_require__(__webpack_require__.s = 223); /******/ }) /************************************************************************/ -/******/ ({ - -/***/ 0: +/******/ ([ +/* 0 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 @@ -78,8 +77,15 @@ if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), +/* 1 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.5' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + -/***/ 1: +/***/ }), +/* 2 */ /***/ (function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ @@ -176,8 +182,18 @@ module.exports = function normalizeComponent ( /***/ }), +/* 3 */, +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ 10: +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(5)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 5 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -190,15 +206,55 @@ module.exports = function (exec) { /***/ }), +/* 6 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ 11: +var anObject = __webpack_require__(11); +var IE8_DOM_DEFINE = __webpack_require__(33); +var toPrimitive = __webpack_require__(29); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 9 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(0); -var core = __webpack_require__(3); -var ctx = __webpack_require__(21); -var hide = __webpack_require__(7); -var has = __webpack_require__(5); +var core = __webpack_require__(1); +var ctx = __webpack_require__(22); +var hide = __webpack_require__(10); +var has = __webpack_require__(6); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { @@ -259,21 +315,68 @@ module.exports = $export; /***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(8); +var createDesc = __webpack_require__(17); +module.exports = __webpack_require__(4) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(7); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + -/***/ 12: +/***/ }), +/* 12 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(23); -var defined = __webpack_require__(13); +var defined = __webpack_require__(15); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(32); +var enumBugKeys = __webpack_require__(25); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ 13: +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(15); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 15 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) @@ -284,8 +387,7 @@ module.exports = function (it) { /***/ }), - -/***/ 14: +/* 16 */ /***/ (function(module, exports) { // 7.1.4 ToInteger @@ -297,8 +399,7 @@ module.exports = function (it) { /***/ }), - -/***/ 15: +/* 17 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { @@ -312,11 +413,10 @@ module.exports = function (bitmap, value) { /***/ }), - -/***/ 16: +/* 18 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(25)('keys'); +var shared = __webpack_require__(24)('keys'); var uid = __webpack_require__(20); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); @@ -324,34 +424,7 @@ module.exports = function (key) { /***/ }), - -/***/ 17: -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(13); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), - -/***/ 18: -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(34); -var enumBugKeys = __webpack_require__(26); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), - -/***/ 19: +/* 19 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -362,8 +435,7 @@ module.exports = function (it) { /***/ }), - -/***/ 20: +/* 20 */ /***/ (function(module, exports) { var id = 0; @@ -374,8 +446,8 @@ module.exports = function (key) { /***/ }), - -/***/ 21: +/* 21 */, +/* 22 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding @@ -401,432 +473,150 @@ module.exports = function (fn, that, length) { /***/ }), - -/***/ 221: +/* 23 */ /***/ (function(module, exports, __webpack_require__) { -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(222), __webpack_require__(226)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports !== "undefined") { - factory(module, exports, require('../../components/action-sheet/action-sheet.vue'), require('./api')); - } else { - var mod = { - exports: {} - }; - factory(mod, mod.exports, global.actionSheet, global.api); - global.index = mod.exports; - } -})(this, function (module, exports, _actionSheet, _api) { - 'use strict'; +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(19); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; - Object.defineProperty(exports, "__esModule", { - value: true - }); - var _actionSheet2 = _interopRequireDefault(_actionSheet); +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { - var _api2 = _interopRequireDefault(_api); +var global = __webpack_require__(0); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - _actionSheet2.default.install = function (Vue) { - Vue.component(_actionSheet2.default.name, _actionSheet2.default); - (0, _api2.default)(Vue, _actionSheet2.default); - }; +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); - exports.default = _actionSheet2.default; - module.exports = exports['default']; -}); /***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(7); +var document = __webpack_require__(0).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + -/***/ 222: +/***/ }), +/* 27 */ /***/ (function(module, exports, __webpack_require__) { -function injectStyle (ssrContext) { - __webpack_require__(223) -} -var Component = __webpack_require__(1)( - /* script */ - __webpack_require__(224), - /* template */ - __webpack_require__(225), - /* styles */ - injectStyle, - /* scopeId */ - null, - /* moduleIdentifier (server only) */ - null -) +// 7.1.15 ToLength +var toInteger = __webpack_require__(16); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; -module.exports = Component.exports + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(7); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; /***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(46), __esModule: true }; -/***/ 223: +/***/ }), +/* 31 */ /***/ (function(module, exports) { -// removed by extract-text-webpack-plugin +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(6); +var toIObject = __webpack_require__(12); +var arrayIndexOf = __webpack_require__(38)(false); +var IE_PROTO = __webpack_require__(18)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + /***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function () { + return Object.defineProperty(__webpack_require__(26)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); -/***/ 224: + +/***/ }), +/* 34 */, +/* 35 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(60), __webpack_require__(32)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { - factory(module, exports, require('../popup/popup.vue'), require('../../common/mixins/api')); - } else { - var mod = { - exports: {} - }; - factory(mod, mod.exports, global.popup, global.api); - global.actionSheet = mod.exports; - } -})(this, function (module, exports, _popup, _api) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _popup2 = _interopRequireDefault(_popup); - - var _api2 = _interopRequireDefault(_api); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - var COMPONENT_NAME = 'cube-action-sheet'; - var EVENT_SELECT = 'select'; - var EVENT_CANCEL = 'cancel'; - - exports.default = { - name: COMPONENT_NAME, - mixins: [_api2.default], - props: { - data: { - type: Array, - default: function _default() { - return []; - } - }, - active: { - type: Number, - default: -1 - }, - title: { - type: String, - default: ' ' - }, - pickerStyle: { - type: Boolean, - default: false - }, - zIndex: { - type: Number - } - }, - methods: { - noop: function noop() {}, - cancel: function cancel() { - this.hide(); - this.$emit(EVENT_CANCEL); - }, - itemClick: function itemClick(item, index) { - this.hide(); - this.$emit(EVENT_SELECT, item, index); - } - }, - components: { - CubePopup: _popup2.default - } - }; - module.exports = exports['default']; -}); - -/***/ }), - -/***/ 225: -/***/ (function(module, exports) { - -module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('transition', { - attrs: { - "name": "cube-action-sheet-fade" - } - }, [_c('cube-popup', { - directives: [{ - name: "show", - rawName: "v-show", - value: (_vm.isVisible), - expression: "isVisible" - }], - class: { - 'cube-action-sheet_picker': _vm.pickerStyle - }, - attrs: { - "type": "action-sheet", - "center": false, - "mask": true, - "z-index": _vm.zIndex - }, - on: { - "touchmove": function($event) { - $event.preventDefault(); - return _vm.noop($event) - }, - "mask-click": _vm.cancel - } - }, [_c('transition', { - attrs: { - "name": "cube-action-sheet-move" - } - }, [_c('div', { - directives: [{ - name: "show", - rawName: "v-show", - value: (_vm.isVisible), - expression: "isVisible" - }], - staticClass: "cube-action-sheet-panel cube-safe-area-pb", - on: { - "click": function($event) { - $event.stopPropagation(); - return _vm.noop($event) - } - } - }, [_c('h1', { - directives: [{ - name: "show", - rawName: "v-show", - value: (_vm.pickerStyle || _vm.title), - expression: "pickerStyle || title" - }], - staticClass: "cube-action-sheet-title border-bottom-1px" - }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _c('div', { - staticClass: "cube-action-sheet-content" - }, [_c('ul', { - staticClass: "cube-action-sheet-list" - }, _vm._l((_vm.data), function(item, index) { - return _c('li', { - staticClass: "cube-action-sheet-item border-bottom-1px", - class: [ - item.class || '', - index === _vm.active ? 'cube-action-sheet-item_active' : '' - ], - attrs: { - "data-align": item.align - }, - domProps: { - "innerHTML": _vm._s(item.content) - }, - on: { - "click": function($event) { - _vm.itemClick(item, index) - } - } - }) - }))]), _vm._v(" "), _c('div', { - staticClass: "cube-action-sheet-space" - }), _vm._v(" "), _c('div', { - staticClass: "cube-action-sheet-cancel", - on: { - "click": _vm.cancel - } - }, [_c('span', [_vm._v("取消")])])])])], 1)], 1) -},staticRenderFns: []} - -/***/ }), - -/***/ 226: -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(46)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports !== "undefined") { - factory(module, exports, require('../../common/helpers/create-api')); - } else { - var mod = { - exports: {} - }; - factory(mod, mod.exports, global.createApi); - global.api = mod.exports; - } -})(this, function (module, exports, _createApi) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = addActionSheet; - - var _createApi2 = _interopRequireDefault(_createApi); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function addActionSheet(Vue, ActionSheet) { - (0, _createApi2.default)(Vue, ActionSheet, ['select', 'cancel'], true); - } - module.exports = exports['default']; -}); - -/***/ }), - -/***/ 23: -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(19); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - -/***/ }), - -/***/ 24: -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(6); -var document = __webpack_require__(0).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), - -/***/ 25: -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(0); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -module.exports = function (key) { - return store[key] || (store[key] = {}); -}; - - -/***/ }), - -/***/ 26: -/***/ (function(module, exports) { - -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - - -/***/ }), - -/***/ 27: -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(14); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), - -/***/ 28: -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), - -/***/ 29: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(42), __esModule: true }; - -/***/ }), - -/***/ 3: -/***/ (function(module, exports) { - -var core = module.exports = { version: '2.5.5' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - - -/***/ }), - -/***/ 30: -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(6); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), - -/***/ 31: -/***/ (function(module, exports) { - -exports.f = {}.propertyIsEnumerable; - - -/***/ }), - -/***/ 32: -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports !== "undefined") { - factory(module, exports); + factory(module, exports); } else { var mod = { exports: {} @@ -860,57 +650,27 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); /***/ }), - -/***/ 33: -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__(4) && !__webpack_require__(10)(function () { - return Object.defineProperty(__webpack_require__(24)('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ 34: +/* 36 */ /***/ (function(module, exports, __webpack_require__) { -var has = __webpack_require__(5); -var toIObject = __webpack_require__(12); -var arrayIndexOf = __webpack_require__(37)(false); -var IE_PROTO = __webpack_require__(16)('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - +module.exports = { "default": __webpack_require__(43), __esModule: true }; /***/ }), - -/***/ 36: +/* 37 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), - -/***/ 37: +/* 38 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(12); var toLength = __webpack_require__(27); -var toAbsoluteIndex = __webpack_require__(38); +var toAbsoluteIndex = __webpack_require__(39); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); @@ -932,11 +692,10 @@ module.exports = function (IS_INCLUDES) { /***/ }), - -/***/ 38: +/* 39 */ /***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(14); +var toInteger = __webpack_require__(16); var max = Math.max; var min = Math.min; module.exports = function (index, length) { @@ -946,8 +705,7 @@ module.exports = function (index, length) { /***/ }), - -/***/ 39: +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -955,7 +713,7 @@ module.exports = function (index, length) { exports.__esModule = true; -var _assign = __webpack_require__(29); +var _assign = __webpack_require__(30); var _assign2 = _interopRequireDefault(_assign); @@ -976,19 +734,7 @@ exports.default = _assign2.default || function (target) { }; /***/ }), - -/***/ 4: -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(10)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), - -/***/ 40: +/* 41 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { @@ -1023,42 +769,79 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); /***/ }), +/* 42 */, +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(44); +module.exports = __webpack_require__(1).Object.keys; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(14); +var $keys = __webpack_require__(13); -/***/ 42: +__webpack_require__(45)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + + +/***/ }), +/* 45 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(43); -module.exports = __webpack_require__(3).Object.assign; +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(9); +var core = __webpack_require__(1); +var fails = __webpack_require__(5); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; /***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(47); +module.exports = __webpack_require__(1).Object.assign; -/***/ 43: + +/***/ }), +/* 47 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(11); +var $export = __webpack_require__(9); -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(44) }); +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(48) }); /***/ }), - -/***/ 44: +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__(18); -var gOPS = __webpack_require__(36); +var getKeys = __webpack_require__(13); +var gOPS = __webpack_require__(37); var pIE = __webpack_require__(31); -var toObject = __webpack_require__(17); +var toObject = __webpack_require__(14); var IObject = __webpack_require__(23); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(10)(function () { +module.exports = !$assign || __webpack_require__(5)(function () { var A = {}; var B = {}; // eslint-disable-next-line no-undef @@ -1085,13 +868,13 @@ module.exports = !$assign || __webpack_require__(10)(function () { /***/ }), - -/***/ 46: +/* 49 */, +/* 50 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(40), __webpack_require__(51)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(41), __webpack_require__(55)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -1133,37 +916,29 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); /***/ }), - -/***/ 5: -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - - -/***/ }), - -/***/ 51: +/* 51 */, +/* 52 */, +/* 53 */, +/* 54 */, +/* 55 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(52), __webpack_require__(53)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(36), __webpack_require__(56), __webpack_require__(57)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { - factory(module, exports, require('./instantiate-component'), require('./parse-render-data')); + factory(module, exports, require('babel-runtime/core-js/object/keys'), require('./instantiate-component'), require('./parse-render-data')); } else { var mod = { exports: {} }; - factory(mod, mod.exports, global.instantiateComponent, global.parseRenderData); + factory(mod, mod.exports, global.keys, global.instantiateComponent, global.parseRenderData); global.createApiComponent = mod.exports; } -})(this, function (module, exports, _instantiateComponent, _parseRenderData) { +})(this, function (module, exports, _keys, _instantiateComponent, _parseRenderData) { 'use strict'; Object.defineProperty(exports, "__esModule", { @@ -1171,6 +946,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); exports.default = createAPIComponent; + var _keys2 = _interopRequireDefault(_keys); + var _instantiateComponent2 = _interopRequireDefault(_instantiateComponent); var _parseRenderData2 = _interopRequireDefault(_parseRenderData); @@ -1244,19 +1021,79 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }, create: function create(config, renderFn, single) { var ownerInstance = this; - var component = api.open((0, _parseRenderData2.default)(config, events), renderFn, single); + var renderData = (0, _parseRenderData2.default)(config, events); + + cancelWatchProps(); + processProps(); + processEvents(); + + var component = api.open(renderData, renderFn, single); if (component.__cube__parent !== ownerInstance) { component.__cube__parent = ownerInstance; var beforeDestroy = function beforeDestroy() { + cancelWatchProps(); if (component.__cube__parent === ownerInstance) { component.remove(); } ownerInstance.$off('hook:beforeDestroy', beforeDestroy); component.__cube__parent = null; }; - ownerInstance.$on('hook:beforeDestroy', beforeDestroy); + ownerInstance.$on && ownerInstance.$on('hook:beforeDestroy', beforeDestroy); } return component; + + function processProps() { + var $props = renderData.props.$props; + if ($props) { + delete renderData.props.$props; + + var watchKeys = []; + var watchPropKeys = []; + (0, _keys2.default)($props).forEach(function (key) { + var propKey = $props[key]; + if (typeof propKey === 'string' && propKey in ownerInstance) { + renderData.props[key] = ownerInstance[propKey]; + watchKeys.push(key); + watchPropKeys.push(propKey); + } else { + renderData.props[key] = propKey; + } + }); + if (ownerInstance.$watch) { + ownerInstance.__createAPI_watcher = ownerInstance.$watch(function () { + var props = {}; + watchKeys.forEach(function (key, i) { + props[key] = ownerInstance[watchPropKeys[i]]; + }); + return props; + }, function (newProps) { + component && component.$updateProps(newProps); + }); + } + } + } + + function processEvents() { + var $events = renderData.props.$events; + if ($events) { + delete renderData.props.$events; + + (0, _keys2.default)($events).forEach(function (event) { + var eventHandler = $events[event]; + if (typeof eventHandler === 'string') { + eventHandler = ownerInstance[eventHandler]; + } + renderData.on[event] = eventHandler; + }); + } + } + + function cancelWatchProps() { + if (ownerInstance.__createAPI_watcher) { + ownerInstance.__createAPI_watcher(); + ownerInstance.__createAPI_watcher = null; + } + } } }; return api; @@ -1265,13 +1102,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); /***/ }), - -/***/ 52: +/* 56 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(29), __webpack_require__(39)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(30), __webpack_require__(40)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -1343,13 +1179,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }); /***/ }), - -/***/ 53: +/* 57 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(39), __webpack_require__(40)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(40), __webpack_require__(41)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); @@ -1400,39 +1235,382 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }; } - function parseEvents(events) { - var parsedEvents = {}; - events.forEach(function (name) { - parsedEvents[name] = (0, _string.camelize)('on-' + name); - }); - return parsedEvents; - } - module.exports = exports['default']; -}); + function parseEvents(events) { + var parsedEvents = {}; + events.forEach(function (name) { + parsedEvents[name] = (0, _string.camelize)('on-' + name); + }); + return parsedEvents; + } + module.exports = exports['default']; +}); + +/***/ }), +/* 58 */, +/* 59 */, +/* 60 */, +/* 61 */, +/* 62 */, +/* 63 */, +/* 64 */, +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +function injectStyle (ssrContext) { + __webpack_require__(66) +} +var Component = __webpack_require__(2)( + /* script */ + __webpack_require__(67), + /* template */ + __webpack_require__(68), + /* styles */ + injectStyle, + /* scopeId */ + null, + /* moduleIdentifier (server only) */ + null +) + +module.exports = Component.exports + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +// removed by extract-text-webpack-plugin + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(35)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports !== "undefined") { + factory(module, exports, require('../../common/mixins/api')); + } else { + var mod = { + exports: {} + }; + factory(mod, mod.exports, global.api); + global.popup = mod.exports; + } +})(this, function (module, exports, _api) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _api2 = _interopRequireDefault(_api); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + + var COMPONENT_NAME = 'cube-popup'; + var EVENT_MASK_CLICK = 'mask-click'; + + exports.default = { + name: COMPONENT_NAME, + mixins: [_api2.default], + props: { + type: { + type: String, + default: '' + }, + mask: { + type: Boolean, + default: true + }, + content: { + type: String, + default: '' + }, + center: { + type: Boolean, + default: true + }, + zIndex: { + type: Number, + default: 100 + } + }, + computed: { + rootClass: function rootClass() { + var cls = { + 'cube-popup_mask': this.mask + }; + if (this.type) { + cls['cube-' + this.type] = true; + } + return cls; + } + }, + methods: { + maskClick: function maskClick(e) { + this.$emit(EVENT_MASK_CLICK, e); + } + } + }; + module.exports = exports['default']; +}); + +/***/ }), +/* 68 */ +/***/ (function(module, exports) { + +module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; + return _c('div', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.isVisible), + expression: "isVisible" + }], + staticClass: "cube-popup", + class: _vm.rootClass, + style: ({ + 'z-index': _vm.zIndex + }) + }, [_c('div', { + staticClass: "cube-popup-mask", + on: { + "click": _vm.maskClick + } + }, [_vm._t("mask")], 2), _vm._v(" "), _c('div', { + staticClass: "cube-popup-container", + class: { + 'cube-popup-center': _vm.center + } + }, [(_vm.$slots.default) ? _c('div', { + staticClass: "cube-popup-content" + }, [_vm._t("default")], 2) : _c('div', { + staticClass: "cube-popup-content", + domProps: { + "innerHTML": _vm._s(_vm.content) + } + })])]) +},staticRenderFns: []} + +/***/ }), +/* 69 */, +/* 70 */, +/* 71 */, +/* 72 */, +/* 73 */, +/* 74 */, +/* 75 */, +/* 76 */, +/* 77 */, +/* 78 */, +/* 79 */, +/* 80 */, +/* 81 */, +/* 82 */, +/* 83 */, +/* 84 */, +/* 85 */, +/* 86 */, +/* 87 */, +/* 88 */, +/* 89 */, +/* 90 */, +/* 91 */, +/* 92 */, +/* 93 */, +/* 94 */, +/* 95 */, +/* 96 */, +/* 97 */, +/* 98 */, +/* 99 */, +/* 100 */, +/* 101 */, +/* 102 */, +/* 103 */, +/* 104 */, +/* 105 */, +/* 106 */, +/* 107 */, +/* 108 */, +/* 109 */, +/* 110 */, +/* 111 */, +/* 112 */, +/* 113 */, +/* 114 */, +/* 115 */, +/* 116 */, +/* 117 */, +/* 118 */, +/* 119 */, +/* 120 */, +/* 121 */, +/* 122 */, +/* 123 */, +/* 124 */, +/* 125 */, +/* 126 */, +/* 127 */, +/* 128 */, +/* 129 */, +/* 130 */, +/* 131 */, +/* 132 */, +/* 133 */, +/* 134 */, +/* 135 */, +/* 136 */, +/* 137 */, +/* 138 */, +/* 139 */, +/* 140 */, +/* 141 */, +/* 142 */, +/* 143 */, +/* 144 */, +/* 145 */, +/* 146 */, +/* 147 */, +/* 148 */, +/* 149 */, +/* 150 */, +/* 151 */, +/* 152 */, +/* 153 */, +/* 154 */, +/* 155 */, +/* 156 */, +/* 157 */, +/* 158 */, +/* 159 */, +/* 160 */, +/* 161 */, +/* 162 */, +/* 163 */, +/* 164 */, +/* 165 */, +/* 166 */, +/* 167 */, +/* 168 */, +/* 169 */, +/* 170 */, +/* 171 */, +/* 172 */, +/* 173 */, +/* 174 */, +/* 175 */, +/* 176 */, +/* 177 */, +/* 178 */, +/* 179 */, +/* 180 */, +/* 181 */, +/* 182 */, +/* 183 */, +/* 184 */, +/* 185 */, +/* 186 */, +/* 187 */, +/* 188 */, +/* 189 */, +/* 190 */, +/* 191 */, +/* 192 */, +/* 193 */, +/* 194 */, +/* 195 */, +/* 196 */, +/* 197 */, +/* 198 */, +/* 199 */, +/* 200 */, +/* 201 */, +/* 202 */, +/* 203 */, +/* 204 */, +/* 205 */, +/* 206 */, +/* 207 */, +/* 208 */, +/* 209 */, +/* 210 */, +/* 211 */, +/* 212 */, +/* 213 */, +/* 214 */, +/* 215 */, +/* 216 */, +/* 217 */, +/* 218 */, +/* 219 */, +/* 220 */, +/* 221 */, +/* 222 */, +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(224), __webpack_require__(228)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports !== "undefined") { + factory(module, exports, require('../../components/action-sheet/action-sheet.vue'), require('./api')); + } else { + var mod = { + exports: {} + }; + factory(mod, mod.exports, global.actionSheet, global.api); + global.index = mod.exports; + } +})(this, function (module, exports, _actionSheet, _api) { + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); -/***/ }), + var _actionSheet2 = _interopRequireDefault(_actionSheet); -/***/ 6: -/***/ (function(module, exports) { + var _api2 = _interopRequireDefault(_api); -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + _actionSheet2.default.install = function (Vue) { + Vue.component(_actionSheet2.default.name, _actionSheet2.default); + (0, _api2.default)(Vue, _actionSheet2.default); + }; -/***/ }), + exports.default = _actionSheet2.default; + module.exports = exports['default']; +}); -/***/ 60: +/***/ }), +/* 224 */ /***/ (function(module, exports, __webpack_require__) { function injectStyle (ssrContext) { - __webpack_require__(61) + __webpack_require__(225) } -var Component = __webpack_require__(1)( +var Component = __webpack_require__(2)( /* script */ - __webpack_require__(62), + __webpack_require__(226), /* template */ - __webpack_require__(63), + __webpack_require__(227), /* styles */ injectStyle, /* scopeId */ @@ -1445,39 +1623,39 @@ module.exports = Component.exports /***/ }), - -/***/ 61: +/* 225 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), - -/***/ 62: +/* 226 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(32)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(65), __webpack_require__(35)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== "undefined") { - factory(module, exports, require('../../common/mixins/api')); + factory(module, exports, require('../popup/popup.vue'), require('../../common/mixins/api')); } else { var mod = { exports: {} }; - factory(mod, mod.exports, global.api); - global.popup = mod.exports; + factory(mod, mod.exports, global.popup, global.api); + global.actionSheet = mod.exports; } -})(this, function (module, exports, _api) { +})(this, function (module, exports, _popup, _api) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); + var _popup2 = _interopRequireDefault(_popup); + var _api2 = _interopRequireDefault(_api); function _interopRequireDefault(obj) { @@ -1486,142 +1664,185 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }; } - var COMPONENT_NAME = 'cube-popup'; - var EVENT_MASK_CLICK = 'mask-click'; + var COMPONENT_NAME = 'cube-action-sheet'; + var EVENT_SELECT = 'select'; + var EVENT_CANCEL = 'cancel'; exports.default = { name: COMPONENT_NAME, mixins: [_api2.default], props: { - type: { - type: String, - default: '' + data: { + type: Array, + default: function _default() { + return []; + } }, - mask: { - type: Boolean, - default: true + active: { + type: Number, + default: -1 }, - content: { + title: { type: String, - default: '' + default: ' ' }, - center: { + pickerStyle: { type: Boolean, - default: true + default: false }, zIndex: { - type: Number, - default: 100 - } - }, - computed: { - typeClass: function typeClass() { - return this.type ? 'cube-' + this.type : ''; + type: Number } }, methods: { - maskClick: function maskClick(e) { - this.$emit(EVENT_MASK_CLICK, e); + noop: function noop() {}, + cancel: function cancel() { + this.hide(); + this.$emit(EVENT_CANCEL); + }, + itemClick: function itemClick(item, index) { + this.hide(); + this.$emit(EVENT_SELECT, item, index); } + }, + components: { + CubePopup: _popup2.default } }; module.exports = exports['default']; }); /***/ }), - -/***/ 63: +/* 227 */ /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; - return _c('div', { + return _c('transition', { + attrs: { + "name": "cube-action-sheet-fade" + } + }, [_c('cube-popup', { directives: [{ name: "show", rawName: "v-show", value: (_vm.isVisible), expression: "isVisible" }], - staticClass: "cube-popup", - class: _vm.typeClass, - style: ({ - 'z-index': _vm.zIndex - }) + class: { + 'cube-action-sheet_picker': _vm.pickerStyle + }, + attrs: { + "type": "action-sheet", + "center": false, + "mask": true, + "z-index": _vm.zIndex + }, + on: { + "touchmove": function($event) { + $event.preventDefault(); + return _vm.noop($event) + }, + "mask-click": _vm.cancel + } + }, [_c('transition', { + attrs: { + "name": "cube-action-sheet-move" + } }, [_c('div', { directives: [{ name: "show", rawName: "v-show", - value: (_vm.mask), - expression: "mask" + value: (_vm.isVisible), + expression: "isVisible" }], - staticClass: "cube-popup-mask", + staticClass: "cube-action-sheet-panel cube-safe-area-pb", on: { - "click": _vm.maskClick - } - }, [_vm._t("mask")], 2), _vm._v(" "), _c('div', { - staticClass: "cube-popup-container", - class: { - 'cube-popup-center': _vm.center + "click": function($event) { + $event.stopPropagation(); + return _vm.noop($event) + } } - }, [(_vm.$slots.default) ? _c('div', { - staticClass: "cube-popup-content" - }, [_vm._t("default")], 2) : _c('div', { - staticClass: "cube-popup-content", - domProps: { - "innerHTML": _vm._s(_vm.content) + }, [_c('h1', { + directives: [{ + name: "show", + rawName: "v-show", + value: (_vm.pickerStyle || _vm.title), + expression: "pickerStyle || title" + }], + staticClass: "cube-action-sheet-title border-bottom-1px" + }, [_vm._v(_vm._s(_vm.title))]), _vm._v(" "), _c('div', { + staticClass: "cube-action-sheet-content" + }, [_c('ul', { + staticClass: "cube-action-sheet-list" + }, _vm._l((_vm.data), function(item, index) { + return _c('li', { + staticClass: "cube-action-sheet-item border-bottom-1px", + class: [ + item.class || '', + index === _vm.active ? 'cube-action-sheet-item_active' : '' + ], + attrs: { + "data-align": item.align + }, + domProps: { + "innerHTML": _vm._s(item.content) + }, + on: { + "click": function($event) { + _vm.itemClick(item, index) + } + } + }) + }))]), _vm._v(" "), _c('div', { + staticClass: "cube-action-sheet-space" + }), _vm._v(" "), _c('div', { + staticClass: "cube-action-sheet-cancel", + on: { + "click": _vm.cancel } - })])]) + }, [_c('span', [_vm._v("取消")])])])])], 1)], 1) },staticRenderFns: []} /***/ }), - -/***/ 7: -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(8); -var createDesc = __webpack_require__(15); -module.exports = __webpack_require__(4) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), - -/***/ 8: +/* 228 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(9); -var IE8_DOM_DEFINE = __webpack_require__(33); -var toPrimitive = __webpack_require__(30); -var dP = Object.defineProperty; - -exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(50)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports !== "undefined") { + factory(module, exports, require('../../common/helpers/create-api')); + } else { + var mod = { + exports: {} + }; + factory(mod, mod.exports, global.createApi); + global.api = mod.exports; + } +})(this, function (module, exports, _createApi) { + 'use strict'; -/***/ }), + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = addActionSheet; -/***/ 9: -/***/ (function(module, exports, __webpack_require__) { + var _createApi2 = _interopRequireDefault(_createApi); -var isObject = __webpack_require__(6); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + function addActionSheet(Vue, ActionSheet) { + (0, _createApi2.default)(Vue, ActionSheet, ['select', 'cancel'], true); + } + module.exports = exports['default']; +}); /***/ }) - -/******/ }); \ No newline at end of file +/******/ ]); \ No newline at end of file diff --git a/lib/action-sheet/style.css b/lib/action-sheet/style.css index 82015805e..9be62ab52 100644 --- a/lib/action-sheet/style.css +++ b/lib/action-sheet/style.css @@ -1 +1 @@ -.cube-action-sheet-fade-enter,.cube-action-sheet-fade-leave-active{opacity:0}.cube-action-sheet-fade-enter-active,.cube-action-sheet-fade-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-panel{text-align:center;font-size:14px;background-color:#fff}.cube-action-sheet-move-enter,.cube-action-sheet-move-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.cube-action-sheet-move-enter-active,.cube-action-sheet-move-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-cancel{background-color:#fff}.cube-action-sheet-cancel span,.cube-action-sheet-item,.cube-action-sheet-title{display:block;padding:17px 16px;margin:0;text-align:center;overflow:hidden;white-space:nowrap;font-size:16px;font-weight:400;line-height:1;color:#666;background-color:#fff}.cube-action-sheet-cancel span:active,.cube-action-sheet-item:active{background-color:rgba(0,0,0,.04)}.cube-action-sheet-title{padding-top:16px;padding-bottom:16px;color:#333;font-size:18px}.cube-action-sheet-content{overflow:hidden;background:#fff}.cube-action-sheet-list{list-style:none}.cube-action-sheet-item{list-style:none;-webkit-user-select:none;user-select:none}.cube-action-sheet-item:last-of-type:after,.cube-action-sheet-item:last-of-type:before{display:none}.cube-action-sheet-item[data-align=left]{text-align:left}.cube-action-sheet-item[data-align=right]{text-align:right}.cube-action-sheet-space{height:6px;background-color:rgba(37,38,45,.4)}.cube-action-sheet-item_active{color:#fc9153}.cube-action-sheet_picker .cube-action-sheet-space{height:0}.cube-action-sheet_picker .cube-action-sheet-title{height:1em;padding-top:21px;padding-bottom:21px}.cube-action-sheet_picker .cube-action-sheet-cancel{position:absolute;top:0;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span{padding-top:23px;padding-bottom:23px;color:#999;font-size:14px;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span:active{color:#ccc;background-color:transparent}.cube-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:100}.cube-popup-container,.cube-popup-mask{position:absolute;width:100%;height:100%}.cube-popup-mask{overflow:hidden;background-color:#25262d;opacity:.4}.cube-popup-mask:before{content:".";display:block;width:1px;height:1px;background-color:rgba(0,0,0,.1);margin-left:-10px}.cube-popup-container{-webkit-transform:translate(100%,100%);transform:translate(100%,100%)}.cube-popup-content{position:absolute;top:0;left:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translate(-100%,-100%);transform:translate(-100%,-100%)}.cube-popup-center .cube-popup-content{position:absolute;top:-50%;left:-50%;width:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)} \ No newline at end of file +.cube-action-sheet-fade-enter,.cube-action-sheet-fade-leave-active{opacity:0}.cube-action-sheet-fade-enter-active,.cube-action-sheet-fade-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-panel{text-align:center;font-size:14px;background-color:#fff}.cube-action-sheet-move-enter,.cube-action-sheet-move-leave-active{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.cube-action-sheet-move-enter-active,.cube-action-sheet-move-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-action-sheet-cancel{background-color:#fff}.cube-action-sheet-cancel span,.cube-action-sheet-item,.cube-action-sheet-title{display:block;padding:17px 16px;margin:0;text-align:center;overflow:hidden;white-space:nowrap;font-size:16px;font-weight:400;line-height:1;color:#666;background-color:#fff}.cube-action-sheet-cancel span:active,.cube-action-sheet-item:active{background-color:rgba(0,0,0,.04)}.cube-action-sheet-title{padding-top:16px;padding-bottom:16px;color:#333;font-size:18px}.cube-action-sheet-content{overflow:hidden;background:#fff}.cube-action-sheet-list{list-style:none}.cube-action-sheet-item{list-style:none;-webkit-user-select:none;user-select:none}.cube-action-sheet-item:last-of-type:after,.cube-action-sheet-item:last-of-type:before{display:none}.cube-action-sheet-item[data-align=left]{text-align:left}.cube-action-sheet-item[data-align=right]{text-align:right}.cube-action-sheet-space{height:6px;background-color:rgba(37,38,45,.4)}.cube-action-sheet-item_active{color:#fc9153}.cube-action-sheet_picker .cube-action-sheet-space{height:0}.cube-action-sheet_picker .cube-action-sheet-title{height:1em;padding-top:21px;padding-bottom:21px}.cube-action-sheet_picker .cube-action-sheet-cancel{position:absolute;top:0;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span{padding-top:23px;padding-bottom:23px;color:#999;font-size:14px;background-color:transparent}.cube-action-sheet_picker .cube-action-sheet-cancel span:active{color:#ccc;background-color:transparent}.cube-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:100;pointer-events:none}.cube-popup_mask{pointer-events:auto}.cube-popup_mask .cube-popup-mask{display:block}.cube-popup-container,.cube-popup-mask{position:absolute;width:100%;height:100%}.cube-popup-mask{display:none;overflow:hidden;background-color:#25262d;opacity:.4;pointer-events:auto}.cube-popup-mask:before{content:".";display:block;width:1px;height:1px;background-color:rgba(0,0,0,.1);margin-left:-10px}.cube-popup-container{-webkit-transform:translate(100%,100%);transform:translate(100%,100%)}.cube-popup-content{position:absolute;top:0;left:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translate(-100%,-100%);transform:translate(-100%,-100%);pointer-events:auto}.cube-popup-center .cube-popup-content{position:absolute;top:-50%;left:-50%;width:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)} \ No newline at end of file diff --git a/lib/better-scroll/better-scroll.min.js b/lib/better-scroll/better-scroll.min.js index 0dc39a54f..1823b8d00 100644 --- a/lib/better-scroll/better-scroll.min.js +++ b/lib/better-scroll/better-scroll.min.js @@ -1,6 +1,6 @@ -module.exports=function(t){function i(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},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,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="./",i(i.s=227)}({227:function(t,i,e){var s,o,n;!function(r,h){o=[t,i,e(54)],s=h,void 0!==(n="function"==typeof s?s.apply(i,o):s)&&(t.exports=n)}(0,function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){return t&&t.__esModule?t:{default:t}}(e);i.default=s.default,t.exports=i.default})},54:function(t,i,e){"use strict";function s(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function o(t){for(var i=arguments.length,e=Array(i>1?i-1:0),s=1;s0&&(g=o?Math.min(o/4,o/f*h):0,d=c),{destination:Math.round(g),duration:d}}function y(){}function w(t){console.error("[BScroll warn]: "+t)}function x(t,i){if(!t)throw new Error("[BScroll] "+i)}function T(t){var i=document.createElement("div"),e=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;pointerEvents:none",e.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",e.className="bscroll-indicator","horizontal"===t?(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",e.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",e.style.width="100%",i.className="bscroll-vertical-scrollbar"),i.style.cssText+=";overflow:hidden",i.appendChild(e),i}function b(t,i){this.wrapper=i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=i.direction,i.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1,this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.x=0,this.y=0,i.interactive&&this._addDOMEvents()}function _(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||w("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||w("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(t,i)}Object.defineProperty(i,"__esModule",{value:!0});/*! - * better-normal-scroll v1.9.1 +module.exports=function(t){function i(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},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,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="./",i(i.s=229)}({229:function(t,i,e){var s,o,n;!function(r,h){o=[t,i,e(58)],s=h,void 0!==(n="function"==typeof s?s.apply(i,o):s)&&(t.exports=n)}(0,function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var s=function(t){return t&&t.__esModule?t:{default:t}}(e);i.default=s.default,t.exports=i.default})},58:function(t,i,e){"use strict";function s(){return window.performance&&window.performance.now?window.performance.now()+window.performance.timing.navigationStart:+new Date}function o(t){for(var i=arguments.length,e=Array(i>1?i-1:0),s=1;s0&&(g=o?Math.min(o/4,o/f*h):0,d=c),{destination:Math.round(g),duration:d}}function y(){}function w(t){console.error("[BScroll warn]: "+t)}function x(t,i){if(!t)throw new Error("[BScroll] "+i)}function T(t){var i=document.createElement("div"),e=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;pointerEvents:none",e.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",e.className="bscroll-indicator","horizontal"===t?(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",e.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",e.style.width="100%",i.className="bscroll-vertical-scrollbar"),i.style.cssText+=";overflow:hidden",i.appendChild(e),i}function b(t,i){this.wrapper=i.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=t,this.direction=i.direction,i.fade?(this.visible=0,this.wrapperStyle.opacity="0"):this.visible=1,this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.x=0,this.y=0,i.interactive&&this._addDOMEvents()}function _(t,i){this.wrapper="string"==typeof t?document.querySelector(t):t,this.wrapper||w("Can not resolve the wrapper DOM."),this.scroller=this.wrapper.children[0],this.scroller||w("The wrapper need at least one child element to be scroller."),this.scrollerStyle=this.scroller.style,this._init(t,i)}Object.defineProperty(i,"__esModule",{value:!0});/*! + * better-normal-scroll v1.10.0 * (c) 2016-2018 ustbhuangyi * Released under the MIT License. */ -var P=function(){function t(t,i){var e=[],s=!0,o=!1,n=void 0;try{for(var r,h=t[Symbol.iterator]();!(s=(r=h.next()).done)&&(e.push(r.value),!i||e.length!==i);s=!0);}catch(t){o=!0,n=t}finally{try{!s&&h.return&&h.return()}finally{if(o)throw n}}return e}return function(i,e){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i0,E=M&&document.createElement("div").style,k=function(){if(!M)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==E[t[i]])return i;return!1}(),W=r("transform"),O=M&&r("perspective")in E,H=M&&("ontouchstart"in window||Y),L=!1!==W,z=M&&r("transition")in E,C={transform:W,transitionTimingFunction:r("transitionTimingFunction"),transitionDuration:r("transitionDuration"),transitionProperty:r("transitionProperty"),transitionDelay:r("transitionDelay"),transformOrigin:r("transformOrigin"),transitionEnd:r("transitionEnd")},A=1,I={touchstart:A,touchmove:A,touchend:A,mousedown:2,mousemove:2,mouseup:2},F={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:800,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.001,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:H,disableTouch:!H,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1},R={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},U=function(){return M?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:y}(),B=function(){return M?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:y}(),N=1,V=-1,j=1,q=-1,Z=1,G=3;b.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t)}},b.prototype.refresh=function(){this.transitionTime(),this._calculate(),this.updatePosition()},b.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var s=t?250:500;t=t?"1":"0",this.wrapperStyle[C.transitionDuration]=s+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){e.wrapperStyle.opacity=t,e.visible=+t},0)}},b.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var i=Math.max(this.indicatorHeight+3*t,8);this.indicatorStyle.height=i+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var e=Math.max(this.indicatorHeight-3*(t-this.maxPosY),8);this.indicatorStyle.height=e+"px",t=this.maxPosY+this.indicatorHeight-e}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[C.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var s=Math.round(this.sizeRatioX*this.scroller.x);if(s<0){this.transitionTime(500);var o=Math.max(this.indicatorWidth+3*s,8);this.indicatorStyle.width=o+"px",s=0}else if(s>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(s-this.maxPosX),8);this.indicatorStyle.width=n+"px",s=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=s,this.scroller.options.useTransform?this.indicatorStyle[C.transform]="translateX("+s+"px)"+this.scroller.translateZ:this.indicatorStyle.left=s+"px"}},b.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[C.transitionDuration]=t+"ms"},b.prototype.transitionTimingFunction=function(t){this.indicatorStyle[C.transitionTimingFunction]=t},b.prototype.destroy=function(){this._removeDOMEvents(),this.wrapper.parentNode.removeChild(this.wrapper)},b.prototype._start=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=s(),this._handleMoveEvents(h),this.scroller.trigger("beforeScrollStart")},b.prototype._move=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.moved||this.scroller.trigger("scrollStart"),this.moved=!0;var e=i.pageX-this.lastPointX;this.lastPointX=i.pageX;var s=i.pageY-this.lastPointY;this.lastPointY=i.pageY;var o=this.x+e,n=this.y+s;this._pos(o,n)},b.prototype._end=function(t){if(this.initiated){this.initiated=!1,t.preventDefault(),t.stopPropagation(),this._handleMoveEvents(a);var i=this.scroller.options.snap;if(i){var e=i.speed,s=i.easing,o=void 0===s?R.bounce:s,n=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),r=e||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-n.x),1e3),Math.min(Math.abs(this.scroller.y-n.y),1e3)),300);this.scroller.x===n.x&&this.scroller.y===n.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=n,this.scroller.scrollTo(n.x,n.y,r,o))}this.moved&&this.scroller.trigger("scrollEnd",{x:this.scroller.x,y:this.scroller.y})}},b.prototype._pos=function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=Math.round(t/this.sizeRatioX),i=Math.round(i/this.sizeRatioY),this.scroller.scrollTo(t,i),this.scroller.trigger("scroll",{x:this.scroller.x,y:this.scroller.y})},b.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var i=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(i*i/(this.scroller.scrollerWidth||i||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=i-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},b.prototype._addDOMEvents=function(){var t=h;this._handleDOMEvents(t)},b.prototype._removeDOMEvents=function(){var t=a;this._handleDOMEvents(t),this._handleMoveEvents(t)},b.prototype._handleMoveEvents=function(t){this.scroller.options.disableTouch||t(window,"touchmove",this),this.scroller.options.disableMouse||t(window,"mousemove",this)},b.prototype._handleDOMEvents=function(t){this.scroller.options.disableTouch||(t(this.indicator,"touchstart",this),t(window,"touchend",this)),this.scroller.options.disableMouse||(t(this.indicator,"mousedown",this),t(window,"mouseup",this))},function(t){t.prototype._init=function(t,i){this._handleOptions(i),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._addDOMEvents(),this._initExtFeatures(),this._watchTransition(),this.options.observeDOM&&this._initDOMObserver(),this.options.autoBlur&&this._handleAutoBlur(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype._handleOptions=function(t){this.options=o({},F,t),this.translateZ=this.options.HWCompositing&&O?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&z,this.options.useTransform=this.options.useTransform&&L,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,!0===this.options.tap&&(this.options.tap="tap")},t.prototype._addDOMEvents=function(){var t=h;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=a;this._handleDOMEvents(t)},t.prototype._handleDOMEvents=function(t){var i=this.options.bindToWrapper?this.wrapper:window;t(window,"orientationchange",this),t(window,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),H&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,C.transitionEnd,this)},t.prototype._initExtFeatures=function(){this.options.snap&&this._initSnap(),this.options.scrollbar&&this._initScrollbar(),this.options.pullUpLoad&&this._initPullUp(),this.options.pullDownRefresh&&this._initPullDown(),this.options.wheel&&this._initWheel(),this.options.mouseWheel&&this._initMouseWheel()},t.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var t=this,i=!1;Object.defineProperty(this,"isInTransition",{get:function(){return i},set:function(e){i=e;for(var s=t.scroller.children.length?t.scroller.children:[t.scroller],o=i&&!t.pulling?"none":"auto",n=0;n0||this.x0||this.ythis.options.momentumLimitTime&&rr+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);o=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);e=0}e=this.hasHorizontalScroll?e:0,o=this.hasVerticalScroll?o:0,this.movingDirectionX=e>0?q:e<0?j:0,this.movingDirectionY=o>0?V:o<0?N:0;var a=this.x+e,l=this.y+o;(a>0||a0?0:this.maxScrollX),(l>0||l0?0:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(a,l),h-this.startTime>this.options.momentumLimitTime&&(this.startTime=h,this.startX=this.x,this.startY=this.y,this.options.probeType===Z&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>Z&&this.trigger("scroll",{x:this.x,y:this.y});var c=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,p=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,u=this.pointX-c,d=this.pointY-p;(u>document.documentElement.clientWidth-this.options.momentumLimitDistance||udocument.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},t.prototype._end=function(t){if(this.enabled&&!this.destroyed&&I[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!p(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.trigger("touchEnd",{x:this.x,y:this.y}),this.isInTransition=!1;var i=Math.round(this.x),e=Math.round(this.y),o=i-this.absStartX,n=e-this.absStartY;if(this.directionX=o>0?q:o<0?j:0,this.directionY=n>0?V:n<0?N:0,!this.options.pullDownRefresh||!this._checkPullDown()){if(this._checkClick(t))return void this.trigger("scrollCancel");if(!this.resetPosition(this.options.bounceTime,R.bounce)){this.scrollTo(i,e),this.endTime=s();var r=this.endTime-this.startTime,h=Math.abs(i-this.startX),a=Math.abs(e-this.startY);if(this._events.flick&&rthis.options.momentumLimitDistance||h>this.options.momentumLimitDistance)){var c=this.hasHorizontalScroll?v(this.x,this.startX,r,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options):{destination:i,duration:0},u=this.hasVerticalScroll?v(this.y,this.startY,r,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options):{destination:e,duration:0};i=c.destination,e=u.destination,l=Math.max(c.duration,u.duration),this.isInTransition=!0}else this.options.wheel&&(e=Math.round(e/this.itemHeight)*this.itemHeight,l=this.options.wheel.adjustTime||400);var d=R.swipe;if(this.options.snap){var f=this._nearestSnap(i,e);this.currentPage=f,l=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-f.x),1e3),Math.min(Math.abs(e-f.y),1e3)),300),i=f.x,e=f.y,this.directionX=0,this.directionY=0,d=this.options.snap.easing||R.bounce}if(i!==this.x||e!==this.y)return(i>0||i0||e0&&void 0!==arguments[0]?arguments[0]:"transform";this.scrollerStyle[C.transitionProperty]=t},t.prototype._transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[C.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i=c)return r.isAnimating=!1,r._translate(t,i),void(r.pulling||r.resetPosition(r.options.bounceTime)||r.trigger("scrollEnd",{x:r.x,y:r.y}));p=(p-l)/e;var u=o(p),d=(t-h)*u+h,f=(i-a)*u+a;r._translate(d,f),r.isAnimating&&(r.animateTimer=U(n)),r.options.probeType===G&&r.trigger("scroll",{x:r.x,y:r.y})}var r=this,h=this.x,a=this.y,l=s(),c=l+e;this.isAnimating=!0,B(this.animateTimer),n()},t.prototype.scrollBy=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},t.prototype.scrollTo=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R.bounce;this.isInTransition=this.options.useTransition&&e>0&&(t!==this.x||i!==this.y),!e||this.options.useTransition?(this._transitionProperty(),this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&this.options.probeType===G&&this._startProbe(),this.options.wheel&&(i>0?this.selectedIndex=0:i0?0:n.left0?0:n.top0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R.bounce,e=this.x,s=Math.round(e);!this.hasHorizontalScroll||s>0?e=0:s0?o=0:n2&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},t.prototype.once=function(t,i){function e(){this.off(t,e),i.apply(s,arguments)}var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;e.fn=i,this.on(t,e)},t.prototype.off=function(t,i){var e=this._events[t];if(e)for(var s=e.length;s--;)(e[s][0]===i||e[s][0]&&e[s][0].fn===i)&&(e[s][0]=void 0)},t.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(S(i)),o=0;o1?(f(e[e.length-1].cloneNode(!0),this.scroller),this.scroller.appendChild(e[1].cloneNode(!0))):i.loop=!1}var s=i.el;"string"==typeof s&&(s=this.scroller.querySelectorAll(s)),this.on("refresh",function(){if(t.pages=[],t.wrapperWidth&&t.wrapperHeight&&t.scrollerWidth&&t.scrollerHeight){var e=i.stepX||t.wrapperWidth,o=i.stepY||t.wrapperHeight,n=0,r=void 0,h=void 0,a=void 0,l=0,p=void 0,u=0,d=void 0,f=void 0;if(s)for(p=s.length,d=-1;lt.maxScrollX&&u++;else for(h=Math.round(e/2),a=Math.round(o/2);n>-t.scrollerWidth;){for(t.pages[l]=[],p=0,r=0;r>-t.scrollerHeight;)t.pages[l][p]={x:Math.max(n,t.maxScrollX),y:Math.max(r,t.maxScrollY),width:e,height:o,cx:n-h,cy:r-a},r-=o,p++;n-=e,l++}t._checkSnapLoop();var g=i._loopX?1:0,m=i._loopY?1:0;t._goToPage(t.currentPage.pageX||g,t.currentPage.pageY||m,0);var v=i.threshold;v%1==0?(t.snapThresholdX=v,t.snapThresholdY=v):(t.snapThresholdX=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].width*v),t.snapThresholdY=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].height*v))}}),this.on("scrollEnd",function(){i.loop&&(i._loopX?(0===t.currentPage.pageX&&t._goToPage(t.pages.length-2,t.currentPage.pageY,0),t.currentPage.pageX===t.pages.length-1&&t._goToPage(1,t.currentPage.pageY,0)):(0===t.currentPage.pageY&&t._goToPage(t.currentPage.pageX,t.pages[0].length-2,0),t.currentPage.pageY===t.pages[0].length-1&&t._goToPage(t.currentPage.pageX,1,0)))}),!1!==i.listenFlick&&this.on("flick",function(){var e=i.speed||Math.max(Math.max(Math.min(Math.abs(t.x-t.startX),1e3),Math.min(Math.abs(t.y-t.startY),1e3)),300);t._goToPage(t.currentPage.pageX+t.directionX,t.currentPage.pageY+t.directionY,e)}),this.on("destroy",function(){if(i.loop){var e=t.scroller.children;e.length>2&&(m(t.scroller,e[e.length-1]),m(t.scroller,e[0]))}})},t.prototype._checkSnapLoop=function(){var t=this.options.snap;t.loop&&this.pages&&(this.pages.length>1&&(t._loopX=!0),this.pages[0]&&this.pages[0].length>1&&(t._loopY=!0),t._loopX&&t._loopY&&w("Loop does not support two direction at the same time."))},t.prototype._nearestSnap=function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0;if(Math.abs(t-this.absStartX)<=this.snapThresholdX&&Math.abs(i-this.absStartY)<=this.snapThresholdY)return this.currentPage;t>0?t=0:t0?i=0:i=this.pages[e][0].cx){t=this.pages[e][0].x;break}s=this.pages[e].length;for(var o=0;o=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e===this.currentPage.pageX&&(e+=this.directionX,e<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o===this.currentPage.pageY&&(o+=this.directionY,o<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},t.prototype._goToPage=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments[2],s=arguments[3],o=this.options.snap;if(o&&this.pages&&(s=s||o.easing||R.bounce,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),this.pages[t])){i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?o.speed||Math.max(Math.max(Math.min(Math.abs(n-this.x),1e3),Math.min(Math.abs(r-this.y),1e3)),300):e,this.currentPage={x:n,y:r,pageX:t,pageY:i},this.scrollTo(n,r,e,s)}},t.prototype.goToPage=function(t,i,e,s){var o=this.options.snap;if(o){if(o.loop){var n=void 0;o._loopX?(n=this.pages.length-2,t>=n?t=n-1:t<0&&(t=0),t+=1):(n=this.pages[0].length-2,i>=n?i=n-1:i<0&&(i=0),i+=1)}this._goToPage(t,i,e,s)}},t.prototype.next=function(t,i){if(this.options.snap){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this._goToPage(e,s,t,i)}},t.prototype.prev=function(t,i){if(this.options.snap){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,e<0&&this.hasVerticalScroll&&(e=0,s--),this._goToPage(e,s,t,i)}},t.prototype.getCurrentPage=function(){var t=this.options.snap;return t?t.loop?t._loopX?o({},this.currentPage,{pageX:this.currentPage.pageX-1}):o({},this.currentPage,{pageY:this.currentPage.pageY-1}):this.currentPage:null}}(_),function(t){t.prototype.wheelTo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.options.wheel&&(this.y=-t*this.itemHeight,this.scrollTo(0,this.y))},t.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},t.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),void 0===t.selectedIndex&&(t.selectedIndex=0,w("wheel option selectedIndex is required!"))}}(_),function(t){t.prototype._initScrollbar=function(){var t=this,i=this.options.scrollbar,e=i.fade,s=void 0===e||e,o=i.interactive,n=void 0!==o&&o;this.indicators=[];var r=void 0;this.options.scrollX&&(r={el:T("horizontal"),direction:"horizontal",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new b(this,r))),this.options.scrollY&&(r={el:T("vertical"),direction:"vertical",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new b(this,r))),this.on("refresh",function(){for(var i=0;i0&&void 0!==arguments[0])||arguments[0];this.options.pullDownRefresh=t,this._initPullDown()},t.prototype.closePullDown=function(){this.options.pullDownRefresh=!1}}(_),function(t){t.prototype._initPullUp=function(){this.options.probeType=G,this.pullupWatching=!1,this._watchPullUp()},t.prototype._watchPullUp=function(){this.pullupWatching||(this.pullupWatching=!0,this.on("scroll",this._checkToEnd))},t.prototype._checkToEnd=function(t){var i=this,e=this.options.pullUpLoad.threshold,s=void 0===e?0:e;this.movingDirectionY===N&&t.y<=this.maxScrollY+s&&(this.once("scrollEnd",function(){i.pullupWatching=!1}),this.trigger("pullingUp"),this.off("scroll",this._checkToEnd))},t.prototype.finishPullUp=function(){var t=this;this.pullupWatching?this.once("scrollEnd",function(){t._watchPullUp()}):this._watchPullUp()},t.prototype.openPullUp=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.pullUpLoad=t,this._initPullUp()},t.prototype.closePullUp=function(){this.options.pullUpLoad=!1,this.pullupWatching&&(this.pullupWatching=!1,this.off("scroll",this._checkToEnd))}}(_),function(t){t.prototype._initMouseWheel=function(){var t=this;this._handleMouseWheelEvent(h),this.on("destroy",function(){clearTimeout(t.mouseWheelTimer),t._handleMouseWheelEvent(a)}),this.firstWheelOpreation=!0},t.prototype._handleMouseWheelEvent=function(t){t(this.wrapper,"wheel",this),t(this.wrapper,"mousewheel",this),t(this.wrapper,"DOMMouseScroll",this)},t.prototype._onMouseWheel=function(t){var i=this;if(this.enabled){t.preventDefault(),this.firstWheelOpreation&&this.trigger("scrollStart"),this.firstWheelOpreation=!1,clearTimeout(this.mouseWheelTimer),this.mouseWheelTimer=setTimeout(function(){i.options.snap||i.trigger("scrollEnd",{x:i.x,y:i.y}),i.firstWheelOpreation=!0},400);var e=this.options.mouseWheel,s=e.speed,o=void 0===s?20:s,n=e.invert,r=void 0!==n&&n,h=void 0,a=void 0;switch(!0){case"deltaX"in t:1===t.deltaMode?(h=-t.deltaX*o,a=-t.deltaY*o):(h=-t.deltaX,a=-t.deltaY);break;case"wheelDeltaX"in t:h=t.wheelDeltaX/120*o,a=t.wheelDeltaY/120*o;break;case"wheelDelta"in t:h=a=t.wheelDelta/120*o;break;case"detail"in t:h=a=-t.detail/3*o;break;default:return}var l=r?-1:1;h*=l,a*=l,this.hasVerticalScroll||(h=a,a=0);var c=void 0,p=void 0;if(this.options.snap)return c=this.currentPage.pageX,p=this.currentPage.pageY,h>0?c--:h<0&&c++,a>0?p--:a<0&&p++,void this._goToPage(c,p);c=this.x+Math.round(this.hasHorizontalScroll?h:0),p=this.y+Math.round(this.hasVerticalScroll?a:0),this.directionX=h>0?-1:h<0?1:0,this.directionY=a>0?-1:a<0?1:0,c>0?c=0:c0?p=0:p0,E=M&&document.createElement("div").style,k=function(){if(!M)return!1;var t={webkit:"webkitTransform",Moz:"MozTransform",O:"OTransform",ms:"msTransform",standard:"transform"};for(var i in t)if(void 0!==E[t[i]])return i;return!1}(),W=r("transform"),O=M&&r("perspective")in E,H=M&&("ontouchstart"in window||Y),L=!1!==W,z=M&&r("transition")in E,C={transform:W,transitionTimingFunction:r("transitionTimingFunction"),transitionDuration:r("transitionDuration"),transitionProperty:r("transitionProperty"),transitionDelay:r("transitionDelay"),transformOrigin:r("transformOrigin"),transitionEnd:r("transitionEnd")},A=1,I={touchstart:A,touchmove:A,touchend:A,mousedown:2,mousemove:2,mouseup:2},F={startX:0,startY:0,scrollX:!1,scrollY:!0,freeScroll:!1,directionLockThreshold:5,eventPassthrough:"",click:!1,tap:!1,bounce:!0,bounceTime:800,momentum:!0,momentumLimitTime:300,momentumLimitDistance:15,swipeTime:2500,swipeBounceTime:500,deceleration:.001,flickLimitTime:200,flickLimitDistance:100,resizePolling:60,probeType:0,preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:!1,disableMouse:H,disableTouch:!H,observeDOM:!0,autoBlur:!0,wheel:!1,snap:!1,scrollbar:!1,pullDownRefresh:!1,pullUpLoad:!1,mouseWheel:!1,stopPropagation:!1},R={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},U=function(){return M?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,(t.interval||100/60)/2)}:y}(),B=function(){return M?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:y}(),N=1,V=-1,j=1,q=-1,Z=1,G=3;b.prototype.handleEvent=function(t){switch(t.type){case"touchstart":case"mousedown":this._start(t);break;case"touchmove":case"mousemove":this._move(t);break;case"touchend":case"mouseup":case"touchcancel":case"mousecancel":this._end(t)}},b.prototype.refresh=function(){this.transitionTime(),this._calculate(),this.updatePosition()},b.prototype.fade=function(t,i){var e=this;if(!i||this.visible){var s=t?250:500;t=t?"1":"0",this.wrapperStyle[C.transitionDuration]=s+"ms",clearTimeout(this.fadeTimeout),this.fadeTimeout=setTimeout(function(){e.wrapperStyle.opacity=t,e.visible=+t},0)}},b.prototype.updatePosition=function(){if("vertical"===this.direction){var t=Math.round(this.sizeRatioY*this.scroller.y);if(t<0){this.transitionTime(500);var i=Math.max(this.indicatorHeight+3*t,8);this.indicatorStyle.height=i+"px",t=0}else if(t>this.maxPosY){this.transitionTime(500);var e=Math.max(this.indicatorHeight-3*(t-this.maxPosY),8);this.indicatorStyle.height=e+"px",t=this.maxPosY+this.indicatorHeight-e}else this.indicatorStyle.height=this.indicatorHeight+"px";this.y=t,this.scroller.options.useTransform?this.indicatorStyle[C.transform]="translateY("+t+"px)"+this.scroller.translateZ:this.indicatorStyle.top=t+"px"}else{var s=Math.round(this.sizeRatioX*this.scroller.x);if(s<0){this.transitionTime(500);var o=Math.max(this.indicatorWidth+3*s,8);this.indicatorStyle.width=o+"px",s=0}else if(s>this.maxPosX){this.transitionTime(500);var n=Math.max(this.indicatorWidth-3*(s-this.maxPosX),8);this.indicatorStyle.width=n+"px",s=this.maxPosX+this.indicatorWidth-n}else this.indicatorStyle.width=this.indicatorWidth+"px";this.x=s,this.scroller.options.useTransform?this.indicatorStyle[C.transform]="translateX("+s+"px)"+this.scroller.translateZ:this.indicatorStyle.left=s+"px"}},b.prototype.transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.indicatorStyle[C.transitionDuration]=t+"ms"},b.prototype.transitionTimingFunction=function(t){this.indicatorStyle[C.transitionTimingFunction]=t},b.prototype.destroy=function(){this._removeDOMEvents(),this.wrapper.parentNode.removeChild(this.wrapper)},b.prototype._start=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=i.pageX,this.lastPointY=i.pageY,this.startTime=s(),this._handleMoveEvents(h),this.scroller.trigger("beforeScrollStart")},b.prototype._move=function(t){var i=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.moved||this.scroller.trigger("scrollStart"),this.moved=!0;var e=i.pageX-this.lastPointX;this.lastPointX=i.pageX;var s=i.pageY-this.lastPointY;this.lastPointY=i.pageY;var o=this.x+e,n=this.y+s;this._pos(o,n)},b.prototype._end=function(t){if(this.initiated){this.initiated=!1,t.preventDefault(),t.stopPropagation(),this._handleMoveEvents(a);var i=this.scroller.options.snap;if(i){var e=i.speed,s=i.easing,o=void 0===s?R.bounce:s,n=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),r=e||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-n.x),1e3),Math.min(Math.abs(this.scroller.y-n.y),1e3)),300);this.scroller.x===n.x&&this.scroller.y===n.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=n,this.scroller.scrollTo(n.x,n.y,r,o))}this.moved&&this.scroller.trigger("scrollEnd",{x:this.scroller.x,y:this.scroller.y})}},b.prototype._pos=function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=Math.round(t/this.sizeRatioX),i=Math.round(i/this.sizeRatioY),this.scroller.scrollTo(t,i),this.scroller.trigger("scroll",{x:this.scroller.x,y:this.scroller.y})},b.prototype._calculate=function(){if("vertical"===this.direction){var t=this.wrapper.clientHeight;this.indicatorHeight=Math.max(Math.round(t*t/(this.scroller.scrollerHeight||t||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px",this.maxPosY=t-this.indicatorHeight,this.sizeRatioY=this.maxPosY/this.scroller.maxScrollY}else{var i=this.wrapper.clientWidth;this.indicatorWidth=Math.max(Math.round(i*i/(this.scroller.scrollerWidth||i||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px",this.maxPosX=i-this.indicatorWidth,this.sizeRatioX=this.maxPosX/this.scroller.maxScrollX}},b.prototype._addDOMEvents=function(){var t=h;this._handleDOMEvents(t)},b.prototype._removeDOMEvents=function(){var t=a;this._handleDOMEvents(t),this._handleMoveEvents(t)},b.prototype._handleMoveEvents=function(t){this.scroller.options.disableTouch||t(window,"touchmove",this),this.scroller.options.disableMouse||t(window,"mousemove",this)},b.prototype._handleDOMEvents=function(t){this.scroller.options.disableTouch||(t(this.indicator,"touchstart",this),t(window,"touchend",this)),this.scroller.options.disableMouse||(t(this.indicator,"mousedown",this),t(window,"mouseup",this))},function(t){t.prototype._init=function(t,i){this._handleOptions(i),this._events={},this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._addDOMEvents(),this._initExtFeatures(),this._watchTransition(),this.options.observeDOM&&this._initDOMObserver(),this.options.autoBlur&&this._handleAutoBlur(),this.refresh(),this.options.snap||this.scrollTo(this.options.startX,this.options.startY),this.enable()},t.prototype._handleOptions=function(t){this.options=o({},F,t),this.translateZ=this.options.HWCompositing&&O?" translateZ(0)":"",this.options.useTransition=this.options.useTransition&&z,this.options.useTransform=this.options.useTransform&&L,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollX="horizontal"!==this.options.eventPassthrough&&this.options.scrollX,this.options.scrollY="vertical"!==this.options.eventPassthrough&&this.options.scrollY,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,!0===this.options.tap&&(this.options.tap="tap")},t.prototype._addDOMEvents=function(){var t=h;this._handleDOMEvents(t)},t.prototype._removeDOMEvents=function(){var t=a;this._handleDOMEvents(t)},t.prototype._handleDOMEvents=function(t){var i=this.options.bindToWrapper?this.wrapper:window;t(window,"orientationchange",this),t(window,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),H&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,C.transitionEnd,this)},t.prototype._initExtFeatures=function(){this.options.snap&&this._initSnap(),this.options.scrollbar&&this._initScrollbar(),this.options.pullUpLoad&&this._initPullUp(),this.options.pullDownRefresh&&this._initPullDown(),this.options.wheel&&this._initWheel(),this.options.mouseWheel&&this._initMouseWheel()},t.prototype._watchTransition=function(){if("function"==typeof Object.defineProperty){var t=this,i=!1;Object.defineProperty(this,"isInTransition",{get:function(){return i},set:function(e){i=e;for(var s=t.scroller.children.length?t.scroller.children:[t.scroller],o=i&&!t.pulling?"none":"auto",n=0;n0||this.x0||this.ythis.options.momentumLimitTime&&rr+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"===this.directionLocked){if("vertical"===this.options.eventPassthrough)t.preventDefault();else if("horizontal"===this.options.eventPassthrough)return void(this.initiated=!1);o=0}else if("v"===this.directionLocked){if("horizontal"===this.options.eventPassthrough)t.preventDefault();else if("vertical"===this.options.eventPassthrough)return void(this.initiated=!1);e=0}e=this.hasHorizontalScroll?e:0,o=this.hasVerticalScroll?o:0,this.movingDirectionX=e>0?q:e<0?j:0,this.movingDirectionY=o>0?V:o<0?N:0;var a=this.x+e,l=this.y+o,c=this.options.bounce,p=c.top,u=void 0===p||p,d=c.bottom,f=void 0===d||d,g=c.left,m=void 0===g||g,v=c.right,y=void 0===v||v;(a>0||a0&&m||a0?0:this.maxScrollX),(l>0||l0&&u||l0?0:this.maxScrollY),this.moved||(this.moved=!0,this.trigger("scrollStart")),this._translate(a,l),h-this.startTime>this.options.momentumLimitTime&&(this.startTime=h,this.startX=this.x,this.startY=this.y,this.options.probeType===Z&&this.trigger("scroll",{x:this.x,y:this.y})),this.options.probeType>Z&&this.trigger("scroll",{x:this.x,y:this.y});var w=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,x=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,T=this.pointX-w,b=this.pointY-x;(T>document.documentElement.clientWidth-this.options.momentumLimitDistance||Tdocument.documentElement.clientHeight-this.options.momentumLimitDistance)&&this._end(t)}}},t.prototype._end=function(t){if(this.enabled&&!this.destroyed&&I[t.type]===this.initiated){this.initiated=!1,this.options.preventDefault&&!p(t.target,this.options.preventDefaultException)&&t.preventDefault(),this.options.stopPropagation&&t.stopPropagation(),this.trigger("touchEnd",{x:this.x,y:this.y}),this.isInTransition=!1;var i=Math.round(this.x),e=Math.round(this.y),o=i-this.absStartX,n=e-this.absStartY;if(this.directionX=o>0?q:o<0?j:0,this.directionY=n>0?V:n<0?N:0,!this.options.pullDownRefresh||!this._checkPullDown()){if(this._checkClick(t))return void this.trigger("scrollCancel");if(!this.resetPosition(this.options.bounceTime,R.bounce)){this.scrollTo(i,e),this.endTime=s();var r=this.endTime-this.startTime,h=Math.abs(i-this.startX),a=Math.abs(e-this.startY);if(this._events.flick&&rthis.options.momentumLimitDistance||h>this.options.momentumLimitDistance)){var c=this.options.bounce,u=c.top,d=void 0===u||u,f=c.bottom,g=void 0===f||f,m=c.left,y=void 0===m||m,w=c.right,x=void 0===w||w,T=this.directionX===q&&y||this.directionX===j&&x?this.wrapperWidth:0,b=this.directionY===V&&d||this.directionY===N&&g?this.wrapperHeight:0,_=this.hasHorizontalScroll?v(this.x,this.startX,r,this.maxScrollX,T,this.options):{destination:i,duration:0},P=this.hasVerticalScroll?v(this.y,this.startY,r,this.maxScrollY,b,this.options):{destination:e,duration:0};i=_.destination,e=P.destination,l=Math.max(_.duration,P.duration),this.isInTransition=!0}else this.options.wheel&&(e=Math.round(e/this.itemHeight)*this.itemHeight,l=this.options.wheel.adjustTime||400);var S=R.swipe;if(this.options.snap){var M=this._nearestSnap(i,e);this.currentPage=M,l=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(i-M.x),1e3),Math.min(Math.abs(e-M.y),1e3)),300),i=M.x,e=M.y,this.directionX=0,this.directionY=0,S=this.options.snap.easing||R.bounce}if(i!==this.x||e!==this.y)return(i>0||i0||e0&&void 0!==arguments[0]?arguments[0]:"transform";this.scrollerStyle[C.transitionProperty]=t},t.prototype._transitionTime=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.scrollerStyle[C.transitionDuration]=t+"ms",this.options.wheel)for(var i=0;i=c)return r.isAnimating=!1,r._translate(t,i),void(r.pulling||r.resetPosition(r.options.bounceTime)||r.trigger("scrollEnd",{x:r.x,y:r.y}));p=(p-l)/e;var u=o(p),d=(t-h)*u+h,f=(i-a)*u+a;r._translate(d,f),r.isAnimating&&(r.animateTimer=U(n)),r.options.probeType===G&&r.trigger("scroll",{x:r.x,y:r.y})}var r=this,h=this.x,a=this.y,l=s(),c=l+e;this.isAnimating=!0,B(this.animateTimer),n()},t.prototype.scrollBy=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R.bounce;t=this.x+t,i=this.y+i,this.scrollTo(t,i,e,s)},t.prototype.scrollTo=function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:R.bounce;this.isInTransition=this.options.useTransition&&e>0&&(t!==this.x||i!==this.y),!e||this.options.useTransition?(this._transitionProperty(),this._transitionTimingFunction(s.style),this._transitionTime(e),this._translate(t,i),e&&this.options.probeType===G&&this._startProbe(),this.options.wheel&&(i>0?this.selectedIndex=0:i0?0:n.left0?0:n.top0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R.bounce,e=this.x,s=Math.round(e);!this.hasHorizontalScroll||s>0?e=0:s0?o=0:n2&&void 0!==arguments[2]?arguments[2]:this;this._events[t]||(this._events[t]=[]),this._events[t].push([i,e])},t.prototype.once=function(t,i){function e(){this.off(t,e),i.apply(s,arguments)}var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;e.fn=i,this.on(t,e)},t.prototype.off=function(t,i){var e=this._events[t];if(e)for(var s=e.length;s--;)(e[s][0]===i||e[s][0]&&e[s][0].fn===i)&&(e[s][0]=void 0)},t.prototype.trigger=function(t){var i=this._events[t];if(i)for(var e=i.length,s=[].concat(S(i)),o=0;o1?(f(e[e.length-1].cloneNode(!0),this.scroller),this.scroller.appendChild(e[1].cloneNode(!0))):i.loop=!1}var s=i.el;"string"==typeof s&&(s=this.scroller.querySelectorAll(s)),this.on("refresh",function(){if(t.pages=[],t.wrapperWidth&&t.wrapperHeight&&t.scrollerWidth&&t.scrollerHeight){var e=i.stepX||t.wrapperWidth,o=i.stepY||t.wrapperHeight,n=0,r=void 0,h=void 0,a=void 0,l=0,p=void 0,u=0,d=void 0,f=void 0;if(s)for(p=s.length,d=-1;lt.maxScrollX&&u++;else for(h=Math.round(e/2),a=Math.round(o/2);n>-t.scrollerWidth;){for(t.pages[l]=[],p=0,r=0;r>-t.scrollerHeight;)t.pages[l][p]={x:Math.max(n,t.maxScrollX),y:Math.max(r,t.maxScrollY),width:e,height:o,cx:n-h,cy:r-a},r-=o,p++;n-=e,l++}t._checkSnapLoop();var g=i._loopX?1:0,m=i._loopY?1:0;t._goToPage(t.currentPage.pageX||g,t.currentPage.pageY||m,0);var v=i.threshold;v%1==0?(t.snapThresholdX=v,t.snapThresholdY=v):(t.snapThresholdX=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].width*v),t.snapThresholdY=Math.round(t.pages[t.currentPage.pageX][t.currentPage.pageY].height*v))}}),this.on("scrollEnd",function(){i.loop&&(i._loopX?(0===t.currentPage.pageX&&t._goToPage(t.pages.length-2,t.currentPage.pageY,0),t.currentPage.pageX===t.pages.length-1&&t._goToPage(1,t.currentPage.pageY,0)):(0===t.currentPage.pageY&&t._goToPage(t.currentPage.pageX,t.pages[0].length-2,0),t.currentPage.pageY===t.pages[0].length-1&&t._goToPage(t.currentPage.pageX,1,0)))}),!1!==i.listenFlick&&this.on("flick",function(){var e=i.speed||Math.max(Math.max(Math.min(Math.abs(t.x-t.startX),1e3),Math.min(Math.abs(t.y-t.startY),1e3)),300);t._goToPage(t.currentPage.pageX+t.directionX,t.currentPage.pageY+t.directionY,e)}),this.on("destroy",function(){if(i.loop){var e=t.scroller.children;e.length>2&&(m(t.scroller,e[e.length-1]),m(t.scroller,e[0]))}})},t.prototype._checkSnapLoop=function(){var t=this.options.snap;t.loop&&this.pages&&(this.pages.length>1&&(t._loopX=!0),this.pages[0]&&this.pages[0].length>1&&(t._loopY=!0),t._loopX&&t._loopY&&w("Loop does not support two direction at the same time."))},t.prototype._nearestSnap=function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0;if(Math.abs(t-this.absStartX)<=this.snapThresholdX&&Math.abs(i-this.absStartY)<=this.snapThresholdY)return this.currentPage;t>0?t=0:t0?i=0:i=this.pages[e][0].cx){t=this.pages[e][0].x;break}s=this.pages[e].length;for(var o=0;o=this.pages[0][o].cy){i=this.pages[0][o].y;break}return e===this.currentPage.pageX&&(e+=this.directionX,e<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),o===this.currentPage.pageY&&(o+=this.directionY,o<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),i=this.pages[0][o].y),{x:t,y:i,pageX:e,pageY:o}},t.prototype._goToPage=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments[2],s=arguments[3],o=this.options.snap;if(o&&this.pages&&(s=s||o.easing||R.bounce,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),this.pages[t])){i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?o.speed||Math.max(Math.max(Math.min(Math.abs(n-this.x),1e3),Math.min(Math.abs(r-this.y),1e3)),300):e,this.currentPage={x:n,y:r,pageX:t,pageY:i},this.scrollTo(n,r,e,s)}},t.prototype.goToPage=function(t,i,e,s){var o=this.options.snap;if(o){if(o.loop){var n=void 0;o._loopX?(n=this.pages.length-2,t>=n?t=n-1:t<0&&(t=0),t+=1):(n=this.pages[0].length-2,i>=n?i=n-1:i<0&&(i=0),i+=1)}this._goToPage(t,i,e,s)}},t.prototype.next=function(t,i){if(this.options.snap){var e=this.currentPage.pageX,s=this.currentPage.pageY;e++,e>=this.pages.length&&this.hasVerticalScroll&&(e=0,s++),this._goToPage(e,s,t,i)}},t.prototype.prev=function(t,i){if(this.options.snap){var e=this.currentPage.pageX,s=this.currentPage.pageY;e--,e<0&&this.hasVerticalScroll&&(e=0,s--),this._goToPage(e,s,t,i)}},t.prototype.getCurrentPage=function(){var t=this.options.snap;return t?t.loop?t._loopX?o({},this.currentPage,{pageX:this.currentPage.pageX-1}):o({},this.currentPage,{pageY:this.currentPage.pageY-1}):this.currentPage:null}}(_),function(t){t.prototype.wheelTo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.options.wheel&&(this.y=-t*this.itemHeight,this.scrollTo(0,this.y))},t.prototype.getSelectedIndex=function(){return this.options.wheel&&this.selectedIndex},t.prototype._initWheel=function(){var t=this.options.wheel;t.wheelWrapperClass||(t.wheelWrapperClass="wheel-scroll"),t.wheelItemClass||(t.wheelItemClass="wheel-item"),void 0===t.selectedIndex&&(t.selectedIndex=0,w("wheel option selectedIndex is required!"))}}(_),function(t){t.prototype._initScrollbar=function(){var t=this,i=this.options.scrollbar,e=i.fade,s=void 0===e||e,o=i.interactive,n=void 0!==o&&o;this.indicators=[];var r=void 0;this.options.scrollX&&(r={el:T("horizontal"),direction:"horizontal",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new b(this,r))),this.options.scrollY&&(r={el:T("vertical"),direction:"vertical",fade:s,interactive:n},this._insertScrollBar(r.el),this.indicators.push(new b(this,r))),this.on("refresh",function(){for(var i=0;i0&&void 0!==arguments[0])||arguments[0];this.options.pullDownRefresh=t,this._initPullDown()},t.prototype.closePullDown=function(){this.options.pullDownRefresh=!1}}(_),function(t){t.prototype._initPullUp=function(){this.options.probeType=G,this.pullupWatching=!1,this._watchPullUp()},t.prototype._watchPullUp=function(){this.pullupWatching||(this.pullupWatching=!0,this.on("scroll",this._checkToEnd))},t.prototype._checkToEnd=function(t){var i=this,e=this.options.pullUpLoad.threshold,s=void 0===e?0:e;this.movingDirectionY===N&&t.y<=this.maxScrollY+s&&(this.once("scrollEnd",function(){i.pullupWatching=!1}),this.trigger("pullingUp"),this.off("scroll",this._checkToEnd))},t.prototype.finishPullUp=function(){var t=this;this.pullupWatching?this.once("scrollEnd",function(){t._watchPullUp()}):this._watchPullUp()},t.prototype.openPullUp=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.pullUpLoad=t,this._initPullUp()},t.prototype.closePullUp=function(){this.options.pullUpLoad=!1,this.pullupWatching&&(this.pullupWatching=!1,this.off("scroll",this._checkToEnd))}}(_),function(t){t.prototype._initMouseWheel=function(){var t=this;this._handleMouseWheelEvent(h),this.on("destroy",function(){clearTimeout(t.mouseWheelTimer),t._handleMouseWheelEvent(a)}),this.firstWheelOpreation=!0},t.prototype._handleMouseWheelEvent=function(t){t(this.wrapper,"wheel",this),t(this.wrapper,"mousewheel",this),t(this.wrapper,"DOMMouseScroll",this)},t.prototype._onMouseWheel=function(t){var i=this;if(this.enabled){t.preventDefault(),this.firstWheelOpreation&&this.trigger("scrollStart"),this.firstWheelOpreation=!1,clearTimeout(this.mouseWheelTimer),this.mouseWheelTimer=setTimeout(function(){i.options.snap||i.trigger("scrollEnd",{x:i.x,y:i.y}),i.firstWheelOpreation=!0},400);var e=this.options.mouseWheel,s=e.speed,o=void 0===s?20:s,n=e.invert,r=void 0!==n&&n,h=e.easeTime,a=void 0===h?300:h,l=void 0,c=void 0;switch(!0){case"deltaX"in t:1===t.deltaMode?(l=-t.deltaX*o,c=-t.deltaY*o):(l=-t.deltaX,c=-t.deltaY);break;case"wheelDeltaX"in t:l=t.wheelDeltaX/120*o,c=t.wheelDeltaY/120*o;break;case"wheelDelta"in t:l=c=t.wheelDelta/120*o;break;case"detail"in t:l=c=-t.detail/3*o;break;default:return}var p=r?-1:1;l*=p,c*=p,this.hasVerticalScroll||(l=c,c=0);var u=void 0,d=void 0;if(this.options.snap)return u=this.currentPage.pageX,d=this.currentPage.pageY,l>0?u--:l<0&&u++,c>0?d--:c<0&&d++,void this._goToPage(u,d);u=this.x+Math.round(this.hasHorizontalScroll?l:0),d=this.y+Math.round(this.hasVerticalScroll?c:0),this.movingDirectionX=this.directionX=l>0?-1:l<0?1:0,this.movingDirectionY=this.directionY=c>0?-1:c<0?1:0,u>0?u=0:u0?d=0:d 0 || newX < this.maxScrollX) { - if (this.options.bounce) { + if (newX > 0 && left || newX < this.maxScrollX && right) { newX = this.x + deltaX / 3; } else { newX = newX > 0 ? 0 : this.maxScrollX; } } if (newY > 0 || newY < this.maxScrollY) { - if (this.options.bounce) { + if (newY > 0 && top || newY < this.maxScrollY && bottom) { newY = this.y + deltaY / 3; } else { newY = newY > 0 ? 0 : this.maxScrollY; @@ -1220,8 +1240,20 @@ function coreMixin(BScroll) { var time = 0; // start momentum animation if needed if (this.options.momentum && duration < this.options.momentumLimitTime && (absDistY > this.options.momentumLimitDistance || absDistX > this.options.momentumLimitDistance)) { - var momentumX = this.hasHorizontalScroll ? momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options) : { destination: newX, duration: 0 }; - var momentumY = this.hasVerticalScroll ? momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options) : { destination: newY, duration: 0 }; + var _options$bounce2 = this.options.bounce, + _options$bounce2$top = _options$bounce2.top, + top = _options$bounce2$top === undefined ? true : _options$bounce2$top, + _options$bounce2$bott = _options$bounce2.bottom, + bottom = _options$bounce2$bott === undefined ? true : _options$bounce2$bott, + _options$bounce2$left = _options$bounce2.left, + left = _options$bounce2$left === undefined ? true : _options$bounce2$left, + _options$bounce2$righ = _options$bounce2.right, + right = _options$bounce2$righ === undefined ? true : _options$bounce2$righ; + + var wrapperWidth = this.directionX === DIRECTION_RIGHT && left || this.directionX === DIRECTION_LEFT && right ? this.wrapperWidth : 0; + var wrapperHeight = this.directionY === DIRECTION_DOWN && top || this.directionY === DIRECTION_UP && bottom ? this.wrapperHeight : 0; + var momentumX = this.hasHorizontalScroll ? momentum(this.x, this.startX, duration, this.maxScrollX, wrapperWidth, this.options) : { destination: newX, duration: 0 }; + var momentumY = this.hasVerticalScroll ? momentum(this.y, this.startY, duration, this.maxScrollY, wrapperHeight, this.options) : { destination: newY, duration: 0 }; newX = momentumX.destination; newY = momentumY.destination; time = Math.max(momentumX.duration, momentumY.duration); @@ -2587,7 +2619,9 @@ function mouseWheelMixin(BScroll) { _options$mouseWheel$s = _options$mouseWheel.speed, speed = _options$mouseWheel$s === undefined ? 20 : _options$mouseWheel$s, _options$mouseWheel$i = _options$mouseWheel.invert, - invert = _options$mouseWheel$i === undefined ? false : _options$mouseWheel$i; + invert = _options$mouseWheel$i === undefined ? false : _options$mouseWheel$i, + _options$mouseWheel$e = _options$mouseWheel.easeTime, + easeTime = _options$mouseWheel$e === undefined ? 300 : _options$mouseWheel$e; var wheelDeltaX = void 0; var wheelDeltaY = void 0; @@ -2650,8 +2684,8 @@ function mouseWheelMixin(BScroll) { newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0); newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0); - this.directionX = wheelDeltaX > 0 ? -1 : wheelDeltaX < 0 ? 1 : 0; - this.directionY = wheelDeltaY > 0 ? -1 : wheelDeltaY < 0 ? 1 : 0; + this.movingDirectionX = this.directionX = wheelDeltaX > 0 ? -1 : wheelDeltaX < 0 ? 1 : 0; + this.movingDirectionY = this.directionY = wheelDeltaY > 0 ? -1 : wheelDeltaY < 0 ? 1 : 0; if (newX > 0) { newX = 0; @@ -2665,7 +2699,7 @@ function mouseWheelMixin(BScroll) { newY = this.maxScrollY; } - this.scrollTo(newX, newY); + this.scrollTo(newX, newY, easeTime, ease.swipe); this.trigger('scroll', { x: this.x, y: this.y @@ -2698,7 +2732,7 @@ pullDownMixin(BScroll); pullUpMixin(BScroll); mouseWheelMixin(BScroll); -BScroll.Version = '1.9.1'; +BScroll.Version = '1.10.0'; /* harmony default export */ __webpack_exports__["default"] = (BScroll); diff --git a/lib/button/button.min.js b/lib/button/button.min.js index c2ff0c456..c198f9bb5 100644 --- a/lib/button/button.min.js +++ b/lib/button/button.min.js @@ -1 +1 @@ -module.exports=function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=228)}({1:function(t,e){t.exports=function(t,e,n,o,r){var i,u=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,u=t.default);var l="function"==typeof u?u.options:u;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns),o&&(l._scopeId=o);var s;if(r?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=s):n&&(s=n),s){var c=l.functional,f=c?l.render:l.beforeCreate;c?l.render=function(t,e){return s.call(e),f(t,e)}:l.beforeCreate=f?[].concat(f,s):[s]}return{esModule:i,exports:u,options:l}}},155:function(t,e,n){function o(t){n(156)}var r=n(1)(n(157),n(158),o,null,null);t.exports=r.exports},156:function(t,e){},157:function(t,e,n){var o,r,i;!function(n,u){r=[t,e],o=u,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"cube-button",props:{icon:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},light:{type:Boolean,default:!1},type:{type:String,default:"button"}},computed:{btnClass:function(){return{"cube-btn_active":this.active,"cube-btn_disabled":this.disabled,"cube-btn-inline":this.inline,"cube-btn-primary":this.primary,"cube-btn-outline":this.outline,"cube-btn-outline-primary":this.outline&&this.primary,"cube-btn-light":this.light}}},methods:{handleClick:function(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.$emit("click",t)}}},t.exports=e.default})},158:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"cube-btn",class:t.btnClass,attrs:{type:t.type},on:{click:t.handleClick}},[t.icon?n("i",{class:t.icon}):t._e(),t._v(" "),t._t("default")],2)},staticRenderFns:[]}},228:function(t,e,n){var o,r,i;!function(u,a){r=[t,e,n(155)],o=a,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{default:t}}(n);o.default.install=function(t){t.component(o.default.name,o.default)},e.default=o.default,t.exports=e.default})}}); \ No newline at end of file +module.exports=function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=230)}({156:function(t,e,n){function o(t){n(157)}var r=n(2)(n(158),n(159),o,null,null);t.exports=r.exports},157:function(t,e){},158:function(t,e,n){var o,r,i;!function(n,u){r=[t,e],o=u,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={name:"cube-button",props:{icon:{type:String,default:""},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},light:{type:Boolean,default:!1},type:{type:String,default:"button"}},computed:{btnClass:function(){return{"cube-btn_active":this.active,"cube-btn_disabled":this.disabled,"cube-btn-inline":this.inline,"cube-btn-primary":this.primary,"cube-btn-outline":this.outline,"cube-btn-outline-primary":this.outline&&this.primary,"cube-btn-light":this.light}}},methods:{handleClick:function(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.$emit("click",t)}}},t.exports=e.default})},159:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"cube-btn",class:t.btnClass,attrs:{type:t.type},on:{click:t.handleClick}},[t.icon?n("i",{class:t.icon}):t._e(),t._v(" "),t._t("default")],2)},staticRenderFns:[]}},2:function(t,e){t.exports=function(t,e,n,o,r){var i,u=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,u=t.default);var l="function"==typeof u?u.options:u;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns),o&&(l._scopeId=o);var s;if(r?(s=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=s):n&&(s=n),s){var c=l.functional,f=c?l.render:l.beforeCreate;c?l.render=function(t,e){return s.call(e),f(t,e)}:l.beforeCreate=f?[].concat(f,s):[s]}return{esModule:i,exports:u,options:l}}},230:function(t,e,n){var o,r,i;!function(u,a){r=[t,e,n(156)],o=a,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){return t&&t.__esModule?t:{default:t}}(n);o.default.install=function(t){t.component(o.default.name,o.default)},e.default=o.default,t.exports=e.default})}}); \ No newline at end of file diff --git a/lib/button/index.js b/lib/button/index.js index dd219e002..4f35792f3 100644 --- a/lib/button/index.js +++ b/lib/button/index.js @@ -61,120 +61,22 @@ module.exports = /******/ __webpack_require__.p = "./"; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 228); +/******/ return __webpack_require__(__webpack_require__.s = 230); /******/ }) /************************************************************************/ /******/ ({ -/***/ 1: -/***/ (function(module, exports) { - -/* globals __VUE_SSR_CONTEXT__ */ - -// this module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle - -module.exports = function normalizeComponent ( - rawScriptExports, - compiledTemplate, - injectStyles, - scopeId, - moduleIdentifier /* server only */ -) { - var esModule - var scriptExports = rawScriptExports = rawScriptExports || {} - - // ES6 modules interop - var type = typeof rawScriptExports.default - if (type === 'object' || type === 'function') { - esModule = rawScriptExports - scriptExports = rawScriptExports.default - } - - // Vue.extend constructor export interop - var options = typeof scriptExports === 'function' - ? scriptExports.options - : scriptExports - - // render functions - if (compiledTemplate) { - options.render = compiledTemplate.render - options.staticRenderFns = compiledTemplate.staticRenderFns - } - - // scopedId - if (scopeId) { - options._scopeId = scopeId - } - - var hook - if (moduleIdentifier) { // server build - hook = function (context) { - // 2.3 injection - context = - context || // cached call - (this.$vnode && this.$vnode.ssrContext) || // stateful - (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional - // 2.2 with runInNewContext: true - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__ - } - // inject component styles - if (injectStyles) { - injectStyles.call(this, context) - } - // register component module identifier for async chunk inferrence - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier) - } - } - // used by ssr in case component is cached and beforeCreate - // never gets called - options._ssrRegister = hook - } else if (injectStyles) { - hook = injectStyles - } - - if (hook) { - var functional = options.functional - var existing = functional - ? options.render - : options.beforeCreate - if (!functional) { - // inject component registration as beforeCreate hook - options.beforeCreate = existing - ? [].concat(existing, hook) - : [hook] - } else { - // register for functioal component in vue file - options.render = function renderWithStyleInjection (h, context) { - hook.call(context) - return existing(h, context) - } - } - } - - return { - esModule: esModule, - exports: scriptExports, - options: options - } -} - - -/***/ }), - -/***/ 155: +/***/ 156: /***/ (function(module, exports, __webpack_require__) { function injectStyle (ssrContext) { - __webpack_require__(156) + __webpack_require__(157) } -var Component = __webpack_require__(1)( +var Component = __webpack_require__(2)( /* script */ - __webpack_require__(157), - /* template */ __webpack_require__(158), + /* template */ + __webpack_require__(159), /* styles */ injectStyle, /* scopeId */ @@ -188,14 +90,14 @@ module.exports = Component.exports /***/ }), -/***/ 156: +/***/ 157: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), -/***/ 157: +/***/ 158: /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { @@ -287,7 +189,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/***/ 158: +/***/ 159: /***/ (function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; @@ -307,12 +209,110 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c /***/ }), -/***/ 228: +/***/ 2: +/***/ (function(module, exports) { + +/* globals __VUE_SSR_CONTEXT__ */ + +// this module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle + +module.exports = function normalizeComponent ( + rawScriptExports, + compiledTemplate, + injectStyles, + scopeId, + moduleIdentifier /* server only */ +) { + var esModule + var scriptExports = rawScriptExports = rawScriptExports || {} + + // ES6 modules interop + var type = typeof rawScriptExports.default + if (type === 'object' || type === 'function') { + esModule = rawScriptExports + scriptExports = rawScriptExports.default + } + + // Vue.extend constructor export interop + var options = typeof scriptExports === 'function' + ? scriptExports.options + : scriptExports + + // render functions + if (compiledTemplate) { + options.render = compiledTemplate.render + options.staticRenderFns = compiledTemplate.staticRenderFns + } + + // scopedId + if (scopeId) { + options._scopeId = scopeId + } + + var hook + if (moduleIdentifier) { // server build + hook = function (context) { + // 2.3 injection + context = + context || // cached call + (this.$vnode && this.$vnode.ssrContext) || // stateful + (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional + // 2.2 with runInNewContext: true + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__ + } + // inject component styles + if (injectStyles) { + injectStyles.call(this, context) + } + // register component module identifier for async chunk inferrence + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier) + } + } + // used by ssr in case component is cached and beforeCreate + // never gets called + options._ssrRegister = hook + } else if (injectStyles) { + hook = injectStyles + } + + if (hook) { + var functional = options.functional + var existing = functional + ? options.render + : options.beforeCreate + if (!functional) { + // inject component registration as beforeCreate hook + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } else { + // register for functioal component in vue file + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return existing(h, context) + } + } + } + + return { + esModule: esModule, + exports: scriptExports, + options: options + } +} + + +/***/ }), + +/***/ 230: /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) { if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(155)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(156)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); diff --git a/lib/cascade-picker/cascade-picker.min.css b/lib/cascade-picker/cascade-picker.min.css index cca6a466f..4fad7d5b6 100644 --- a/lib/cascade-picker/cascade-picker.min.css +++ b/lib/cascade-picker/cascade-picker.min.css @@ -1 +1 @@ -.cube-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:100}.cube-popup-container,.cube-popup-mask{position:absolute;width:100%;height:100%}.cube-popup-mask{overflow:hidden;background-color:#25262d;opacity:.4}.cube-popup-mask:before{content:".";display:block;width:1px;height:1px;background-color:rgba(0,0,0,.1);margin-left:-10px}.cube-popup-container{-webkit-transform:translate(100%,100%);transform:translate(100%,100%)}.cube-popup-content{position:absolute;top:0;left:0;width:100%;box-sizing:border-box;-webkit-transform:translate(-100%,-100%);transform:translate(-100%,-100%)}.cube-popup-center .cube-popup-content{position:absolute;top:-50%;left:-50%;width:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cube-picker-fade-enter,.cube-picker-fade-leave-active{opacity:0}.cube-picker-fade-enter-active,.cube-picker-fade-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-picker-panel{height:273px;text-align:center;font-size:14px;background:#fff}.cube-picker-move-enter,.cube-picker-move-leave-active{-webkit-transform:translate3d(0,273px,0);transform:translate3d(0,273px,0)}.cube-picker-move-enter-active,.cube-picker-move-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-picker-choose{position:relative;height:60px}.cube-picker-choose>span{position:absolute;top:6px;padding:16px;font-size:14px}.cube-picker-choose>[data-action=confirm]{right:0;color:#fc9153}.cube-picker-choose>[data-action=confirm]:active{color:#fdc2a5}.cube-picker-choose>[data-action=cancel]{left:0;color:#999}.cube-picker-choose>[data-action=cancel]:active{color:#ccc}.cube-picker-choose>h1{margin:0;line-height:60px;text-align:center;font-weight:400;font-size:18px;color:#333}.cube-picker-content{position:relative;top:20px}.cube-picker-content>i{position:absolute;z-index:10;left:0;width:100%;height:68px;pointer-events:none;-webkit-transform:translateZ(0);transform:translateZ(0)}.cube-picker-content>.border-bottom-1px{top:0;background:-webkit-gradient(linear,left bottom,left top,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8)));background:-webkit-linear-gradient(bottom,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8));background:linear-gradient(0deg,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8))}.cube-picker-content>.border-top-1px{bottom:0;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8)));background:-webkit-linear-gradient(top,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8));background:linear-gradient(180deg,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8))}.cube-picker-wheel-wrapper{display:-webkit-box;display:flex;padding:0 16px}.cube-picker-wheel-wrapper>div{-webkit-box-flex:1;flex:1;flex-basis:1e-9px;width:1%;height:173px;overflow:hidden;font-size:20px}.wheel-scroll{padding:0;margin-top:68px;line-height:36px;list-style:none}.wheel-scroll>li{list-style:none;height:36px;overflow:hidden;white-space:nowrap;color:#333}.cube-picker-footer{height:20px} \ No newline at end of file +.cube-popup{position:fixed;left:0;right:0;top:0;bottom:0;z-index:100;pointer-events:none}.cube-popup_mask{pointer-events:auto}.cube-popup_mask .cube-popup-mask{display:block}.cube-popup-container,.cube-popup-mask{position:absolute;width:100%;height:100%}.cube-popup-mask{display:none;overflow:hidden;background-color:#25262d;opacity:.4;pointer-events:auto}.cube-popup-mask:before{content:".";display:block;width:1px;height:1px;background-color:rgba(0,0,0,.1);margin-left:-10px}.cube-popup-container{-webkit-transform:translate(100%,100%);transform:translate(100%,100%)}.cube-popup-content{position:absolute;top:0;left:0;width:100%;box-sizing:border-box;-webkit-transform:translate(-100%,-100%);transform:translate(-100%,-100%);pointer-events:auto}.cube-popup-center .cube-popup-content{position:absolute;top:-50%;left:-50%;width:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cube-picker-fade-enter,.cube-picker-fade-leave-active{opacity:0}.cube-picker-fade-enter-active,.cube-picker-fade-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-picker-panel{height:273px;text-align:center;font-size:14px;background:#fff}.cube-picker-move-enter,.cube-picker-move-leave-active{-webkit-transform:translate3d(0,273px,0);transform:translate3d(0,273px,0)}.cube-picker-move-enter-active,.cube-picker-move-leave-active{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.cube-picker-choose{position:relative;height:60px}.cube-picker-choose>span{position:absolute;top:6px;padding:16px;font-size:14px}.cube-picker-choose>[data-action=confirm]{right:0;color:#fc9153}.cube-picker-choose>[data-action=confirm]:active{color:#fdc2a5}.cube-picker-choose>[data-action=cancel]{left:0;color:#999}.cube-picker-choose>[data-action=cancel]:active{color:#ccc}.cube-picker-choose>h1{margin:0;line-height:60px;text-align:center;font-weight:400;font-size:18px;color:#333}.cube-picker-content{position:relative;top:20px}.cube-picker-content>i{position:absolute;z-index:10;left:0;width:100%;height:68px;pointer-events:none;-webkit-transform:translateZ(0);transform:translateZ(0)}.cube-picker-content>.border-bottom-1px{top:0;background:-webkit-gradient(linear,left bottom,left top,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8)));background:-webkit-linear-gradient(bottom,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8));background:linear-gradient(0deg,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8))}.cube-picker-content>.border-top-1px{bottom:0;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8)));background:-webkit-linear-gradient(top,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8));background:linear-gradient(180deg,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8))}.cube-picker-wheel-wrapper{display:-webkit-box;display:flex;padding:0 16px}.cube-picker-wheel-wrapper>div{-webkit-box-flex:1;flex:1;flex-basis:1e-9px;width:1%;height:173px;overflow:hidden;font-size:20px}.wheel-scroll{padding:0;margin-top:68px;line-height:36px;list-style:none}.wheel-scroll>li{list-style:none;height:36px;overflow:hidden;white-space:nowrap;color:#333}.cube-picker-footer{height:20px} \ No newline at end of file diff --git a/lib/cascade-picker/cascade-picker.min.js b/lib/cascade-picker/cascade-picker.min.js index b37d4d5cd..06f11d697 100644 --- a/lib/cascade-picker/cascade-picker.min.js +++ b/lib/cascade-picker/cascade-picker.min.js @@ -1,6 +1,6 @@ -module.exports=function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=229)}([function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){t.exports=function(t,e,i,n,o){var r,s=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(r=t,s=t.default);var c="function"==typeof s?s.options:s;e&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns),n&&(c._scopeId=n);var h;if(o?(h=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=h):i&&(h=i),h){var l=c.functional,u=l?c.render:c.beforeCreate;l?c.render=function(t,e){return h.call(e),u(t,e)}:c.beforeCreate=u?[].concat(u,h):[h]}return{esModule:r,exports:s,options:c}}},function(t,e,i){var n=i(25)("wks"),o=i(20),r=i(0).Symbol,s="function"==typeof r;(t.exports=function(t){return n[t]||(n[t]=s&&r[t]||(s?r:o)("Symbol."+t))}).store=n},function(t,e){var i=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=i)},function(t,e,i){t.exports=!i(10)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var n=i(8),o=i(15);t.exports=i(4)?function(t,e,i){return n.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var n=i(9),o=i(33),r=i(30),s=Object.defineProperty;e.f=i(4)?Object.defineProperty:function(t,e,i){if(n(t),e=r(e,!0),n(i),o)try{return s(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){var n=i(6);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,i){var n=i(0),o=i(3),r=i(21),s=i(7),a=i(5),c=function(t,e,i){var h,l,u,p=t&c.F,f=t&c.G,d=t&c.S,v=t&c.P,m=t&c.B,g=t&c.W,y=f?o:o[e]||(o[e]={}),x=y.prototype,_=f?n:d?n[e]:(n[e]||{}).prototype;f&&(i=e);for(h in i)(l=!p&&_&&void 0!==_[h])&&a(y,h)||(u=l?_[h]:i[h],y[h]=f&&"function"!=typeof _[h]?i[h]:m&&l?r(u,n):g&&_[h]==u?function(t){var e=function(e,i,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,i)}return new t(e,i,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(u):v&&"function"==typeof u?r(Function.call,u):u,v&&((y.virtual||(y.virtual={}))[h]=u,t&c.R&&x&&!x[h]&&s(x,h,u)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,i){var n=i(23),o=i(13);t.exports=function(t){return n(o(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var n=i(25)("keys"),o=i(20);t.exports=function(t){return n[t]||(n[t]=o(t))}},function(t,e,i){var n=i(13);t.exports=function(t){return Object(n(t))}},function(t,e,i){var n=i(34),o=i(26);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+n).toString(36))}},function(t,e,i){var n=i(28);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,o){return t.call(e,i,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports={}},function(t,e,i){var n=i(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,i){var n=i(6),o=i(0).document,r=n(o)&&n(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,i){var n=i(0),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var n=i(14),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){t.exports={default:i(42),__esModule:!0}},function(t,e,i){var n=i(6);t.exports=function(t,e){if(!n(t))return t;var i,o;if(e&&"function"==typeof(i=t.toString)&&!n(o=i.call(t)))return o;if("function"==typeof(i=t.valueOf)&&!n(o=i.call(t)))return o;if(!e&&"function"==typeof(i=t.toString)&&!n(o=i.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,i){var n,o,r;!function(i,s){o=[t,e],n=s,void 0!==(r="function"==typeof n?n.apply(e,o):n)&&(t.exports=r)}(0,function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!0},hide:function(){this.isVisible=!1}}},t.exports=e.default})},function(t,e,i){t.exports=!i(4)&&!i(10)(function(){return 7!=Object.defineProperty(i(24)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){var n=i(5),o=i(12),r=i(37)(!1),s=i(16)("IE_PROTO");t.exports=function(t,e){var i,a=o(t),c=0,h=[];for(i in a)i!=s&&n(a,i)&&h.push(i);for(;e.length>c;)n(a,i=e[c++])&&(~r(h,i)||h.push(i));return h}},function(t,e,i){var n=i(8).f,o=i(5),r=i(2)("toStringTag");t.exports=function(t,e,i){t&&!o(t=i?t:t.prototype,r)&&n(t,r,{configurable:!0,value:e})}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){var n=i(12),o=i(27),r=i(38);t.exports=function(t){return function(e,i,s){var a,c=n(e),h=o(c.length),l=r(s,h);if(t&&i!=i){for(;h>l;)if((a=c[l++])!=a)return!0}else for(;h>l;l++)if((t||l in c)&&c[l]===i)return t||l||0;return!t&&-1}}},function(t,e,i){var n=i(14),o=Math.max,r=Math.min;t.exports=function(t,e){return t=n(t),t<0?o(t+e,0):r(t,e)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(29),o=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=o.default||function(t){for(var e=1;eh;)for(var p,f=a(arguments[h++]),d=l?n(f).concat(l(f)):n(f),v=d.length,m=0;v>m;)u.call(f,p=d[m++])&&(i[p]=f[p]);return i}:c},function(t,e,i){"use strict";var n=i(41),o=i(11),r=i(47),s=i(7),a=i(22),c=i(56),h=i(35),l=i(58),u=i(2)("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,i,d,v,m,g){c(i,e,d);var y,x,_,w=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},b=e+" Iterator",T="values"==v,S=!1,k=t.prototype,P=k[u]||k["@@iterator"]||v&&k[v],M=P||w(v),D=v?T?w("entries"):M:void 0,E="Array"==e?k.entries||P:P;if(E&&(_=l(E.call(new t)))!==Object.prototype&&_.next&&(h(_,b,!0),n||"function"==typeof _[u]||s(_,u,f)),T&&P&&"values"!==P.name&&(S=!0,M=function(){return P.call(this)}),n&&!g||!p&&!S&&k[u]||s(k,u,M),a[e]=M,a[b]=f,v)if(y={values:T?M:w("values"),keys:m?M:w("keys"),entries:D},g)for(x in y)x in k||r(k,x,y[x]);else o(o.P+o.F*(p||S),e,y);return y}},function(t,e,i){var n,o,r;!function(s,a){o=[t,e,i(40),i(51)],n=a,void 0!==(r="function"==typeof n?n.apply(e,o):n)&&(t.exports=r)}(0,function(t,e,i,n){"use strict";function o(t,e,n,o){var s=r.default.apply(this,arguments),a=e.name,c=a.replace(/^cube-/i,""),h="$"+(0,i.camelize)("create-"+c);return t.prototype[h]=s.create,e.$create=s.create,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=function(t){return t&&t.__esModule?t:{default:t}}(n);t.exports=e.default})},function(t,e,i){t.exports=i(7)},function(t,e,i){var n=i(9),o=i(57),r=i(26),s=i(16)("IE_PROTO"),a=function(){},c=function(){var t,e=i(24)("iframe"),n=r.length;for(e.style.display="none",i(49).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("