diff --git a/packages/omiu/package.json b/packages/omiu/package.json index ca2085c93..db38b2acd 100644 --- a/packages/omiu/package.json +++ b/packages/omiu/package.json @@ -1,6 +1,6 @@ { "name": "omiu", - "version": "0.0.13", + "version": "0.0.14", "description": "Omi ui.", "main": "dist/omiu.js", "minified:main": "dist/omiu.min.js", diff --git a/packages/omiu/src/dist/omiu.js b/packages/omiu/src/dist/omiu.js index cce62848b..9f3a93641 100644 --- a/packages/omiu/src/dist/omiu.js +++ b/packages/omiu/src/dist/omiu.js @@ -1,5 +1,5 @@ /*! - * omiu v0.0.13 By dntzhang + * omiu v0.0.14 By dntzhang * Github: https://github.com/AlloyTeam/omi * MIT Licensed. */ @@ -1453,6 +1453,10 @@ exports.push([module.i, ".weui-btn {\n background-color: #9CE6BF;\n color: #D7 "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); @@ -1547,6 +1551,34 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" return _class2; }(_omi.WeElement)); +var dialog = {}, + dom = void 0; + +dialog.alert = function (msg, options) { + options = options || {}; + if (dom) { + document.body.removeChild(dom); + } + dom = (0, _omi.render)(Omi.h('o-dialog', { + onConfirm: closeAlert, + width: options.width, + show: true, + type: 'alert', + title: options.title || '提示', + msg: msg, + confirmText: options.confirmText || '确定' + }), 'body'); +}; + +function closeAlert() { + if (dom) { + document.body.removeChild(dom); + dom = null; + } +} + +exports['default'] = dialog; + /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { @@ -1568,7 +1600,7 @@ if (typeof result === "string") { exports = module.exports = __webpack_require__(1)(false); // Module -exports.push([module.i, ".o-dialog {\n width: 100%;\n height: 100%;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.4);\n left: 0;\n top: 0;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n z-index: 100;\n}\n\n.content {\n width: 80%;\n height: auto;\n background-color: white;\n position: fixed;\n left: 10%;\n top: 20%;\n border-radius: 4px;\n text-align: center;\n}\n\nh1 {\n font-size: 18px;\n font-weight: normal;\n padding: 20px;\n margin: 0px;\n}\n\np {\n font-size: 16px;\n color: #666;\n padding-bottom: 20px;\n margin: 0px;\n border-bottom: 1px solid #eee;\n}\n\na {\n padding: 15px;\n text-align: center;\n font-size: 16px;\n display: inline-block;\n width: 50%;\n box-sizing: border-box;\n}\n\n.ok {\n color: #07C160;\n cursor: pointer;\n}\n\n.close {\n border-right: 1px solid #eee;\n color: black;\n cursor: pointer;\n}\n", ""]); +exports.push([module.i, ".o-dialog {\n width: 100%;\n height: 100%;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.4);\n left: 0;\n top: 0;\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n z-index: 100;\n}\n\n.content {\n width: 80%;\n height: auto;\n background-color: white;\n position: fixed;\n left: 10%;\n top: 20%;\n border-radius: 4px;\n text-align: center;\n padding: 10px;\n}\n\nh1 {\n font-size: 18px;\n font-weight: normal;\n padding: 20px;\n margin: 0px;\n}\n\np {\n font-size: 16px;\n color: #666;\n padding-bottom: 20px;\n margin: 0px;\n border-bottom: 1px solid #eee;\n}\n\na {\n padding: 15px;\n text-align: center;\n font-size: 16px;\n display: inline-block;\n width: 50%;\n box-sizing: border-box;\n}\n\n.ok {\n color: #07C160;\n cursor: pointer;\n}\n\n.close {\n border-right: 1px solid #eee;\n color: black;\n cursor: pointer;\n}\n", ""]); diff --git a/packages/omiu/src/dist/omiu.min.js b/packages/omiu/src/dist/omiu.min.js index db82f1b54..5a8e01c04 100644 --- a/packages/omiu/src/dist/omiu.min.js +++ b/packages/omiu/src/dist/omiu.min.js @@ -1,6 +1,6 @@ /*! - * omiu v0.0.13 By dntzhang + * omiu v0.0.14 By dntzhang * Github: https://github.com/AlloyTeam/omi * MIT Licensed. */ -!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("omi")):"function"==typeof define&&define.amd?define(["omi"],t):"object"==typeof exports?exports.Omiu=t(require("omi")):n.Omiu=t(n.omi)}("undefined"!=typeof self?self:this,function(n){return function(n){function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=9)}([function(t,e){t.exports=n},function(n,t,e){"use strict";function o(n,t){var e=n[1]||"",o=n[3];if(!o)return e;if(t&&"function"==typeof btoa){var i=r(o);return[e].concat(o.sources.map(function(n){return"/*# sourceURL="+o.sourceRoot+n+" */"})).concat([i]).join("\n")}return[e].join("\n")}function r(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var t=[];return t.toString=function(){return this.map(function(t){var e=o(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var o={},r=0;r=0||Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function i(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function a(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var s,c,l=Object.assign||function(n){for(var t=1;tn.strokeWidth&&(t=n.trailWidth);var e=50-t/2;return r.render(this._pathTemplate,{radius:e,"2radius":2*e})},i.prototype._trailString=function(n){return this._pathString(n)},n.exports=i},function(n,t,e){"use strict";e(10),e(13),e(4),e(18),e(21),e(2),e(6),e(29),e(35),e(40),e(43),e(46),e(49),e(52),e(55),e(58),e(61),e(64),e(67),e(70),e(73),e(76),e(79),e(82),e(85),e(88),e(91),e(94),e(97),e(100),e(103),e(106),e(109),e(112),e(115),e(118),e(123),e(126)},function(n,t,e){"use strict";function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function i(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(){function n(n,t){for(var e=0;e=i.props.max,i.update(),i.props.onChange(i.data.value))},i.plus=function(){i.data.pDisabled||(i.data.value+=i.props.step,i.data.pDisabled=i.data.value>=i.props.max,i.data.pDisabled&&(i.data.value=i.props.max),i.data.mDisabled=i.data.value<=i.props.min,i.update(),i.props.onChange(i.data.value))},a=e,r(i,a)}return i(t,n),a(t,[{key:"css",value:function(){return l.default}},{key:"install",value:function(){this.data.value=this.props.value}},{key:"render",value:function(n,t){return Omi.h("div",(0,s.extractClass)(n,"o-input-number"),Omi.h("span",{role:"button",class:"decrease"+(t.mDisabled?" is-disabled":""),onClick:this.minus},"-"),Omi.h("span",{role:"button",class:"increase"+(t.pDisabled?" is-disabled":""),onClick:this.plus},"+"),Omi.h("div",{class:"input"},Omi.h("input",{type:"text",autocomplete:"off","aria-label":"描述文字",max:"10",min:"1",class:"o-input__inner",role:"spinbutton","aria-valuemax":"10","aria-valuemin":"1","aria-valuenow":"1",name:n.name,value:t.value,"aria-disabled":"undefined"})))}}]),t}(s.WeElement))},function(n,t,e){"use strict";var o=e(12);n.exports="string"==typeof o?o:o.toString()},function(n,t,e){t=n.exports=e(1)(!1),t.push([n.i,".o-input-number {\n position: relative;\n width: 150px;\n display: inline-block;\n}\n\nspan {\n position: absolute;\n border: 1px solid #ccc;\n width: 32px;\n height: 32px;\n background-color: white;\n cursor: pointer;\n text-align: center;\n line-height: 29px;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.decrease {\n left: 1px;\n border-radius: 3px 0px 0px 3px;\n user-select: none;\n}\n\n.increase {\n right: 1px;\n border-radius: 0px 3px 3px 0px;\n user-select: none;\n}\n\n.input {\n width: 100%;\n}\n\ninput {\n width: 100px;\n height: 32px;\n margin: 0 auto;\n display: block;\n text-align: center;\n border: 1px solid #ccc;\n}",""])},function(n,t,e){"use strict";function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function i(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(){function n(n,t){for(var e=0;ea {\n text-align: center;\n display: block;\n position: relative;\n line-height: 35px;\n cursor: pointer;\n white-space: nowrap;\n text-align: left;\n height: 60px;\n color: #F2F2F2;\n}\n\na:active {\n background-color: rgb(63, 63, 63);\n}\n\n.icon {\n position: absolute;\n left: 20px;\n top: 13px;\n}\n\n.wd {\n margin-left: 60px;\n line-height: 60px;\n border-bottom: 1px solid #555555;\n}\n\n.arrow {\n position: absolute;\n width: 10px;\n height: 10px;\n background-color: #4C4B4C;\n transform: rotate(45deg);\n border-radius: 2px;\n top: -4px;\n right: 15px;\n ;\n}",""])},function(n,t,e){"use strict";function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function i(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(){function n(n,t){for(var e=0;e0&&e.numEdge>0){for(var r=Math.min(e.numEdge,o[0]),i=0;i0){this.pageNum-e.numEdge>o[1]&&e.ellipseText&&t.push(Omi.h("li",{class:"o-icon more btn-quicknext o-icon-more"}));for(var a=Math.max(this.pageNum-e.numEdge,o[1]),i=a;in?Math.max(Math.min(this.data.currentPage-n,t),0):0,this.data.currentPage>n?Math.min(this.data.currentPage+n,this.pageNum):Math.min(this.data.numDisplay,this.pageNum)]}},{key:"getPrev",value:function(){var n=this;return 0===this.data.currentPage?Omi.h("button",{type:"button",class:"btn-prev",disabled:"disabled"},Omi.h("svg",{viewBox:"64 64 896 896",class:"","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},Omi.h("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}))):Omi.h("button",{type:"button",class:"btn-prev",onclick:function(t){n.goto(n.data.currentPage-1)}},Omi.h("svg",{viewBox:"64 64 896 896",class:"","data-icon":"left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},Omi.h("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"})))}},{key:"getNext",value:function(){var n=this;return this.data.currentPage===this.pageNum-1?Omi.h("button",{type:"button",class:"btn-next",disabled:"disabled"},Omi.h("svg",{viewBox:"64 64 896 896",class:"","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},Omi.h("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"}))):Omi.h("button",{type:"button",class:"btn-next",onclick:function(t){n.goto(n.data.currentPage+1)}},Omi.h("svg",{viewBox:"64 64 896 896",class:"","data-icon":"right",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},Omi.h("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"})))}},{key:"getItem",value:function(n,t){var e=this;return this.data.currentPage===n?Omi.h("li",{class:"number active"},t):Omi.h("li",{class:"number",onclick:function(t){e.goto(n)}},t)}}]),t}(l.WeElement),a.observe=!0,s))},function(n,t,e){"use strict";var o=e(51);n.exports="string"==typeof o?o:o.toString()},function(n,t,e){t=n.exports=e(1)(!1),t.push([n.i,"div {\n color: rgba(0, 0, 0, .65);\n}\n\n* {\n box-sizing: border-box;\n}\n\nul,\nli {\n padding: 0;\n margin: 0;\n}\n\nli {\n display: inline-block;\n min-width: 32px;\n height: 32px;\n border: 1px solid #ccc;\n vertical-align: middle;\n line-height: 32px;\n text-align: center;\n margin: 0 3px 0 3px;\n cursor: pointer;\n border-radius: 3px;\n}\n\n.o-pager {\n display: inline-block;\n}\n\nbutton {\n width: 32px;\n height: 32px;\n appearance: none;\n -webkit-appearance: none;\n position: relative;\n border: 1px solid #ccc;\n background: none;\n top: 1px;\n border-radius: 3px;\n cursor: pointer;\n outline: none;\n}\n\nbutton.btn-next:not(disabled):active,\nbutton.btn-prev:not(disabled):active {\n background-color: #eee;\n}\n\nbutton:disabled {\n pointer-events: none;\n border-color: #eee;\n cursor: default;\n}\n\n.more:after {\n content: '...';\n}\n\n.more {\n border: none;\n cursor: default;\n}\n\n.active {\n border-color: #07C160;\n color: rgb(4, 161, 80);\n}\n\nsvg {\n position: relative;\n top: 2px;\n}",""])},function(n,t,e){"use strict";function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function i(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(){function n(n,t){for(var e=0;e.weui-cell__bd {\n position: relative;\n z-index: 1;\n background-color: #FFFFFF;\n}\n\n.weui-cell_swiped>.weui-cell__ft {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n color: #FFFFFF;\n}\n\n.weui-cells_radio .weui-cell__ft {\n padding-left: 0.35em;\n}\n\n.weui-cells_radio .weui-check:checked+.weui-icon-checked:before {\n display: block;\n content: \'\\EA08\';\n color: #07C160;\n font-size: 16px;\n}\n\n.weui-cells_checkbox .weui-cell__hd {\n padding-right: 0.35em;\n}\n\n.weui-cells_checkbox .weui-icon-checked:before {\n content: \'\\EA01\';\n color: #C9C9C9;\n font-size: 23px;\n display: block;\n}\n\n.weui-cells_checkbox .weui-check:checked+.weui-icon-checked:before {\n content: \'\\EA06\';\n color: #07C160;\n}\n\n.weui-cells_form .weui-cell__ft {\n font-size: 0;\n}\n\n.weui-cells_form .weui-icon-warn {\n display: none;\n}\n\n.weui-cells_form input,\n.weui-cells_form textarea,\n.weui-cells_form label[for] {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.weui-cell_warn {\n color: #E64340;\n}\n\n.weui-cell_warn .weui-icon-warn {\n display: inline-block;\n}\n\n.weui-media-box_small-appmsg .weui-cells {\n margin-top: 0;\n}\n\n.weui-media-box_small-appmsg .weui-cells:before {\n display: none;\n}\n\n.weui-cell_select-before {\n padding-right: 15px;\n}\n\n.weui-cell_select-before .weui-select {\n width: 105px;\n box-sizing: border-box;\n}\n\n.weui-cell_select-before .weui-cell__hd {\n position: relative;\n}\n\n.weui-cell_select-before .weui-cell__hd:after {\n content: " ";\n position: absolute;\n right: 0;\n top: 0;\n width: 1px;\n bottom: 0;\n border-right: 1px solid #e5e5e5;\n color: #e5e5e5;\n -webkit-transform-origin: 100% 0;\n transform-origin: 100% 0;\n -webkit-transform: scaleX(0.5);\n transform: scaleX(0.5);\n}\n\n.weui-cell_select-before .weui-cell__hd:before {\n content: " ";\n display: inline-block;\n height: 6px;\n width: 6px;\n border-width: 2px 2px 0 0;\n border-color: #C8C8CD;\n border-style: solid;\n -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);\n transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);\n position: relative;\n top: -2px;\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -4px;\n}\n\n.weui-cell_select-before .weui-cell__bd {\n padding-left: 15px;\n}\n\n.weui-cell_select-before .weui-cell__bd:after {\n display: none;\n}\n\n.weui-cell_select-after {\n padding-left: 15px;\n}\n\n.weui-cell_select-after .weui-select {\n padding-left: 0;\n}\n\n.weui-cell_vcode {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n\n.weui-cell_switch {\n padding-top: 6.5px;\n padding-bottom: 6.5px;\n}\n\n.icon {\n position: relative;\n top: 3px;\n}\n\n.weui-cell_select {\n padding: 0;\n}\n\n.weui-cell_select .weui-select {\n padding-right: 30px;\n}\n\n.weui-cell_select .weui-cell__bd:after {\n content: " ";\n display: inline-block;\n height: 6px;\n width: 6px;\n border-width: 2px 2px 0 0;\n border-color: #C8C8CD;\n border-style: solid;\n -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);\n transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);\n position: relative;\n top: -2px;\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -4px;\n}\n\n.weui-cell_access {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n color: inherit;\n}\n\n.weui-cell_access:active {\n background-color: #ECECEC;\n}\n\n.weui-cell_access .weui-cell__ft {\n padding-right: 13px;\n position: relative;\n}\n\n.weui-cell_access .weui-cell__ft:after {\n content: " ";\n display: inline-block;\n height: 6px;\n width: 6px;\n border-width: 2px 2px 0 0;\n border-color: #C8C8CD;\n border-style: solid;\n -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);\n transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);\n position: relative;\n top: -2px;\n position: absolute;\n top: 50%;\n margin-top: -4px;\n right: 2px;\n}\n\n.weui-cell_link {\n color: #586C94;\n font-size: 14px;\n}\n\n.weui-cell_link:first-child:before {\n display: block;\n}\n\n.weui-cell_warn .weui-textarea-counter {\n color: #E64340;\n}',""])},function(n,t,e){"use strict";function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function i(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=Object.assign||function(n){for(var t=1;t100&&(i.percentage=100),i._x=n.touches[0].pageX,i.fire("change",i.percentage)},i.end=function(){document.removeEventListener("touchmove",i.move),document.removeEventListener("touchend",i.end)},a=e,r(i,a)}return i(t,n),s(t,[{key:"css",value:function(){return u.default}},{key:"install",value:function(){this.percentage=this.props.percentage}},{key:"installed",value:function(){this._width=this._ele.getBoundingClientRect().width}},{key:"render",value:function(n){var t=this;return n.disabled?Omi.h("div",(0,c.extractClass)(n,"weui-slider"),Omi.h("div",{ref:function(n){t._ele=n},class:"weui-slider__inner"},Omi.h("div",{style:"width: 0;",class:"weui-slider__track"}),Omi.h("div",{style:"left: 0;",class:"weui-slider__handler"}))):Omi.h("div",a({},(0,c.extractClass)(n,"weui-slider-box"),{onTouchStart:this.start}),Omi.h("div",{class:"weui-slider"},Omi.h("div",{ref:function(n){t._ele=n},class:"weui-slider__inner"},Omi.h("div",{id:"sliderTrack",style:"width: "+this.percentage+"%;",class:"weui-slider__track"}),Omi.h("div",{id:"sliderHandler",ref:function(n){t._handler=n},style:"left: "+this.percentage+"%;",class:"weui-slider__handler"}))),Omi.h("div",{id:"sliderValue",class:"weui-slider-box__value"},Math.round(this.percentage)))}}]),t}(c.WeElement))},function(n,t,e){"use strict";var o=e(63);n.exports="string"==typeof o?o:o.toString()},function(n,t,e){t=n.exports=e(1)(!1),t.push([n.i,".weui-slider {\n padding: 15px 18px;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.weui-slider__inner {\n position: relative;\n height: 2px;\n background-color: #E9E9E9;\n}\n\n.weui-slider__track {\n height: 2px;\n background-color: #07C160;\n width: 0;\n}\n\n.weui-slider__handler {\n position: absolute;\n left: 0;\n top: 50%;\n width: 28px;\n height: 28px;\n margin-left: -14px;\n margin-top: -14px;\n border-radius: 50%;\n background-color: #FFFFFF;\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);\n}\n\n.weui-slider-box {\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n\n.weui-slider-box .weui-slider {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n\n.weui-slider-box__value {\n margin-left: .5em;\n min-width: 24px;\n color: #808080;\n text-align: center;\n font-size: 14px;\n}",""])},function(n,t,e){"use strict";function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function i(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=Object.assign||function(n){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function a(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var c,l,u=Object.assign||function(n){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function a(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c,l,u=Object.assign||function(n){for(var t=1;t