bestnihon-react-components
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -0,1 +1,3 @@ | ||
import AutoScrollTab from "./AutoScrollTab/AutoScrollTab"; | ||
import _NavBar from './NavBar/NavBar'; | ||
@@ -10,2 +12,4 @@ export { _NavBar as NavBar }; | ||
import _LozyLoad from './LazyLoad//LazyLoad.js'; | ||
export { _LozyLoad as LozyLoad }; | ||
export { _LozyLoad as LozyLoad }; | ||
import _AutoScrollTab from './AutoScrollTab/AutoScrollTab.js'; | ||
export { _AutoScrollTab as AutoScrollTab }; |
@@ -380,3 +380,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
*/ | ||
// animate = (target, dom, direction = scrollTop) => { | ||
// animate = (target, dom, direction = 'scrollTop') => { | ||
// clearInterval(this.timer) | ||
@@ -383,0 +383,0 @@ // console.log('执行 animate') |
@@ -1,26 +0,34 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.LozyLoad = exports.ScrollView = exports.TabContainerItem = exports.TabContainer = exports.NavBar = undefined; | ||
exports.AutoScrollTab = exports.LozyLoad = exports.ScrollView = exports.TabContainerItem = exports.TabContainer = exports.NavBar = undefined; | ||
var _NavBar2 = require('./NavBar/NavBar'); | ||
var _AutoScrollTab2 = require("./AutoScrollTab/AutoScrollTab"); | ||
var _AutoScrollTab3 = _interopRequireDefault(_AutoScrollTab2); | ||
var _NavBar2 = require("./NavBar/NavBar"); | ||
var _NavBar3 = _interopRequireDefault(_NavBar2); | ||
var _TabContainer2 = require('./TabContainer/TabContainer'); | ||
var _TabContainer2 = require("./TabContainer/TabContainer"); | ||
var _TabContainer3 = _interopRequireDefault(_TabContainer2); | ||
var _TabContainerItem2 = require('./TabContainerItem/TabContainerItem'); | ||
var _TabContainerItem2 = require("./TabContainerItem/TabContainerItem"); | ||
var _TabContainerItem3 = _interopRequireDefault(_TabContainerItem2); | ||
var _ScrollView2 = require('./ScrollView/ScrollView.js'); | ||
var _ScrollView2 = require("./ScrollView/ScrollView.js"); | ||
var _ScrollView3 = _interopRequireDefault(_ScrollView2); | ||
var _LazyLoad = require('./LazyLoad//LazyLoad.js'); | ||
var _LazyLoad = require("./LazyLoad//LazyLoad.js"); | ||
var _LazyLoad2 = _interopRequireDefault(_LazyLoad); | ||
var _AutoScrollTab4 = require("./AutoScrollTab/AutoScrollTab.js"); | ||
var _AutoScrollTab5 = _interopRequireDefault(_AutoScrollTab4); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -32,2 +40,3 @@ | ||
exports.ScrollView = _ScrollView3.default; | ||
exports.LozyLoad = _LazyLoad2.default; | ||
exports.LozyLoad = _LazyLoad2.default; | ||
exports.AutoScrollTab = _AutoScrollTab5.default; |
@@ -390,3 +390,3 @@ 'use strict'; | ||
*/ | ||
// animate = (target, dom, direction = scrollTop) => { | ||
// animate = (target, dom, direction = 'scrollTop') => { | ||
// clearInterval(this.timer) | ||
@@ -393,0 +393,0 @@ // console.log('执行 animate') |
{ | ||
"name": "bestnihon-react-components", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "bestnihon-react-components React component", | ||
@@ -35,4 +35,4 @@ "main": "lib/index.js", | ||
"keywords": [ | ||
"react-component" | ||
"react-component","load-more","auto-scroll-tab","tabcontainer" | ||
] | ||
} |
/*! | ||
* bestnihon-react-components v2.1.1 | ||
* bestnihon-react-components v2.1.2 | ||
* MIT Licensed | ||
@@ -77,3 +77,3 @@ */ | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 1); | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
@@ -89,9 +89,195 @@ /************************************************************************/ | ||
/* 1 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_Common__ = __webpack_require__(4); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AutoScrollTab_css__ = __webpack_require__(5); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AutoScrollTab_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__AutoScrollTab_css__); | ||
var _class, _temp, _initialiseProps; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var LEFT = 'left'; | ||
var CENTER = 'center'; | ||
var AutoScrollTab = (_temp = _class = function (_Component) { | ||
_inherits(AutoScrollTab, _Component); | ||
function AutoScrollTab(props) { | ||
_classCallCheck(this, AutoScrollTab); | ||
var _this = _possibleConstructorReturn(this, _Component.call(this, props)); | ||
_initialiseProps.call(_this); | ||
var direction = props.left ? LEFT : CENTER; | ||
_this.interval = props.interval || 18; | ||
_this.state = { | ||
left: props.left, // 点击后默认跳向最左边 | ||
isScroll: true, // 是否开启滚动, 默认开始滚动 | ||
fill: false, // 填充宽度 | ||
child: null, // 子元素 | ||
direction: direction // 点击后 item 是跳向中间 还是 最左边 默认中间 | ||
}; | ||
return _this; | ||
} | ||
AutoScrollTab.prototype.componentDidMount = function componentDidMount() { | ||
var _this2 = this; | ||
var rootWidth = parseFloat(window.getComputedStyle(this.container, null).width); | ||
var centre = rootWidth / 2; | ||
this.setState({ | ||
rootWidth: rootWidth, // 根元素的总宽度 | ||
centre: centre, // 中心点 | ||
child: this.container.children | ||
}, function () { | ||
return _this2.checkEl(); | ||
}); | ||
}; | ||
AutoScrollTab.prototype.componentWillUnmount = function componentWillUnmount() { | ||
clearInterval(this.timer); | ||
}; | ||
// 是否具备滚动条件 | ||
// 填充 | ||
// 目标 | ||
// 缓动动画 | ||
/** | ||
* | ||
* @param {*} targe 需要滚动到的位置 | ||
* @param {*} dom dom, 需要滚动的目标 | ||
* @param {*} direction scrollTop || scrollLeft, 默认 scollTop | ||
*/ | ||
AutoScrollTab.prototype.render = function render() { | ||
var _this3 = this; | ||
var fill = this.state.fill; | ||
var children = this.props.children; | ||
children = Array.isArray(children) ? children : [].concat(children); | ||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( | ||
'ul', | ||
{ className: 'AutoScrollTab-root', ref: function ref(node) { | ||
return _this3.container = node; | ||
} }, | ||
children.map(function (item, index) { | ||
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement( | ||
'li', | ||
{ key: 'children' + index, className: 'item', onClick: function onClick() { | ||
return _this3.sel(item, index); | ||
} }, | ||
item | ||
); | ||
}), | ||
fill && __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('li', { className: 'item', style: { width: fill + 'px' } }) | ||
); | ||
}; | ||
return AutoScrollTab; | ||
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _initialiseProps = function _initialiseProps() { | ||
var _this4 = this; | ||
this.checkEl = function () { | ||
var _state = _this4.state, | ||
rootWidth = _state.rootWidth, | ||
child = _state.child; | ||
var itemsWidth = 0; | ||
for (var i = 0, len = child.length; i < len; i++) { | ||
itemsWidth += __WEBPACK_IMPORTED_MODULE_1__utils_Common__["a" /* default */].attr(child[i], 'width'); | ||
} | ||
if (itemsWidth > rootWidth) { | ||
return _this4.fill(); | ||
} | ||
_this4.setState({ | ||
isScroll: false | ||
}); | ||
}; | ||
this.fill = function () { | ||
var _state2 = _this4.state, | ||
rootWidth = _state2.rootWidth, | ||
direction = _state2.direction, | ||
centre = _state2.centre, | ||
child = _state2.child; | ||
var lastElWidth = __WEBPACK_IMPORTED_MODULE_1__utils_Common__["a" /* default */].attr(child[child.length - 1], 'width'); | ||
var fill = direction === CENTER ? centre - lastElWidth / 2 : rootWidth - lastElWidth; | ||
_this4.setState({ | ||
fill: fill | ||
}); | ||
}; | ||
this.target = function (index) { | ||
var _state3 = _this4.state, | ||
direction = _state3.direction, | ||
child = _state3.child, | ||
centre = _state3.centre; | ||
var item = child[index]; | ||
var left = item.offsetLeft; | ||
var target = void 0; | ||
if (direction === CENTER) { | ||
target = left + __WEBPACK_IMPORTED_MODULE_1__utils_Common__["a" /* default */].attr(item, 'width') / 2 > centre ? left + __WEBPACK_IMPORTED_MODULE_1__utils_Common__["a" /* default */].attr(item, 'width') / 2 - centre : false; | ||
} else { | ||
target = left; | ||
} | ||
return target; | ||
}; | ||
this.sel = function (item, index) { | ||
var target = _this4.target(index); | ||
console.log('target==>', target); | ||
target >= 0 && _this4.animate(target, _this4.container); | ||
}; | ||
this.animate = function (target, dom) { | ||
var direction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'scrollLeft'; | ||
if (typeof target === 'boolean' && !target) return; | ||
clearInterval(_this4.timer); | ||
_this4.timer = setInterval(function () { | ||
var step = (target - dom[direction]) / 5; | ||
step = step > 0 ? Math.ceil(step) : Math.floor(step); | ||
dom[direction] += step; | ||
console.log('进行中'); | ||
if (Math.abs(target - dom[direction]) <= Math.abs(step)) { | ||
clearInterval(_this4.timer); | ||
console.log('清除中'); | ||
dom[direction] = target; | ||
} | ||
}, _this4.interval); | ||
}; | ||
}, _temp); | ||
/* harmony default export */ __webpack_exports__["a"] = (AutoScrollTab); | ||
/***/ }), | ||
/* 2 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(2); | ||
module.exports = __webpack_require__(3); | ||
/***/ }), | ||
/* 2 */ | ||
/* 3 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -101,12 +287,15 @@ | ||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__NavBar_NavBar__ = __webpack_require__(3); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavBar", function() { return __WEBPACK_IMPORTED_MODULE_0__NavBar_NavBar__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainer_TabContainer__ = __webpack_require__(5); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContainer", function() { return __WEBPACK_IMPORTED_MODULE_1__TabContainer_TabContainer__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TabContainerItem_TabContainerItem__ = __webpack_require__(7); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContainerItem", function() { return __WEBPACK_IMPORTED_MODULE_2__TabContainerItem_TabContainerItem__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ScrollView_ScrollView_js__ = __webpack_require__(9); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollView", function() { return __WEBPACK_IMPORTED_MODULE_3__ScrollView_ScrollView_js__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__LazyLoad_LazyLoad_js__ = __webpack_require__(11); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "LozyLoad", function() { return __WEBPACK_IMPORTED_MODULE_4__LazyLoad_LazyLoad_js__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AutoScrollTab_AutoScrollTab__ = __webpack_require__(1); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__NavBar_NavBar__ = __webpack_require__(6); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NavBar", function() { return __WEBPACK_IMPORTED_MODULE_1__NavBar_NavBar__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TabContainer_TabContainer__ = __webpack_require__(8); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContainer", function() { return __WEBPACK_IMPORTED_MODULE_2__TabContainer_TabContainer__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__TabContainerItem_TabContainerItem__ = __webpack_require__(10); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TabContainerItem", function() { return __WEBPACK_IMPORTED_MODULE_3__TabContainerItem_TabContainerItem__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ScrollView_ScrollView_js__ = __webpack_require__(12); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollView", function() { return __WEBPACK_IMPORTED_MODULE_4__ScrollView_ScrollView_js__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__LazyLoad_LazyLoad_js__ = __webpack_require__(14); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "LozyLoad", function() { return __WEBPACK_IMPORTED_MODULE_5__LazyLoad_LazyLoad_js__["a"]; }); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__AutoScrollTab_AutoScrollTab_js__ = __webpack_require__(1); | ||
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AutoScrollTab", function() { return __WEBPACK_IMPORTED_MODULE_6__AutoScrollTab_AutoScrollTab_js__["a"]; }); | ||
@@ -123,10 +312,50 @@ | ||
/***/ }), | ||
/* 3 */ | ||
/* 4 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var Common = function () { | ||
function Common() { | ||
_classCallCheck(this, Common); | ||
} | ||
/** | ||
* 获取 dom 的属性 | ||
* | ||
* @static | ||
* @param {*} dom | ||
* @param {*} attr | ||
* @returns 返回 Number | ||
* @memberof Common | ||
*/ | ||
Common.attr = function attr(dom, _attr) { | ||
return parseFloat(window.getComputedStyle(dom, null)[_attr]) || dom.getBoundingClientRect()[_attr]; | ||
}; | ||
return Common; | ||
}(); | ||
/* harmony default export */ __webpack_exports__["a"] = (Common); | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports) { | ||
// removed by extract-text-webpack-plugin | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__NavBar_css__ = __webpack_require__(4); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__NavBar_css__ = __webpack_require__(7); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__NavBar_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__NavBar_css__); | ||
@@ -315,3 +544,3 @@ var _class, _temp, _initialiseProps; | ||
/***/ }), | ||
/* 4 */ | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
@@ -322,3 +551,3 @@ | ||
/***/ }), | ||
/* 5 */ | ||
/* 8 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -329,3 +558,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainer_css__ = __webpack_require__(6); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainer_css__ = __webpack_require__(9); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainer_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__TabContainer_css__); | ||
@@ -542,3 +771,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/***/ }), | ||
/* 6 */ | ||
/* 9 */ | ||
/***/ (function(module, exports) { | ||
@@ -549,3 +778,3 @@ | ||
/***/ }), | ||
/* 7 */ | ||
/* 10 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -556,3 +785,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainerItem_css__ = __webpack_require__(8); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainerItem_css__ = __webpack_require__(11); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__TabContainerItem_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__TabContainerItem_css__); | ||
@@ -612,3 +841,3 @@ 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; }; | ||
/***/ }), | ||
/* 8 */ | ||
/* 11 */ | ||
/***/ (function(module, exports) { | ||
@@ -619,3 +848,3 @@ | ||
/***/ }), | ||
/* 9 */ | ||
/* 12 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -626,3 +855,3 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ScrollView_css__ = __webpack_require__(10); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ScrollView_css__ = __webpack_require__(13); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ScrollView_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__ScrollView_css__); | ||
@@ -1008,3 +1237,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
*/ | ||
// animate = (target, dom, direction = scrollTop) => { | ||
// animate = (target, dom, direction = 'scrollTop') => { | ||
// clearInterval(this.timer) | ||
@@ -1123,3 +1352,3 @@ // console.log('执行 animate') | ||
/***/ }), | ||
/* 10 */ | ||
/* 13 */ | ||
/***/ (function(module, exports) { | ||
@@ -1130,3 +1359,3 @@ | ||
/***/ }), | ||
/* 11 */ | ||
/* 14 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -1137,4 +1366,4 @@ | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_Screen__ = __webpack_require__(12); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LazyLoad_css__ = __webpack_require__(13); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_Screen__ = __webpack_require__(15); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LazyLoad_css__ = __webpack_require__(16); | ||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__LazyLoad_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__LazyLoad_css__); | ||
@@ -1223,3 +1452,3 @@ 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; }; | ||
/***/ }), | ||
/* 12 */ | ||
/* 15 */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
@@ -1371,3 +1600,3 @@ | ||
/***/ }), | ||
/* 13 */ | ||
/* 16 */ | ||
/***/ (function(module, exports) { | ||
@@ -1374,0 +1603,0 @@ |
/*! | ||
* bestnihon-react-components v2.1.1 | ||
* bestnihon-react-components v2.1.2 | ||
* MIT Licensed | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Y=e(require("react")):t.Y=e(t.React)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){t.exports=n(2)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3);n.d(e,"NavBar",function(){return o.a});var i=n(5);n.d(e,"TabContainer",function(){return i.a});var r=n(7);n.d(e,"TabContainerItem",function(){return r.a});var a=n(9);n.d(e,"ScrollView",function(){return a.a});var l=n(11);n.d(e,"LozyLoad",function(){return l.a})},function(t,e,n){"use strict";var o,i,r=n(0),a=n.n(r),l=n(4);n.n(l);var s=(o=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));i.call(o);var r=n.data,a=n.children,l=r?r.length:a.length;return o.state={ind:n.index||0,isAnimate:n.isAnimate||!1,onSel:n.onSel,data:n.data,itemWidth:window.screen.width/l,length:l},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){this.setBarWidth()},e.prototype.componentWillReceiveProps=function(t){var e=this,n=t.index,o=t.translate,i=this.state.ind;o&&this.translateBar(o),n>=0&&i!==n&&this.setState({ind:n},function(){return e.setBarWidth()})},e.prototype.render=function(){var t=this,e=this.state,n=e.ind,o=(e.translate,e.newInd,e.onSel,e.length,e.data),i=e.itemWidth,r=this.props,l=r.children,s=r.style;return a.a.createElement("div",{style:s,className:"NavBar-root"},a.a.createElement("div",{className:"container",ref:function(e){t.container=e}},o?o.map(function(e,o){return a.a.createElement("span",{key:"Nav"+o,style:{width:i+"px"},className:"Nav-item "+(o===n&&"active"),onClick:function(){return t.sel(e,o)}},a.a.createElement("span",null,e.name))}):l.map(function(e,o){return a.a.createElement("span",{key:"Nav"+o,style:{width:i+"px"},className:"Nav-item "+(o===n&&"active"),onClick:function(){return t.sel(e,o)}},e)})),a.a.createElement("div",{className:"Nav-active",style:{width:i+"px",transform:"translatex("+n*i+"px)"},ref:function(e){return t.bar=e}},a.a.createElement("div",{className:"Nav-active-bar",ref:function(e){return t.flag=e}})))},e}(r.Component),i=function(){var t=this;this.translateBar=function(e){var n=t.state.length,o=e.distance,i=e.transition;t.bar.style.transition=i?"all 200ms":"none",t.bar.style.transform="translateX("+-o/n+"px)"},this.sel=function(e,n){var o=t.state,i=o.isAnimate,r=o.onSel;t.bar.style.transition=i?"all 200ms":"none",t.setState({ind:n},function(){r&&r(e,n),t.setBarWidth()})},this.setBarWidth=function(){var e=t.state.ind,n=t.container.children,o=(n[e].children.length>=1?n[e].children[0]:n[e]).getBoundingClientRect().width;t.flag.style.width=o+"px"}},o);e.a=s},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(6);n.n(r);var a="left",l="right",s="top",c="down",u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.slideStart=function(t){o.startX=t.changedTouches[0].pageX,o.startY=t.changedTouches[0].pageY},o.slideMove=function(t){var e=t.changedTouches[0].pageX,n=t.changedTouches[0].pageY,i=e-o.startX,r=n-o.startY,u=i-o.itemWidth*o.index;if(!o.slideDirection||o.slideDirection===l||o.slideDirection===a)if(Math.abs(i)>Math.abs(r)&&i>0)event.preventDefault(),0!==o.index&&o.translate(u),o.slideDirection=l;else if(Math.abs(i)>Math.abs(r)&&i<0)event.preventDefault(),o.index!==o.props.children.length-1&&o.translate(u),o.slideDirection=a;else if(Math.abs(r)>Math.abs(i)&&r>0){if(o.slideDirection)return;o.slideDirection=c}else if(Math.abs(r)>Math.abs(i)&&r<0){if(o.slideDirection)return;o.slideDirection=s}},o.slideEnd=function(t){o.endX=t.changedTouches[0].pageX,o.isTranslate()},o.translate=function(t,e){var n="\n "+(e?"transition: all 200ms;":"")+"\n transform:translateX("+t+"px)\n ";o.container.style=n;var i=o.props.onTranslate;i&&i({distance:t,transition:e})},o.isTranslate=function(){if(o.slideDirection===l||o.slideDirection===a){var t=o.props.onSel,e=o.endX-o.startX,n={right:function(){0!==o.index&&o.index--},left:function(){o.index!==o.props.children.length-1&&o.index++}};Math.abs(e)>=o.interval&&(n[o.slideDirection](),console.log("上下页切换",o.index),t&&t(o.index)),o.translate(-o.index*o.itemWidth,!0)}o.slideDirection=null},o.itemWidth=window.screen.width,o.interval=n.interval||parseInt(o.itemWidth/5),o.index=n.index||0,o.oldIndex=n.index||0,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillReceiveProps=function(t){var e=t.index,n=this.props.onTranslate;this.index!==e&&(this.index=e,n&&n({distance:-this.index*this.itemWidth}),this.container.style.transition=null,this.container.style.transform="translateX("+-e*this.itemWidth+"px)")},e.prototype.componentDidMount=function(){this.translate(-this.index*this.itemWidth),this.root.addEventListener("touchstart",this.slideStart),this.root.addEventListener("touchmove",this.slideMove),this.root.addEventListener("touchend",this.slideEnd)},e.prototype.componentWillUnmount=function(){this.root.removeEventListener("touchstart",this.slideStart),this.root.removeEventListener("touchmove",this.slideMove),this.root.removeEventListener("touchend",this.slideEnd)},e.prototype.render=function(){var t=this;return i.a.createElement("div",{className:"tab-container-root",ref:function(e){t.root=e}},i.a.createElement("ul",{className:"tab-container",ref:function(e){t.container=e}},this.props.children))},e}(o.Component);e.a=u},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(8),a=(n.n(r),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t});var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this,e=Object.assign({},this.props),n=e.style;return n?n.height||(n.height=window.screen.height+"px"):n={height:window.screen.height+"px"},i.a.createElement("li",a({className:"TabContainerItem"},e,{ref:function(e){return t.el=e}}),this.props.children)},e}(o.Component);e.a=l},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(10);n.n(r);var a="top",l="bottom",s="loading",c="touch_top",u="touch_bottom",p=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.handleTouchStart=function(t){o.startY=t.touches[0].clientY},o.handleTouchMove=function(t){var e=o.state,n=e.isPullDown,i=e.isPullUp,r=e.topDistance,p=e.bottomDistance,d=e.isPullDownStatus,h=e.isPullUpStatus,f=e.isLoadOver,m=o.wrap.scrollTop,v=t.touches[0].clientY,y=void 0;o.direction=v-o.startY>0?u:c,n&&o.direction===u&&0===m&&d!==s&&!h?(event.preventDefault(),o.pullDownBarStartY=o.pullDownBarStartY?o.pullDownBarStartY:t.touches[0].clientY,y=(v-o.pullDownBarStartY)/o.limit,o.translate(y,!1),o.setState({isPullDownStatus:y>=r?a:l})):i&&!f&&o.direction===c&&m>=o.bottom&&h!==s&&!d&&(event.preventDefault(),o.pullUpBarStartY=o.pullUpBarStartY?o.pullUpBarStartY:t.touches[0].clientY,y=(v-o.pullUpBarStartY)/o.limit,o.translate(y,!1),o.setState({isPullUpStatus:Math.abs(y)>=p?l:a}))},o.handleTouchEnd=function(t){var e=o.state,n=e.isPullDownStatus,i=e.isPullUpStatus,r=e.topMethod,a=e.bottomMethod,l=e.animateTime;o.pullDownBarStartY=null,o.pullUpBarStartY=null;var c={top:function(){o.translate(),setTimeout(function(){o.setState({isPullUpStatus:null})},l)},bottom:function(){o.setState({isPullUpStatus:s},function(){o.translate(-o.pullUpBarHeight),a&&a()})}};n&&n!==s&&{top:function(){o.setState({isPullDownStatus:s},function(){o.translate(o.pullDownBarHeight),r&&r()})},bottom:function(){o.translate(),setTimeout(function(){o.setState({isPullDownStatus:null})},l)}}[n](),i&&c[i]()},o.fetchData=function(){var t=o.state,e=t.isFetch,n=t.topMethod;t.animateTime;e&&o.setState({isPullDownStatus:s,isPullUpStatus:null},function(){o.translate(o.pullDownBarHeight,!0),n&&n()})},o.scroll=function(){var t=o.state,e=t.onLower,n=t.onUpper,i=t.onScroll,r=t.scrollX,a=t.upperThreshold,l=t.lowerThreshold,s=r?"scrollLeft":"scrollTop",c=r?o.children:o.wrap,u=c[s],p=r?parseFloat(window.getComputedStyle(c,null).width):parseFloat(window.getComputedStyle(c,null).height),d=r?c.scrollWidth-p:c.scrollHeight-p;i&&i({scroll:u}),u<=a?n&&n():u>=d-l&&e&&e()},o.fill=function(t){var e=o.state.wrapHeight,n=parseFloat(window.getComputedStyle(o.children).height);o.wrap.style.height=e+"px",o.setState({fillAttr:n<e&&e-n},function(){o.scrollBottom(),t&&o.setTarget()})},o.setTarget=function(){var t=o.state,e=t.itemIndex,n=t.itemKey,i=t.scrollX;if(e&&n){var r=o.children.children,a=void 0;if(e>=0)a=e;else if(n)for(var l=0;l<o.props.children.length;l++)if(n===o.props.children[l].key){a=l;break}var s=i?o.children:o.wrap;a>=0&&(i?s.scrollLeft=r[a].offsetLeft:s.scrollTop=r[a].offsetTop),setTimeout(function(){s.addEventListener("scroll",o.scroll)},0)}},o.translate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.state,i=n.pullThreshold,r=n.animateTime;Math.abs(t)>i||(o.content.style.transition=e?"all "+r+"ms ease":"none",o.content.style.transform="translate3d(0, "+t+"px,0)")},o.scrollBottom=function(){var t=o.state.fillAttr,e=o.children.scrollHeight,n=parseFloat(window.getComputedStyle(o.wrap).height);o.bottom=t?0:e-n},console.log(n),o.limit=n.limit||4,o.state={isFetch:n.isFetch||!1,isLoadOver:n.isLoadOver,requestState:n.requestState,isPullDown:n.isPullDown||!1,isPullUp:n.isPullUp||!1,topDistance:n.topDistance||50,bottomDistance:n.bottomDistance||50,isPullDownStatus:null,isPullUpStatus:null,topMethod:n.topMethod,bottomMethod:n.bottomMethod,wrapHeight:n.wrapHeight,pullThreshold:n.pullThreshold||200,scrollX:n.scrollX||!1,scrollY:n.scrollY||!1,upperThreshold:n.upperThreshold||50,lowerThreshold:n.lowerThreshold||50,onUpper:n.onUpper,onLower:n.onLower,onScroll:n.onScroll,itemIndex:n.itemIndex>=0&&n.itemIndex,itemKey:n.itemKey||!1,animateTime:n.animateTime||300},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.state,n=e.wrapHeight,o=e.scrollX;this.setState({wrapHeight:!o&&(n||parseFloat(window.getComputedStyle(this.wrap.parentNode).height))},function(){o?t.setTarget():(t.wrap.addEventListener("touchstart",t.handleTouchStart),t.wrap.addEventListener("touchmove",t.handleTouchMove),t.wrap.addEventListener("touchend",t.handleTouchEnd),t.fetchData(),t.fill(!0))})},e.prototype.componentWillReceiveProps=function(t){var e=this,n=t.requestState,o=t.isLoadOver,i=t.itemIndex,r=t.itemKey,a=this.state,l=a.isPullUpStatus,s=a.isPullDownStatus,c=a.animateTime;console.log("scrollveiw nextProps",t,n);var u=function(){0===e.wrap.scrollTop&&e.translate(),setTimeout(function(){e.setState({isPullDownStatus:null},function(){return e.fill()})},c)};n&&(l&&function(){e.translate(),setTimeout(function(){e.setState({isPullUpStatus:null},function(){e.fill()})},c)}(),s&&u()),this.setState({isLoadOver:o}),i>=0?this.state.itemIndex!==i&&this.setState({itemIndex:i},function(){return e.setTarget()}):r&&this.state.itemKey!==r&&this.setState({itemKey:r},function(){return e.setTarget()})},e.prototype.componentWillUnmount=function(){this.wrap.removeEventListener("touchstart",this.handleTouchStart),this.wrap.removeEventListener("touchmove",this.handleTouchMove),this.wrap.removeEventListener("touchend",this.handleTouchEnd),(this.state.scrollX?this.children:this.wrap).removeEventListener("scroll",this.scroll),clearInterval(this.timer)},e.prototype.render=function(){var t=this,e=this.state,n=e.isPullDownStatus,o=e.isPullUpStatus,r=e.fillAttr,c=e.scrollX,u=(e.translate,e.isLoadOver),p=this.props,d=p.style,h=p.children;h=Array.isArray(h)?h:[].concat(h);var f=function(){return i.a.createElement("div",{className:"spinner"},i.a.createElement("div",{className:"bounce1"}),i.a.createElement("div",{className:"bounce2"}),i.a.createElement("div",{className:"bounce3"}))};return i.a.createElement("div",{className:"load-more-root",style:d,ref:function(e){return t.wrap=e}},i.a.createElement("div",{className:"load-more-content",ref:function(e){return t.content=e}},!c&&n&&!o&&i.a.createElement("div",{className:"pull-down-bar",ref:function(e){e&&(t.pullDownBarHeight=parseFloat(window.getComputedStyle(e).height))}},n===s?i.a.createElement(f,null):i.a.createElement("span",{className:"is-transition "+(n===a?"is-rotate":"")},"↓")),i.a.createElement("div",{className:"scroll-view-root "+(c?"scroll-view-x":"scroll-view-y")+" ",ref:function(e){return t.children=e}},h.map(function(t,e){return i.a.createElement("div",{key:"children"+e,className:c?"scroll-x-item":"scroll-y-item"},t)})),u&&("string"==typeof u?i.a.createElement("p",{className:"pull-up-tip"},u):i.a.createElement("p",{className:"pull-up-tip"},"加载完毕")),r&&i.a.createElement("div",{style:{height:r+"px"}}),!c&&!u&&o&&!n&&i.a.createElement("div",{className:"pull-up-bar",ref:function(e){return e&&(t.pullUpBarHeight=parseFloat(window.getComputedStyle(e).height))}},o===s?i.a.createElement(f,null):i.a.createElement("span",{className:"is-transition "+(o===l?"is-rotate":"")+" "},"↑"))))},e}(o.Component);e.a=p},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(12),a=n(13),l=(n.n(a),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t});var s=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.lazyLoad=o.lazyLoad.bind(o,n.src),o.state={isAnimate:!1},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){this.isScroll(),window.addEventListener("scroll",this.lazyLoad),window.addEventListener("resize",this.lazyLoad)},e.prototype.componentWillUnmount=function(){window.removeEventListener("scroll",this.lazyLoad),window.removeEventListener("resize",this.lazyLoad)},e.prototype.isScroll=function(){document.body.clientHeight<=r.a.clientHeight()&&this.lazyLoad()},e.prototype.lazyLoad=function(t){r.a.availHeight()+r.a.scrollTop()>this.img.offsetTop-100&&!this.img.src&&(this.img.src=t)},e.prototype.render=function(){var t=this,e=this.state.isAnimate,n=Object.assign({},this.props);return i.a.createElement("div",{className:e?"LazyLoadImg":"",style:{opacity:e?1:0}},i.a.createElement("img",l({},n,{alt:"",ref:function(e){t.img=e},onLoad:function(){t.setState({isAnimate:!0})}})))},e}(o.Component);e.a=s},function(t,e,n){"use strict";var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.maxWidth=function(){return Math.min(640,this.clientWidth())},t.documentElement=function(){return document.body.clientWidth+document.body.clientHeight+document.body.scrollWidth+document.body.scrollHeight+document.body.scrollTop>document.documentElement.clientWidth+document.documentElement.clientHeight+document.documentElement.scrollWidth+document.documentElement.scrollHeight+document.documentElement.scrollTop?document.body:document.documentElement},t.rootElement=function(){return document.getElementById("root")},t.availWidth=function(){return window.screen.availWidth},t.availHeight=function(){return window.screen.availHeight},t.scrollHeight=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t.scrollWidth=function(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)},t.scrollTop=function(){return Math.max(document.body.scrollTop,document.documentElement.scrollTop)},t.scrollToTop=function(){window.scrollTo(0,0)},t.setScrollTop=function(t){document.body.scrollTop=t,document.documentElement.scrollTop=t},t.clientHeight=function(){return Math.max(document.body.clientHeight,document.documentElement.clientHeight)},t.clientWidth=function(){return Math.max(document.body.clientWidth,document.documentElement.clientWidth)},t.resetFontSize=function(){var e=t.maxWidth()/7.5;t.fontSize=e,document.documentElement.style.fontSize=e+"px",document.body.style.maxWidth=t.maxWidth()+"px"},t.setInstance=function(e){t.app=e},t.removeInstance=function(){t.app=void 0},t.alert=function(e,n){t.app.setState({alert:{message:e,onClose:function(){t.app.setState({alert:void 0},function(){n&&n()})}}})},t.confirm=function(e,n,o,i){t.app.setState({confirm:{title:e,message:n,onConfirm:function(){t.app.setState({confirm:void 0},function(){o&&o()})},onCancel:function(){t.app.setState({confirm:void 0},function(){i&&i()})}}})},t.loading=function(e,n){t.app.setState({loading:e},function(){n&&n()})},t.isHorizontal=function(){return t.clientWidth()>t.clientHeight()},t}();e.a=o},function(t,e){}]).default}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.Y=e(require("react")):t.Y=e(t.React)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(e,n){e.exports=t},function(t,e,n){"use strict";var o,i,r=n(0),a=n.n(r),l=n(4),s=n(5);n.n(s);var c="left",u="center",h=(o=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));i.call(o);var r=n.left?c:u;return o.interval=n.interval||18,o.state={left:n.left,isScroll:!0,fill:!1,child:null,direction:r},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){var t=this,e=parseFloat(window.getComputedStyle(this.container,null).width),n=e/2;this.setState({rootWidth:e,centre:n,child:this.container.children},function(){return t.checkEl()})},e.prototype.componentWillUnmount=function(){clearInterval(this.timer)},e.prototype.render=function(){var t=this,e=this.state.fill,n=this.props.children;return n=Array.isArray(n)?n:[].concat(n),a.a.createElement("ul",{className:"AutoScrollTab-root",ref:function(e){return t.container=e}},n.map(function(e,n){return a.a.createElement("li",{key:"children"+n,className:"item",onClick:function(){return t.sel(e,n)}},e)}),e&&a.a.createElement("li",{className:"item",style:{width:e+"px"}}))},e}(r.Component),i=function(){var t=this;this.checkEl=function(){for(var e=t.state,n=e.rootWidth,o=e.child,i=0,r=0,a=o.length;r<a;r++)i+=l.a.attr(o[r],"width");if(i>n)return t.fill();t.setState({isScroll:!1})},this.fill=function(){var e=t.state,n=e.rootWidth,o=e.direction,i=e.centre,r=e.child,a=l.a.attr(r[r.length-1],"width"),s=o===u?i-a/2:n-a;t.setState({fill:s})},this.target=function(e){var n=t.state,o=n.direction,i=n.child,r=n.centre,a=i[e],s=a.offsetLeft;return o===u?s+l.a.attr(a,"width")/2>r&&s+l.a.attr(a,"width")/2-r:s},this.sel=function(e,n){var o=t.target(n);console.log("target==>",o),o>=0&&t.animate(o,t.container)},this.animate=function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"scrollLeft";("boolean"!=typeof e||e)&&(clearInterval(t.timer),t.timer=setInterval(function(){var i=(e-n[o])/5;i=i>0?Math.ceil(i):Math.floor(i),n[o]+=i,console.log("进行中"),Math.abs(e-n[o])<=Math.abs(i)&&(clearInterval(t.timer),console.log("清除中"),n[o]=e)},t.interval))}},o);e.a=h},function(t,e,n){t.exports=n(3)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n(1);var o=n(6);n.d(e,"NavBar",function(){return o.a});var i=n(8);n.d(e,"TabContainer",function(){return i.a});var r=n(10);n.d(e,"TabContainerItem",function(){return r.a});var a=n(12);n.d(e,"ScrollView",function(){return a.a});var l=n(14);n.d(e,"LozyLoad",function(){return l.a});var s=n(1);n.d(e,"AutoScrollTab",function(){return s.a})},function(t,e,n){"use strict";var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.attr=function(t,e){return parseFloat(window.getComputedStyle(t,null)[e])||t.getBoundingClientRect()[e]},t}();e.a=o},function(t,e){},function(t,e,n){"use strict";var o,i,r=n(0),a=n.n(r),l=n(7);n.n(l);var s=(o=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));i.call(o);var r=n.data,a=n.children,l=r?r.length:a.length;return o.state={ind:n.index||0,isAnimate:n.isAnimate||!1,onSel:n.onSel,data:n.data,itemWidth:window.screen.width/l,length:l},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){this.setBarWidth()},e.prototype.componentWillReceiveProps=function(t){var e=this,n=t.index,o=t.translate,i=this.state.ind;o&&this.translateBar(o),n>=0&&i!==n&&this.setState({ind:n},function(){return e.setBarWidth()})},e.prototype.render=function(){var t=this,e=this.state,n=e.ind,o=(e.translate,e.newInd,e.onSel,e.length,e.data),i=e.itemWidth,r=this.props,l=r.children,s=r.style;return a.a.createElement("div",{style:s,className:"NavBar-root"},a.a.createElement("div",{className:"container",ref:function(e){t.container=e}},o?o.map(function(e,o){return a.a.createElement("span",{key:"Nav"+o,style:{width:i+"px"},className:"Nav-item "+(o===n&&"active"),onClick:function(){return t.sel(e,o)}},a.a.createElement("span",null,e.name))}):l.map(function(e,o){return a.a.createElement("span",{key:"Nav"+o,style:{width:i+"px"},className:"Nav-item "+(o===n&&"active"),onClick:function(){return t.sel(e,o)}},e)})),a.a.createElement("div",{className:"Nav-active",style:{width:i+"px",transform:"translatex("+n*i+"px)"},ref:function(e){return t.bar=e}},a.a.createElement("div",{className:"Nav-active-bar",ref:function(e){return t.flag=e}})))},e}(r.Component),i=function(){var t=this;this.translateBar=function(e){var n=t.state.length,o=e.distance,i=e.transition;t.bar.style.transition=i?"all 200ms":"none",t.bar.style.transform="translateX("+-o/n+"px)"},this.sel=function(e,n){var o=t.state,i=o.isAnimate,r=o.onSel;t.bar.style.transition=i?"all 200ms":"none",t.setState({ind:n},function(){r&&r(e,n),t.setBarWidth()})},this.setBarWidth=function(){var e=t.state.ind,n=t.container.children,o=(n[e].children.length>=1?n[e].children[0]:n[e]).getBoundingClientRect().width;t.flag.style.width=o+"px"}},o);e.a=s},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(9);n.n(r);var a="left",l="right",s="top",c="down",u=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.slideStart=function(t){o.startX=t.changedTouches[0].pageX,o.startY=t.changedTouches[0].pageY},o.slideMove=function(t){var e=t.changedTouches[0].pageX,n=t.changedTouches[0].pageY,i=e-o.startX,r=n-o.startY,u=i-o.itemWidth*o.index;if(!o.slideDirection||o.slideDirection===l||o.slideDirection===a)if(Math.abs(i)>Math.abs(r)&&i>0)event.preventDefault(),0!==o.index&&o.translate(u),o.slideDirection=l;else if(Math.abs(i)>Math.abs(r)&&i<0)event.preventDefault(),o.index!==o.props.children.length-1&&o.translate(u),o.slideDirection=a;else if(Math.abs(r)>Math.abs(i)&&r>0){if(o.slideDirection)return;o.slideDirection=c}else if(Math.abs(r)>Math.abs(i)&&r<0){if(o.slideDirection)return;o.slideDirection=s}},o.slideEnd=function(t){o.endX=t.changedTouches[0].pageX,o.isTranslate()},o.translate=function(t,e){var n="\n "+(e?"transition: all 200ms;":"")+"\n transform:translateX("+t+"px)\n ";o.container.style=n;var i=o.props.onTranslate;i&&i({distance:t,transition:e})},o.isTranslate=function(){if(o.slideDirection===l||o.slideDirection===a){var t=o.props.onSel,e=o.endX-o.startX,n={right:function(){0!==o.index&&o.index--},left:function(){o.index!==o.props.children.length-1&&o.index++}};Math.abs(e)>=o.interval&&(n[o.slideDirection](),console.log("上下页切换",o.index),t&&t(o.index)),o.translate(-o.index*o.itemWidth,!0)}o.slideDirection=null},o.itemWidth=window.screen.width,o.interval=n.interval||parseInt(o.itemWidth/5),o.index=n.index||0,o.oldIndex=n.index||0,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillReceiveProps=function(t){var e=t.index,n=this.props.onTranslate;this.index!==e&&(this.index=e,n&&n({distance:-this.index*this.itemWidth}),this.container.style.transition=null,this.container.style.transform="translateX("+-e*this.itemWidth+"px)")},e.prototype.componentDidMount=function(){this.translate(-this.index*this.itemWidth),this.root.addEventListener("touchstart",this.slideStart),this.root.addEventListener("touchmove",this.slideMove),this.root.addEventListener("touchend",this.slideEnd)},e.prototype.componentWillUnmount=function(){this.root.removeEventListener("touchstart",this.slideStart),this.root.removeEventListener("touchmove",this.slideMove),this.root.removeEventListener("touchend",this.slideEnd)},e.prototype.render=function(){var t=this;return i.a.createElement("div",{className:"tab-container-root",ref:function(e){t.root=e}},i.a.createElement("ul",{className:"tab-container",ref:function(e){t.container=e}},this.props.children))},e}(o.Component);e.a=u},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(11),a=(n.n(r),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t});var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.render=function(){var t=this,e=Object.assign({},this.props),n=e.style;return n?n.height||(n.height=window.screen.height+"px"):n={height:window.screen.height+"px"},i.a.createElement("li",a({className:"TabContainerItem"},e,{ref:function(e){return t.el=e}}),this.props.children)},e}(o.Component);e.a=l},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(13);n.n(r);var a="top",l="bottom",s="loading",c="touch_top",u="touch_bottom",h=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.handleTouchStart=function(t){o.startY=t.touches[0].clientY},o.handleTouchMove=function(t){var e=o.state,n=e.isPullDown,i=e.isPullUp,r=e.topDistance,h=e.bottomDistance,p=e.isPullDownStatus,d=e.isPullUpStatus,f=e.isLoadOver,m=o.wrap.scrollTop,v=t.touches[0].clientY,y=void 0;o.direction=v-o.startY>0?u:c,n&&o.direction===u&&0===m&&p!==s&&!d?(event.preventDefault(),o.pullDownBarStartY=o.pullDownBarStartY?o.pullDownBarStartY:t.touches[0].clientY,y=(v-o.pullDownBarStartY)/o.limit,o.translate(y,!1),o.setState({isPullDownStatus:y>=r?a:l})):i&&!f&&o.direction===c&&m>=o.bottom&&d!==s&&!p&&(event.preventDefault(),o.pullUpBarStartY=o.pullUpBarStartY?o.pullUpBarStartY:t.touches[0].clientY,y=(v-o.pullUpBarStartY)/o.limit,o.translate(y,!1),o.setState({isPullUpStatus:Math.abs(y)>=h?l:a}))},o.handleTouchEnd=function(t){var e=o.state,n=e.isPullDownStatus,i=e.isPullUpStatus,r=e.topMethod,a=e.bottomMethod,l=e.animateTime;o.pullDownBarStartY=null,o.pullUpBarStartY=null;var c={top:function(){o.translate(),setTimeout(function(){o.setState({isPullUpStatus:null})},l)},bottom:function(){o.setState({isPullUpStatus:s},function(){o.translate(-o.pullUpBarHeight),a&&a()})}};n&&n!==s&&{top:function(){o.setState({isPullDownStatus:s},function(){o.translate(o.pullDownBarHeight),r&&r()})},bottom:function(){o.translate(),setTimeout(function(){o.setState({isPullDownStatus:null})},l)}}[n](),i&&c[i]()},o.fetchData=function(){var t=o.state,e=t.isFetch,n=t.topMethod;t.animateTime;e&&o.setState({isPullDownStatus:s,isPullUpStatus:null},function(){o.translate(o.pullDownBarHeight,!0),n&&n()})},o.scroll=function(){var t=o.state,e=t.onLower,n=t.onUpper,i=t.onScroll,r=t.scrollX,a=t.upperThreshold,l=t.lowerThreshold,s=r?"scrollLeft":"scrollTop",c=r?o.children:o.wrap,u=c[s],h=r?parseFloat(window.getComputedStyle(c,null).width):parseFloat(window.getComputedStyle(c,null).height),p=r?c.scrollWidth-h:c.scrollHeight-h;i&&i({scroll:u}),u<=a?n&&n():u>=p-l&&e&&e()},o.fill=function(t){var e=o.state.wrapHeight,n=parseFloat(window.getComputedStyle(o.children).height);o.wrap.style.height=e+"px",o.setState({fillAttr:n<e&&e-n},function(){o.scrollBottom(),t&&o.setTarget()})},o.setTarget=function(){var t=o.state,e=t.itemIndex,n=t.itemKey,i=t.scrollX;if(e&&n){var r=o.children.children,a=void 0;if(e>=0)a=e;else if(n)for(var l=0;l<o.props.children.length;l++)if(n===o.props.children[l].key){a=l;break}var s=i?o.children:o.wrap;a>=0&&(i?s.scrollLeft=r[a].offsetLeft:s.scrollTop=r[a].offsetTop),setTimeout(function(){s.addEventListener("scroll",o.scroll)},0)}},o.translate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.state,i=n.pullThreshold,r=n.animateTime;Math.abs(t)>i||(o.content.style.transition=e?"all "+r+"ms ease":"none",o.content.style.transform="translate3d(0, "+t+"px,0)")},o.scrollBottom=function(){var t=o.state.fillAttr,e=o.children.scrollHeight,n=parseFloat(window.getComputedStyle(o.wrap).height);o.bottom=t?0:e-n},console.log(n),o.limit=n.limit||4,o.state={isFetch:n.isFetch||!1,isLoadOver:n.isLoadOver,requestState:n.requestState,isPullDown:n.isPullDown||!1,isPullUp:n.isPullUp||!1,topDistance:n.topDistance||50,bottomDistance:n.bottomDistance||50,isPullDownStatus:null,isPullUpStatus:null,topMethod:n.topMethod,bottomMethod:n.bottomMethod,wrapHeight:n.wrapHeight,pullThreshold:n.pullThreshold||200,scrollX:n.scrollX||!1,scrollY:n.scrollY||!1,upperThreshold:n.upperThreshold||50,lowerThreshold:n.lowerThreshold||50,onUpper:n.onUpper,onLower:n.onLower,onScroll:n.onScroll,itemIndex:n.itemIndex>=0&&n.itemIndex,itemKey:n.itemKey||!1,animateTime:n.animateTime||300},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.state,n=e.wrapHeight,o=e.scrollX;this.setState({wrapHeight:!o&&(n||parseFloat(window.getComputedStyle(this.wrap.parentNode).height))},function(){o?t.setTarget():(t.wrap.addEventListener("touchstart",t.handleTouchStart),t.wrap.addEventListener("touchmove",t.handleTouchMove),t.wrap.addEventListener("touchend",t.handleTouchEnd),t.fetchData(),t.fill(!0))})},e.prototype.componentWillReceiveProps=function(t){var e=this,n=t.requestState,o=t.isLoadOver,i=t.itemIndex,r=t.itemKey,a=this.state,l=a.isPullUpStatus,s=a.isPullDownStatus,c=a.animateTime;console.log("scrollveiw nextProps",t,n);var u=function(){0===e.wrap.scrollTop&&e.translate(),setTimeout(function(){e.setState({isPullDownStatus:null},function(){return e.fill()})},c)};n&&(l&&function(){e.translate(),setTimeout(function(){e.setState({isPullUpStatus:null},function(){e.fill()})},c)}(),s&&u()),this.setState({isLoadOver:o}),i>=0?this.state.itemIndex!==i&&this.setState({itemIndex:i},function(){return e.setTarget()}):r&&this.state.itemKey!==r&&this.setState({itemKey:r},function(){return e.setTarget()})},e.prototype.componentWillUnmount=function(){this.wrap.removeEventListener("touchstart",this.handleTouchStart),this.wrap.removeEventListener("touchmove",this.handleTouchMove),this.wrap.removeEventListener("touchend",this.handleTouchEnd),(this.state.scrollX?this.children:this.wrap).removeEventListener("scroll",this.scroll),clearInterval(this.timer)},e.prototype.render=function(){var t=this,e=this.state,n=e.isPullDownStatus,o=e.isPullUpStatus,r=e.fillAttr,c=e.scrollX,u=(e.translate,e.isLoadOver),h=this.props,p=h.style,d=h.children;d=Array.isArray(d)?d:[].concat(d);var f=function(){return i.a.createElement("div",{className:"spinner"},i.a.createElement("div",{className:"bounce1"}),i.a.createElement("div",{className:"bounce2"}),i.a.createElement("div",{className:"bounce3"}))};return i.a.createElement("div",{className:"load-more-root",style:p,ref:function(e){return t.wrap=e}},i.a.createElement("div",{className:"load-more-content",ref:function(e){return t.content=e}},!c&&n&&!o&&i.a.createElement("div",{className:"pull-down-bar",ref:function(e){e&&(t.pullDownBarHeight=parseFloat(window.getComputedStyle(e).height))}},n===s?i.a.createElement(f,null):i.a.createElement("span",{className:"is-transition "+(n===a?"is-rotate":"")},"↓")),i.a.createElement("div",{className:"scroll-view-root "+(c?"scroll-view-x":"scroll-view-y")+" ",ref:function(e){return t.children=e}},d.map(function(t,e){return i.a.createElement("div",{key:"children"+e,className:c?"scroll-x-item":"scroll-y-item"},t)})),u&&("string"==typeof u?i.a.createElement("p",{className:"pull-up-tip"},u):i.a.createElement("p",{className:"pull-up-tip"},"加载完毕")),r&&i.a.createElement("div",{style:{height:r+"px"}}),!c&&!u&&o&&!n&&i.a.createElement("div",{className:"pull-up-bar",ref:function(e){return e&&(t.pullUpBarHeight=parseFloat(window.getComputedStyle(e).height))}},o===s?i.a.createElement(f,null):i.a.createElement("span",{className:"is-transition "+(o===l?"is-rotate":"")+" "},"↑"))))},e}(o.Component);e.a=h},function(t,e){},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(15),a=n(16),l=(n.n(a),Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t});var s=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return o.lazyLoad=o.lazyLoad.bind(o,n.src),o.state={isAnimate:!1},o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidMount=function(){this.isScroll(),window.addEventListener("scroll",this.lazyLoad),window.addEventListener("resize",this.lazyLoad)},e.prototype.componentWillUnmount=function(){window.removeEventListener("scroll",this.lazyLoad),window.removeEventListener("resize",this.lazyLoad)},e.prototype.isScroll=function(){document.body.clientHeight<=r.a.clientHeight()&&this.lazyLoad()},e.prototype.lazyLoad=function(t){r.a.availHeight()+r.a.scrollTop()>this.img.offsetTop-100&&!this.img.src&&(this.img.src=t)},e.prototype.render=function(){var t=this,e=this.state.isAnimate,n=Object.assign({},this.props);return i.a.createElement("div",{className:e?"LazyLoadImg":"",style:{opacity:e?1:0}},i.a.createElement("img",l({},n,{alt:"",ref:function(e){t.img=e},onLoad:function(){t.setState({isAnimate:!0})}})))},e}(o.Component);e.a=s},function(t,e,n){"use strict";var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.maxWidth=function(){return Math.min(640,this.clientWidth())},t.documentElement=function(){return document.body.clientWidth+document.body.clientHeight+document.body.scrollWidth+document.body.scrollHeight+document.body.scrollTop>document.documentElement.clientWidth+document.documentElement.clientHeight+document.documentElement.scrollWidth+document.documentElement.scrollHeight+document.documentElement.scrollTop?document.body:document.documentElement},t.rootElement=function(){return document.getElementById("root")},t.availWidth=function(){return window.screen.availWidth},t.availHeight=function(){return window.screen.availHeight},t.scrollHeight=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t.scrollWidth=function(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth)},t.scrollTop=function(){return Math.max(document.body.scrollTop,document.documentElement.scrollTop)},t.scrollToTop=function(){window.scrollTo(0,0)},t.setScrollTop=function(t){document.body.scrollTop=t,document.documentElement.scrollTop=t},t.clientHeight=function(){return Math.max(document.body.clientHeight,document.documentElement.clientHeight)},t.clientWidth=function(){return Math.max(document.body.clientWidth,document.documentElement.clientWidth)},t.resetFontSize=function(){var e=t.maxWidth()/7.5;t.fontSize=e,document.documentElement.style.fontSize=e+"px",document.body.style.maxWidth=t.maxWidth()+"px"},t.setInstance=function(e){t.app=e},t.removeInstance=function(){t.app=void 0},t.alert=function(e,n){t.app.setState({alert:{message:e,onClose:function(){t.app.setState({alert:void 0},function(){n&&n()})}}})},t.confirm=function(e,n,o,i){t.app.setState({confirm:{title:e,message:n,onConfirm:function(){t.app.setState({confirm:void 0},function(){o&&o()})},onCancel:function(){t.app.setState({confirm:void 0},function(){i&&i()})}}})},t.loading=function(e,n){t.app.setState({loading:e},function(){n&&n()})},t.isHorizontal=function(){return t.clientWidth()>t.clientHeight()},t}();e.a=o},function(t,e){}]).default}); | ||
//# sourceMappingURL=bestnihon-react-components.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
265272
38
4244