@tarojs/components-react 3.5.0-beta.1 → 3.5.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js.map +1 -1
- package/dist/swiper/index.js +15 -8
- package/dist/swiper/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../../../node_modules/classnames/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","window"],"mappings":";;AAAA,SAASA,WAAT,CAAqBC,GAArB,EAA0BC,GAA1B,EAA+B;AAC7B,EAAA,IAAKA,GAAG,KAAK,KAAK,CAAlB,EAAsBA,GAAG,GAAG,EAAN,CAAA;AACtB,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAnB,CAAA;;AAEA,EAAA,IAAI,CAACF,GAAD,IAAQ,OAAOG,QAAP,KAAoB,WAAhC,EAA6C;AAAE,IAAA,OAAA;AAAS,GAAA;;AAExD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAT,IAAiBD,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,CAAA,CAAsC,CAAtC,CAA5B,CAAA;AACA,EAAA,IAAIC,KAAK,GAAGH,QAAQ,CAACI,aAAT,CAAuB,OAAvB,CAAZ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../../../node_modules/classnames/index.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","window"],"mappings":";;AAAA,SAASA,WAAT,CAAqBC,GAArB,EAA0BC,GAA1B,EAA+B;AAC7B,EAAA,IAAKA,GAAG,KAAK,KAAK,CAAlB,EAAsBA,GAAG,GAAG,EAAN,CAAA;AACtB,EAAA,IAAIC,QAAQ,GAAGD,GAAG,CAACC,QAAnB,CAAA;;AAEA,EAAA,IAAI,CAACF,GAAD,IAAQ,OAAOG,QAAP,KAAoB,WAAhC,EAA6C;AAAE,IAAA,OAAA;AAAS,GAAA;;AAExD,EAAA,IAAIC,IAAI,GAAGD,QAAQ,CAACC,IAAT,IAAiBD,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,CAAA,CAAsC,CAAtC,CAA5B,CAAA;AACA,EAAA,IAAIC,KAAK,GAAGH,QAAQ,CAACI,aAAT,CAAuB,OAAvB,CAAZ,CAAA;EACAD,KAAK,CAACE,IAAN,GAAa,UAAb,CAAA;;EAEA,IAAIN,QAAQ,KAAK,KAAjB,EAAwB;IACtB,IAAIE,IAAI,CAACK,UAAT,EAAqB;AACnBL,MAAAA,IAAI,CAACM,YAAL,CAAkBJ,KAAlB,EAAyBF,IAAI,CAACK,UAA9B,CAAA,CAAA;AACD,KAFD,MAEO;MACLL,IAAI,CAACO,WAAL,CAAiBL,KAAjB,CAAA,CAAA;AACD,KAAA;AACF,GAND,MAMO;IACLF,IAAI,CAACO,WAAL,CAAiBL,KAAjB,CAAA,CAAA;AACD,GAAA;;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G,GAAT,IAAgBV,GAAhB,EAAqB;AACpB,cAAA,IAAIP,MAAM,CAACkB,IAAP,CAAYX,GAAZ,EAAiBU,GAAjB,CAAA,IAAyBV,GAAG,CAACU,GAAD,CAAhC,EAAuC;gBACtCd,OAAO,CAACM,IAAR,CAAaQ,GAAb,CAAA,CAAA;AACA,eAAA;AACD,aAAA;AACD,WAND,MAMO;AACNd,YAAAA,OAAO,CAACM,IAAR,CAAaF,GAAG,CAACO,QAAJ,EAAb,CAAA,CAAA;AACA,WAAA;AACD,SAAA;AACD,OAAA;;AAED,MAAA,OAAOX,OAAO,CAACgB,IAAR,CAAa,GAAb,CAAP,CAAA;AACA,KAAA;;AAED,IAAA,IAAqCC,MAAM,CAACC,OAA5C,EAAqD;MACpDnB,UAAU,CAACoB,OAAX,GAAqBpB,UAArB,CAAA;MACAkB,MAAA,CAAAC,OAAA,GAAiBnB,UAAjB,CAAA;AACA,KAHD,MAQO;MACNqB,MAAM,CAACrB,UAAP,GAAoBA,UAApB,CAAA;AACA,KAAA;AACD,GAlDA,GAAD,CAAA;;;;;;;"}
|
package/dist/swiper/index.js
CHANGED
|
@@ -10292,16 +10292,18 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
|
|
|
10292
10292
|
var _this$props = this.props,
|
|
10293
10293
|
_this$props$autoplay = _this$props.autoplay,
|
|
10294
10294
|
autoplay = _this$props$autoplay === void 0 ? false : _this$props$autoplay,
|
|
10295
|
-
_this$props$
|
|
10296
|
-
|
|
10297
|
-
_this$props$duration = _this$props.duration,
|
|
10298
|
-
duration = _this$props$duration === void 0 ? 500 : _this$props$duration,
|
|
10295
|
+
_this$props$circular = _this$props.circular,
|
|
10296
|
+
circular = _this$props$circular === void 0 ? true : _this$props$circular,
|
|
10299
10297
|
_this$props$current = _this$props.current,
|
|
10300
10298
|
current = _this$props$current === void 0 ? 0 : _this$props$current,
|
|
10301
10299
|
_this$props$displayMu = _this$props.displayMultipleItems,
|
|
10302
10300
|
displayMultipleItems = _this$props$displayMu === void 0 ? 1 : _this$props$displayMu,
|
|
10303
|
-
|
|
10304
|
-
|
|
10301
|
+
_this$props$duration = _this$props.duration,
|
|
10302
|
+
duration = _this$props$duration === void 0 ? 500 : _this$props$duration,
|
|
10303
|
+
_this$props$interval = _this$props.interval,
|
|
10304
|
+
interval = _this$props$interval === void 0 ? 5000 : _this$props$interval,
|
|
10305
|
+
spaceBetween = _this$props.spaceBetween,
|
|
10306
|
+
vertical = _this$props.vertical; // eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
10305
10307
|
|
|
10306
10308
|
var that = this;
|
|
10307
10309
|
var opt = {
|
|
@@ -10310,7 +10312,7 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
|
|
|
10310
10312
|
el: ".taro-swiper-".concat(this._id, " > .swiper-container > .swiper-pagination")
|
|
10311
10313
|
},
|
|
10312
10314
|
direction: vertical ? 'vertical' : 'horizontal',
|
|
10313
|
-
loop:
|
|
10315
|
+
loop: circular,
|
|
10314
10316
|
slidesPerView: parseFloat(String(displayMultipleItems)),
|
|
10315
10317
|
initialSlide: parseInt(String(current), 10),
|
|
10316
10318
|
speed: parseInt(String(duration), 10),
|
|
@@ -10358,7 +10360,12 @@ var Swiper = /*#__PURE__*/function (_React$Component2) {
|
|
|
10358
10360
|
|
|
10359
10361
|
if (className.includes('taro_page') && target.style.display !== 'none') {
|
|
10360
10362
|
if (that.props.autoplay && target.contains(_swiper.$el[0])) {
|
|
10361
|
-
|
|
10363
|
+
if (that.props.circular) {
|
|
10364
|
+
_swiper.slideToLoop(this.realIndex, 0); // 更新下标
|
|
10365
|
+
|
|
10366
|
+
} else {
|
|
10367
|
+
_swiper.slideTo(this.realIndex);
|
|
10368
|
+
}
|
|
10362
10369
|
}
|
|
10363
10370
|
}
|
|
10364
10371
|
}
|