@tarojs/components-react 4.0.0-alpha.3 → 4.0.0-alpha.30
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/LICENSE +8 -8
- package/dist/components/button/index.js +71 -68
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/icon/index.js +16 -8
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/image/index.js +64 -67
- package/dist/components/image/index.js.map +1 -1
- package/dist/components/input/index.js +14 -9
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/pull-down-refresh/index.js +30 -18
- package/dist/components/pull-down-refresh/index.js.map +1 -1
- package/dist/components/scroll-view/index.js +102 -104
- package/dist/components/scroll-view/index.js.map +1 -1
- package/dist/components/swiper/index.js +48 -30
- package/dist/components/swiper/index.js.map +1 -1
- package/dist/components/text/index.js +21 -17
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/view/index.js +74 -77
- package/dist/components/view/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/solid/components/button/index.js +95 -0
- package/dist/solid/components/button/index.js.map +1 -0
- package/dist/solid/components/button/style/index.scss.js +4 -0
- package/dist/solid/components/button/style/index.scss.js.map +1 -0
- package/dist/solid/components/icon/index.js +39 -0
- package/dist/solid/components/icon/index.js.map +1 -0
- package/dist/solid/components/icon/style/index.scss.js +4 -0
- package/dist/solid/components/icon/style/index.scss.js.map +1 -0
- package/dist/solid/components/image/index.js +94 -0
- package/dist/solid/components/image/index.js.map +1 -0
- package/dist/solid/components/image/style/index.css.js +4 -0
- package/dist/solid/components/image/style/index.css.js.map +1 -0
- package/dist/solid/components/input/index.js +256 -0
- package/dist/solid/components/input/index.js.map +1 -0
- package/dist/solid/components/input/style/index.scss.js +4 -0
- package/dist/solid/components/input/style/index.scss.js.map +1 -0
- package/dist/solid/components/pull-down-refresh/index.js +334 -0
- package/dist/solid/components/pull-down-refresh/index.js.map +1 -0
- package/dist/solid/components/pull-down-refresh/style/index.css.js +4 -0
- package/dist/solid/components/pull-down-refresh/style/index.css.js.map +1 -0
- package/dist/solid/components/scroll-view/index.js +188 -0
- package/dist/solid/components/scroll-view/index.js.map +1 -0
- package/dist/solid/components/scroll-view/style/index.css.js +4 -0
- package/dist/solid/components/scroll-view/style/index.css.js.map +1 -0
- package/dist/solid/components/swiper/index.js +307 -0
- package/dist/solid/components/swiper/index.js.map +1 -0
- package/dist/solid/components/swiper/style/index.css.js +4 -0
- package/dist/solid/components/swiper/style/index.css.js.map +1 -0
- package/dist/solid/components/text/index.js +32 -0
- package/dist/solid/components/text/index.js.map +1 -0
- package/dist/solid/components/text/style/index.css.js +4 -0
- package/dist/solid/components/text/style/index.css.js.map +1 -0
- package/dist/solid/components/view/index.js +89 -0
- package/dist/solid/components/view/index.js.map +1 -0
- package/dist/solid/components/view/style/index.css.js +4 -0
- package/dist/solid/components/view/style/index.css.js.map +1 -0
- package/dist/solid/index.css +1 -0
- package/dist/solid/index.js +13 -0
- package/dist/solid/index.js.map +1 -0
- package/dist/solid/utils/hooks.js +55 -0
- package/dist/solid/utils/hooks.js.map +1 -0
- package/dist/solid/utils/index.js +58 -0
- package/dist/solid/utils/index.js.map +1 -0
- package/dist/utils/hooks.js +55 -0
- package/dist/utils/hooks.js.map +1 -0
- package/dist/utils/index.js +12 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +17 -16
|
@@ -2,9 +2,10 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import 'swiper/swiper-bundle.min.css';
|
|
3
3
|
import './style/index.css.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import
|
|
5
|
+
import React__default from 'react';
|
|
6
6
|
import Swipers from 'swiper/swiper-bundle.esm.js';
|
|
7
|
-
import { debounce } from '../../utils/index.js';
|
|
7
|
+
import { debounce, createForwardRefComponent } from '../../utils/index.js';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
let INSTANCE_ID = 0;
|
|
10
11
|
const createEvent = type => {
|
|
@@ -17,25 +18,33 @@ const createEvent = type => {
|
|
|
17
18
|
}
|
|
18
19
|
return e;
|
|
19
20
|
};
|
|
20
|
-
class
|
|
21
|
+
class SwiperItemInner extends React__default.Component {
|
|
21
22
|
render() {
|
|
22
23
|
const _a = this.props,
|
|
23
24
|
{
|
|
24
25
|
className,
|
|
25
26
|
style,
|
|
26
27
|
itemId,
|
|
27
|
-
children
|
|
28
|
+
children,
|
|
29
|
+
forwardedRef
|
|
28
30
|
} = _a,
|
|
29
|
-
restProps = __rest(_a, ["className", "style", "itemId", "children"]);
|
|
31
|
+
restProps = __rest(_a, ["className", "style", "itemId", "children", "forwardedRef"]);
|
|
30
32
|
const cls = classNames('swiper-slide', className);
|
|
31
|
-
return
|
|
33
|
+
return /*#__PURE__*/jsx("div", {
|
|
34
|
+
ref: e => {
|
|
35
|
+
if (e && forwardedRef) {
|
|
36
|
+
forwardedRef.current = e;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
32
39
|
className: cls,
|
|
33
40
|
style: style,
|
|
34
|
-
"item-id": itemId
|
|
35
|
-
|
|
41
|
+
"item-id": itemId,
|
|
42
|
+
...restProps,
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
36
45
|
}
|
|
37
46
|
}
|
|
38
|
-
class
|
|
47
|
+
class SwiperInner extends React__default.Component {
|
|
39
48
|
constructor() {
|
|
40
49
|
super(...arguments);
|
|
41
50
|
this._id = 1 + INSTANCE_ID++;
|
|
@@ -174,7 +183,6 @@ class Swiper extends React.Component {
|
|
|
174
183
|
} else {
|
|
175
184
|
this.mySwiper.slideTo(parseInt(nextCurrent, 10) + 1); // 更新下标
|
|
176
185
|
}
|
|
177
|
-
|
|
178
186
|
const autoplay = this.mySwiper.autoplay;
|
|
179
187
|
// 判断是否需要停止或开始自动轮播
|
|
180
188
|
if (autoplay.running !== nextProps.autoplay) {
|
|
@@ -191,7 +199,6 @@ class Swiper extends React.Component {
|
|
|
191
199
|
this.mySwiper.update(); // 更新子元素
|
|
192
200
|
}
|
|
193
201
|
}
|
|
194
|
-
|
|
195
202
|
componentDidUpdate(preProps) {
|
|
196
203
|
if (preProps.children.length === 0 && this.props.children.length > 0) {
|
|
197
204
|
this.mySwiper.loopDestroy();
|
|
@@ -234,7 +241,8 @@ class Swiper extends React.Component {
|
|
|
234
241
|
previousMargin,
|
|
235
242
|
nextMargin,
|
|
236
243
|
indicatorColor,
|
|
237
|
-
indicatorActiveColor
|
|
244
|
+
indicatorActiveColor,
|
|
245
|
+
forwardedRef
|
|
238
246
|
} = this.props;
|
|
239
247
|
const defaultIndicatorColor = indicatorColor || 'rgba(0, 0, 0, .3)';
|
|
240
248
|
const defaultIndicatorActiveColor = indicatorActiveColor || '#000';
|
|
@@ -250,31 +258,41 @@ class Swiper extends React.Component {
|
|
|
250
258
|
'swiper-pagination-hidden': !this.props.indicatorDots,
|
|
251
259
|
'swiper-pagination-bullets': this.props.indicatorDots
|
|
252
260
|
});
|
|
253
|
-
return
|
|
261
|
+
return /*#__PURE__*/jsx("div", {
|
|
254
262
|
className: `swiper-container-wrapper ${cls}`,
|
|
255
|
-
style: sty
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
263
|
+
style: sty,
|
|
264
|
+
ref: e => {
|
|
265
|
+
if (forwardedRef && e) {
|
|
266
|
+
forwardedRef.current = e;
|
|
267
|
+
}
|
|
260
268
|
},
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
269
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
270
|
+
className: "swiper-container",
|
|
271
|
+
style: {
|
|
272
|
+
overflow: 'visible'
|
|
273
|
+
},
|
|
274
|
+
ref: el => {
|
|
275
|
+
this.$el = el;
|
|
276
|
+
},
|
|
277
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
278
|
+
dangerouslySetInnerHTML: {
|
|
279
|
+
__html: `<style type='text/css'>
|
|
267
280
|
.taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${defaultIndicatorColor} }
|
|
268
281
|
.taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${defaultIndicatorActiveColor} }
|
|
269
282
|
</style>`
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
283
|
+
}
|
|
284
|
+
}), /*#__PURE__*/jsx("div", {
|
|
285
|
+
className: "swiper-wrapper",
|
|
286
|
+
children: this.props.children
|
|
287
|
+
}), /*#__PURE__*/jsx("div", {
|
|
288
|
+
className: paginationCls
|
|
289
|
+
})]
|
|
290
|
+
})
|
|
291
|
+
});
|
|
276
292
|
}
|
|
277
293
|
}
|
|
294
|
+
const Swiper = createForwardRefComponent(SwiperInner);
|
|
295
|
+
const SwiperItem = createForwardRefComponent(SwiperItemInner);
|
|
278
296
|
|
|
279
297
|
export { Swiper, SwiperItem };
|
|
280
298
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/swiper/index.tsx"],"sourcesContent":["import 'swiper/swiper-bundle.min.css'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\nimport Swipers from 'swiper/swiper-bundle.esm.js'\n\nimport { debounce } from '../../utils'\n\nimport type ISwiper from 'swiper'\n\nlet INSTANCE_ID = 0\n\ninterface SwiperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n itemId: string\n}\n\ninterface SwiperProps extends React.HTMLAttributes<HTMLDivElement> {\n autoplay?: boolean\n interval?: number\n duration?: number\n current?: number\n displayMultipleItems?: number\n circular?: boolean\n vertical?: boolean\n spaceBetween?: any\n previousMargin?: string\n nextMargin?: string\n indicatorColor?: string\n indicatorActiveColor?: string\n indicatorDots?: boolean\n onAnimationFinish?: (e: TouchEvent) => void\n}\n\nconst createEvent = (type: string) => {\n let e\n try {\n e = new TouchEvent(type)\n } catch (err) {\n e = document.createEvent('Event')\n e.initEvent(type, true, true)\n }\n return e\n}\n\nclass SwiperItem extends React.Component<SwiperItemProps, Record<string, unknown>> {\n render () {\n const { className, style, itemId, children, ...restProps } = this.props\n const cls = classNames('swiper-slide', className)\n return (\n <div\n className={cls}\n style={style}\n item-id={itemId}\n {...restProps}\n >\n {children}\n </div>\n )\n }\n}\n\nclass Swiper extends React.Component<SwiperProps, Record<string, unknown>> {\n _id = 1 + INSTANCE_ID++\n _$current = 0\n _$width = 0\n _$height = 0\n $el: HTMLDivElement | null\n mySwiper: ISwiper\n observer: MutationObserver\n observerFirst: MutationObserver\n observerLast: MutationObserver\n\n componentDidMount () {\n const {\n autoplay = false,\n circular = true,\n current = 0,\n displayMultipleItems = 1,\n duration = 500,\n interval = 5000,\n spaceBetween,\n vertical\n } = this.props\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this\n const opt: Record<string, any> = {\n // 指示器\n pagination: { el: `.taro-swiper-${this._id} > .swiper-container > .swiper-pagination` },\n direction: vertical ? 'vertical' : 'horizontal',\n loop: circular,\n slidesPerView: parseFloat(String(displayMultipleItems)),\n initialSlide: parseInt(String(current), 10),\n speed: parseInt(String(duration), 10),\n observer: true,\n observeParents: true,\n on: {\n slideChange () {\n const e = createEvent('touchend')\n try {\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n value: {\n current: this.realIndex\n }\n })\n } catch (err) {} // eslint-disable-line no-empty\n that._$current = this.realIndex\n that.handleOnChange(e)\n },\n transitionEnd () {\n const e = createEvent('touchend')\n try {\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n value: {\n current: this.mySwiper.realIndex\n }\n })\n if (this.mySwiper.isBeginning) {\n this.mySwiper.slideToLoop((this.props.children as any).length - 1, 0)\n } else if (this.mySwiper.isEnd) {\n this.mySwiper.slideToLoop(0, 0)\n }\n } catch (err) {} // eslint-disable-line no-empty\n that.handleOnAnimationFinish(e)\n },\n observerUpdate (_swiper: ISwiper, e) {\n const target = e.target\n const className = target && typeof target.className === 'string' ? target.className : ''\n if (className.includes('taro_page') && target.style.display !== 'none') {\n if (that.props.autoplay && target.contains(_swiper.$el[0])) {\n if (that.props.circular) {\n _swiper.slideToLoop(this.realIndex, 0) // 更新下标\n } else {\n _swiper.slideTo(this.realIndex)\n }\n }\n }\n }\n }\n }\n\n // 自动播放\n if (autoplay) {\n opt.autoplay = {\n delay: parseInt(String(interval), 10),\n disableOnInteraction: false\n }\n }\n\n // 两端距离\n if (spaceBetween) {\n opt.spaceBetween = spaceBetween\n }\n\n this.mySwiper = new Swipers(this.$el!, opt)\n setTimeout(() => {\n this.mySwiper.update()\n }, 500)\n\n if (!this.mySwiper || !this.props.circular) return\n\n const wrapper = this.mySwiper.$wrapperEl[0]\n this.observer = new MutationObserver(this.handleSwiperLoopListen)\n\n this.observer.observe(wrapper, {\n childList: true\n })\n }\n\n UNSAFE_componentWillReceiveProps (nextProps) {\n if (this.mySwiper) {\n const nextCurrent = typeof nextProps.current === 'number' ? nextProps.current : this._$current || 0\n\n this.handleSwiperLoop()\n // 是否衔接滚动模式\n if (nextProps.circular) {\n if (!this.mySwiper.isBeginning && !this.mySwiper.isEnd) {\n this.mySwiper.slideToLoop(parseInt(nextCurrent, 10)) // 更新下标\n }\n } else {\n this.mySwiper.slideTo(parseInt(nextCurrent, 10) + 1) // 更新下标\n }\n\n const autoplay = this.mySwiper.autoplay\n // 判断是否需要停止或开始自动轮播\n if (autoplay.running !== nextProps.autoplay) {\n if (nextProps.autoplay) {\n if (typeof this.mySwiper.params.autoplay === 'object') {\n this.mySwiper.params.autoplay.disableOnInteraction = false\n this.mySwiper.params.autoplay.delay = parseInt(String(this.props.interval) || '3000', 10)\n }\n autoplay.start()\n } else {\n autoplay.stop()\n }\n }\n\n this.mySwiper.update() // 更新子元素\n }\n }\n\n componentDidUpdate (preProps) {\n if (preProps.children.length === 0 && (this.props.children as any).length > 0) {\n (this.mySwiper as any).loopDestroy()\n ;(this.mySwiper as any).loopCreate()\n }\n if (!this.mySwiper) return\n if (this.props.autoplay) {\n if (this._$width !== this.mySwiper.width || this._$height !== this.mySwiper.height) {\n this.mySwiper.autoplay.start()\n }\n }\n this._$width = this.mySwiper.width\n this._$height = this.mySwiper.height\n }\n\n componentWillUnmount () {\n this.$el = null\n if (this.mySwiper) this.mySwiper.destroy()\n this.observer?.disconnect?.()\n this.observerFirst?.disconnect?.()\n this.observerLast?.disconnect?.()\n }\n\n handleOnChange (e: React.FormEvent<HTMLDivElement>) {\n const func = this.props.onChange\n typeof func === 'function' && func(e)\n }\n\n handleOnAnimationFinish (e: TouchEvent) {\n const func = this.props.onAnimationFinish\n typeof func === 'function' && func(e)\n }\n\n parsePX (s = '0px') {\n return parseFloat(s.replace(/r*px/i, ''))\n }\n\n handleSwiperLoopListen = () => {\n this.observerFirst?.disconnect?.()\n this.observerLast?.disconnect?.()\n this.observerFirst = new MutationObserver(this.handleSwiperLoop)\n this.observerLast = new MutationObserver(this.handleSwiperLoop)\n const wrapper = this.mySwiper.$wrapperEl[0]\n const list = wrapper.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)')\n if (list.length >= 1) {\n this.observerFirst.observe(list[0], {\n characterData: true\n })\n } else if (list.length >= 2) {\n this.observerLast.observe(list[list.length - 1], {\n characterData: true\n })\n }\n }\n\n handleSwiperLoop = debounce(() => {\n if (this.mySwiper && this.mySwiper.$wrapperEl && this.props.circular) {\n // @ts-ignore\n this.mySwiper.loopDestroy()\n // @ts-ignore\n this.mySwiper.loopCreate()\n }\n }, 500)\n\n render () {\n const {\n className,\n style,\n vertical,\n previousMargin,\n nextMargin,\n indicatorColor,\n indicatorActiveColor\n } = this.props\n const defaultIndicatorColor = indicatorColor || 'rgba(0, 0, 0, .3)'\n const defaultIndicatorActiveColor = indicatorActiveColor || '#000'\n const cls = classNames(`taro-swiper-${this._id}`, className)\n const sty = Object.assign({\n paddingTop: vertical ? this.parsePX(previousMargin) : 0,\n paddingRight: vertical ? 0 : this.parsePX(nextMargin),\n paddingBottom: vertical ? this.parsePX(nextMargin) : 0,\n paddingLeft: vertical ? 0 : this.parsePX(previousMargin),\n overflow: 'hidden'\n }, style)\n const paginationCls = classNames(\n 'swiper-pagination',\n {\n 'swiper-pagination-hidden': !this.props.indicatorDots,\n 'swiper-pagination-bullets': this.props.indicatorDots\n }\n )\n return (\n <div className={`swiper-container-wrapper ${cls}`} style={sty}>\n <div className='swiper-container' style={{ overflow: 'visible' }} ref={(el) => { this.$el = el }}>\n <div\n dangerouslySetInnerHTML={{\n __html: `<style type='text/css'>\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${defaultIndicatorColor} }\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${defaultIndicatorActiveColor} }\n </style>`\n }}\n />\n <div className='swiper-wrapper'>{this.props.children}</div>\n <div className={paginationCls} />\n </div>\n </div>\n )\n }\n}\n\nexport { Swiper, SwiperItem }\n"],"names":["INSTANCE_ID","createEvent","type","e","TouchEvent","err","document","initEvent","SwiperItem","React","Component","render","_a","props","className","style","itemId","children","restProps","__rest","cls","classNames","createElement","Object","assign","Swiper","constructor","_id","_$current","_$width","_$height","handleSwiperLoopListen","_b","observerFirst","disconnect","_d","observerLast","_c","MutationObserver","handleSwiperLoop","wrapper","mySwiper","$wrapperEl","list","querySelectorAll","length","observe","characterData","debounce","circular","loopDestroy","loopCreate","componentDidMount","autoplay","current","displayMultipleItems","duration","interval","spaceBetween","vertical","that","opt","pagination","el","direction","loop","slidesPerView","parseFloat","String","initialSlide","parseInt","speed","observer","observeParents","on","slideChange","defineProperty","enumerable","value","realIndex","handleOnChange","transitionEnd","isBeginning","slideToLoop","isEnd","handleOnAnimationFinish","observerUpdate","_swiper","target","includes","display","contains","$el","slideTo","delay","disableOnInteraction","Swipers","setTimeout","update","childList","UNSAFE_componentWillReceiveProps","nextProps","nextCurrent","running","params","start","stop","componentDidUpdate","preProps","width","height","componentWillUnmount","destroy","_f","_e","func","onChange","onAnimationFinish","parsePX","s","arguments","undefined","replace","previousMargin","nextMargin","indicatorColor","indicatorActiveColor","defaultIndicatorColor","defaultIndicatorActiveColor","sty","paddingTop","paddingRight","paddingBottom","paddingLeft","overflow","paginationCls","indicatorDots","ref","dangerouslySetInnerHTML","__html"],"mappings":";;;;;;;;AAWA,IAAIA,WAAW,GAAG,CAAC,CAAA;AAuBnB,MAAMC,WAAW,GAAIC,IAAY,IAAI;AACnC,EAAA,IAAIC,CAAC,CAAA;EACL,IAAI;AACFA,IAAAA,CAAC,GAAG,IAAIC,UAAU,CAACF,IAAI,CAAC,CAAA;GACzB,CAAC,OAAOG,GAAG,EAAE;AACZF,IAAAA,CAAC,GAAGG,QAAQ,CAACL,WAAW,CAAC,OAAO,CAAC,CAAA;IACjCE,CAAC,CAACI,SAAS,CAACL,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAC9B,GAAA;AACD,EAAA,OAAOC,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAMK,UAAW,SAAQC,KAAK,CAACC,SAAmD,CAAA;AAChFC,EAAAA,MAAMA,GAAA;AACJ,IAAA,MAAMC,KAAuD,IAAI,CAACC,KAAK;AAAjE,MAAA;QAAEC,SAAS;QAAEC,KAAK;QAAEC,MAAM;AAAEC,QAAAA,QAAAA;AAAqC,OAAA,GAAAL,EAAA;AAAxBM,MAAAA,SAAS,GAAlDC,MAAA,CAAAP,EAAA,EAAA,CAAA,WAAA,EAAA,OAAA,EAAA,QAAA,EAAA,UAAA,CAAoD,CAAa,CAAA;AACvE,IAAA,MAAMQ,GAAG,GAAGC,UAAU,CAAC,cAAc,EAAEP,SAAS,CAAC,CAAA;IACjD,OACEL,KACE,CAAAa,aAAA,CAAA,KAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA;AAAAV,MAAAA,SAAS,EAAEM,GAAG;AACdL,MAAAA,KAAK,EAAEA,KAAK;AAAA,MAAA,SAAA,EACHC,MAAAA;AACL,KAA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,CAAA;;AAEX,KAAA,CAAA,EACFvH,KAAK,CAAAa,aAAA,CAAA,KAAA,EAAA;AAAAR,MAAAA,SAAS,EAAC,gBAAA;AAAgB,KAAA,EAAE,IAAI,CAACD,KAAK,CAACI,QAAQ,CAAO,EAC3DR,KAAA,CAAAa,aAAA,CAAA,KAAA,EAAA;AAAKR,MAAAA,SAAS,EAAEyH,aAAAA;MAAiB,CAC7B,CACF,CAAA;AAEV,GAAA;AACD;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/swiper/index.tsx"],"sourcesContent":["import 'swiper/swiper-bundle.min.css'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\nimport Swipers from 'swiper/swiper-bundle.esm.js'\n\nimport { createForwardRefComponent, debounce } from '../../utils'\n\nimport type ISwiper from 'swiper'\n\nlet INSTANCE_ID = 0\n\ninterface SwiperItemProps extends React.HTMLAttributes<HTMLDivElement> {\n itemId: string\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\ninterface SwiperProps extends React.HTMLAttributes<HTMLDivElement> {\n autoplay?: boolean\n interval?: number\n duration?: number\n current?: number\n displayMultipleItems?: number\n circular?: boolean\n vertical?: boolean\n spaceBetween?: any\n previousMargin?: string\n nextMargin?: string\n indicatorColor?: string\n indicatorActiveColor?: string\n indicatorDots?: boolean\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n onAnimationFinish?: (e: TouchEvent) => void\n}\n\nconst createEvent = (type: string) => {\n let e\n try {\n e = new TouchEvent(type)\n } catch (err) {\n e = document.createEvent('Event')\n e.initEvent(type, true, true)\n }\n return e\n}\n\nclass SwiperItemInner extends React.Component<SwiperItemProps, Record<string, unknown>> {\n render () {\n const { className, style, itemId, children, forwardedRef, ...restProps } = this.props\n const cls = classNames('swiper-slide', className)\n return (\n <div\n ref={(e) => {\n if (e && forwardedRef) {\n forwardedRef.current = e\n }\n }}\n className={cls}\n style={style}\n item-id={itemId}\n {...restProps}\n >\n {children}\n </div>\n )\n }\n}\n\nclass SwiperInner extends React.Component<SwiperProps, Record<string, unknown>> {\n _id = 1 + INSTANCE_ID++\n _$current = 0\n _$width = 0\n _$height = 0\n $el: HTMLDivElement | null\n mySwiper: ISwiper\n observer: MutationObserver\n observerFirst: MutationObserver\n observerLast: MutationObserver\n\n componentDidMount () {\n const {\n autoplay = false,\n circular = true,\n current = 0,\n displayMultipleItems = 1,\n duration = 500,\n interval = 5000,\n spaceBetween,\n vertical\n } = this.props\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this\n const opt: Record<string, any> = {\n // 指示器\n pagination: { el: `.taro-swiper-${this._id} > .swiper-container > .swiper-pagination` },\n direction: vertical ? 'vertical' : 'horizontal',\n loop: circular,\n slidesPerView: parseFloat(String(displayMultipleItems)),\n initialSlide: parseInt(String(current), 10),\n speed: parseInt(String(duration), 10),\n observer: true,\n observeParents: true,\n on: {\n slideChange () {\n const e = createEvent('touchend')\n try {\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n value: {\n current: this.realIndex\n }\n })\n } catch (err) {} // eslint-disable-line no-empty\n that._$current = this.realIndex\n that.handleOnChange(e)\n },\n transitionEnd () {\n const e = createEvent('touchend')\n try {\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n value: {\n current: this.mySwiper.realIndex\n }\n })\n if (this.mySwiper.isBeginning) {\n this.mySwiper.slideToLoop((this.props.children as any).length - 1, 0)\n } else if (this.mySwiper.isEnd) {\n this.mySwiper.slideToLoop(0, 0)\n }\n } catch (err) {} // eslint-disable-line no-empty\n that.handleOnAnimationFinish(e)\n },\n observerUpdate (_swiper: ISwiper, e) {\n const target = e.target\n const className = target && typeof target.className === 'string' ? target.className : ''\n if (className.includes('taro_page') && target.style.display !== 'none') {\n if (that.props.autoplay && target.contains(_swiper.$el[0])) {\n if (that.props.circular) {\n _swiper.slideToLoop(this.realIndex, 0) // 更新下标\n } else {\n _swiper.slideTo(this.realIndex)\n }\n }\n }\n }\n }\n }\n\n // 自动播放\n if (autoplay) {\n opt.autoplay = {\n delay: parseInt(String(interval), 10),\n disableOnInteraction: false\n }\n }\n\n // 两端距离\n if (spaceBetween) {\n opt.spaceBetween = spaceBetween\n }\n\n this.mySwiper = new Swipers(this.$el!, opt)\n setTimeout(() => {\n this.mySwiper.update()\n }, 500)\n\n if (!this.mySwiper || !this.props.circular) return\n\n const wrapper = this.mySwiper.$wrapperEl[0]\n this.observer = new MutationObserver(this.handleSwiperLoopListen)\n\n this.observer.observe(wrapper, {\n childList: true\n })\n }\n\n UNSAFE_componentWillReceiveProps (nextProps) {\n if (this.mySwiper) {\n const nextCurrent = typeof nextProps.current === 'number' ? nextProps.current : this._$current || 0\n\n this.handleSwiperLoop()\n // 是否衔接滚动模式\n if (nextProps.circular) {\n if (!this.mySwiper.isBeginning && !this.mySwiper.isEnd) {\n this.mySwiper.slideToLoop(parseInt(nextCurrent, 10)) // 更新下标\n }\n } else {\n this.mySwiper.slideTo(parseInt(nextCurrent, 10) + 1) // 更新下标\n }\n\n const autoplay = this.mySwiper.autoplay\n // 判断是否需要停止或开始自动轮播\n if (autoplay.running !== nextProps.autoplay) {\n if (nextProps.autoplay) {\n if (typeof this.mySwiper.params.autoplay === 'object') {\n this.mySwiper.params.autoplay.disableOnInteraction = false\n this.mySwiper.params.autoplay.delay = parseInt(String(this.props.interval) || '3000', 10)\n }\n autoplay.start()\n } else {\n autoplay.stop()\n }\n }\n\n this.mySwiper.update() // 更新子元素\n }\n }\n\n componentDidUpdate (preProps) {\n if (preProps.children.length === 0 && (this.props.children as any).length > 0) {\n (this.mySwiper as any).loopDestroy()\n ;(this.mySwiper as any).loopCreate()\n }\n if (!this.mySwiper) return\n if (this.props.autoplay) {\n if (this._$width !== this.mySwiper.width || this._$height !== this.mySwiper.height) {\n this.mySwiper.autoplay.start()\n }\n }\n this._$width = this.mySwiper.width\n this._$height = this.mySwiper.height\n }\n\n componentWillUnmount () {\n this.$el = null\n if (this.mySwiper) this.mySwiper.destroy()\n this.observer?.disconnect?.()\n this.observerFirst?.disconnect?.()\n this.observerLast?.disconnect?.()\n }\n\n handleOnChange (e: React.FormEvent<HTMLDivElement>) {\n const func = this.props.onChange\n typeof func === 'function' && func(e)\n }\n\n handleOnAnimationFinish (e: TouchEvent) {\n const func = this.props.onAnimationFinish\n typeof func === 'function' && func(e)\n }\n\n parsePX (s = '0px') {\n return parseFloat(s.replace(/r*px/i, ''))\n }\n\n handleSwiperLoopListen = () => {\n this.observerFirst?.disconnect?.()\n this.observerLast?.disconnect?.()\n this.observerFirst = new MutationObserver(this.handleSwiperLoop)\n this.observerLast = new MutationObserver(this.handleSwiperLoop)\n const wrapper = this.mySwiper.$wrapperEl[0]\n const list = wrapper.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)')\n if (list.length >= 1) {\n this.observerFirst.observe(list[0], {\n characterData: true\n })\n } else if (list.length >= 2) {\n this.observerLast.observe(list[list.length - 1], {\n characterData: true\n })\n }\n }\n\n handleSwiperLoop = debounce(() => {\n if (this.mySwiper && this.mySwiper.$wrapperEl && this.props.circular) {\n // @ts-ignore\n this.mySwiper.loopDestroy()\n // @ts-ignore\n this.mySwiper.loopCreate()\n }\n }, 500)\n\n render () {\n const {\n className,\n style,\n vertical,\n previousMargin,\n nextMargin,\n indicatorColor,\n indicatorActiveColor,\n forwardedRef\n } = this.props\n const defaultIndicatorColor = indicatorColor || 'rgba(0, 0, 0, .3)'\n const defaultIndicatorActiveColor = indicatorActiveColor || '#000'\n const cls = classNames(`taro-swiper-${this._id}`, className)\n const sty = Object.assign({\n paddingTop: vertical ? this.parsePX(previousMargin) : 0,\n paddingRight: vertical ? 0 : this.parsePX(nextMargin),\n paddingBottom: vertical ? this.parsePX(nextMargin) : 0,\n paddingLeft: vertical ? 0 : this.parsePX(previousMargin),\n overflow: 'hidden'\n }, style)\n const paginationCls = classNames(\n 'swiper-pagination',\n {\n 'swiper-pagination-hidden': !this.props.indicatorDots,\n 'swiper-pagination-bullets': this.props.indicatorDots\n }\n )\n return (\n <div className={`swiper-container-wrapper ${cls}`} style={sty} ref={(e) => {\n if (forwardedRef && e) {\n forwardedRef.current = e\n }\n }}>\n <div className='swiper-container' style={{ overflow: 'visible' }} ref={(el) => { this.$el = el }}>\n <div\n dangerouslySetInnerHTML={{\n __html: `<style type='text/css'>\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${defaultIndicatorColor} }\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${defaultIndicatorActiveColor} }\n </style>`\n }}\n />\n <div className='swiper-wrapper'>{this.props.children}</div>\n <div className={paginationCls} />\n </div>\n </div>\n )\n }\n}\n\nexport const Swiper = createForwardRefComponent(SwiperInner)\nexport const SwiperItem = createForwardRefComponent(SwiperItemInner)\n"],"names":["INSTANCE_ID","createEvent","type","e","TouchEvent","err","document","initEvent","SwiperItemInner","React","Component","render","_a","props","className","style","itemId","children","forwardedRef","restProps","__rest","cls","classNames","_jsx","ref","current","SwiperInner","constructor","_id","_$current","_$width","_$height","handleSwiperLoopListen","_b","observerFirst","disconnect","_d","observerLast","_c","MutationObserver","handleSwiperLoop","wrapper","mySwiper","$wrapperEl","list","querySelectorAll","length","observe","characterData","debounce","circular","loopDestroy","loopCreate","componentDidMount","autoplay","displayMultipleItems","duration","interval","spaceBetween","vertical","that","opt","pagination","el","direction","loop","slidesPerView","parseFloat","String","initialSlide","parseInt","speed","observer","observeParents","on","slideChange","Object","defineProperty","enumerable","value","realIndex","handleOnChange","transitionEnd","isBeginning","slideToLoop","isEnd","handleOnAnimationFinish","observerUpdate","_swiper","target","includes","display","contains","$el","slideTo","delay","disableOnInteraction","Swipers","setTimeout","update","childList","UNSAFE_componentWillReceiveProps","nextProps","nextCurrent","running","params","start","stop","componentDidUpdate","preProps","width","height","componentWillUnmount","destroy","_f","_e","func","onChange","onAnimationFinish","parsePX","s","arguments","undefined","replace","previousMargin","nextMargin","indicatorColor","indicatorActiveColor","defaultIndicatorColor","defaultIndicatorActiveColor","sty","assign","paddingTop","paddingRight","paddingBottom","paddingLeft","overflow","paginationCls","indicatorDots","_jsxs","dangerouslySetInnerHTML","__html","Swiper","createForwardRefComponent","SwiperItem"],"mappings":";;;;;;;;;AAWA,IAAIA,WAAW,GAAG,CAAC,CAAA;AAyBnB,MAAMC,WAAW,GAAIC,IAAY,IAAI;AACnC,EAAA,IAAIC,CAAC,CAAA;EACL,IAAI;AACFA,IAAAA,CAAC,GAAG,IAAIC,UAAU,CAACF,IAAI,CAAC,CAAA;GACzB,CAAC,OAAOG,GAAG,EAAE;AACZF,IAAAA,CAAC,GAAGG,QAAQ,CAACL,WAAW,CAAC,OAAO,CAAC,CAAA;IACjCE,CAAC,CAACI,SAAS,CAACL,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAC/B,GAAA;AACA,EAAA,OAAOC,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAMK,eAAgB,SAAQC,cAAK,CAACC,SAAmD,CAAA;AACrFC,EAAAA,MAAMA,GAAA;AACJ,IAAA,MAAMC,EAAA,GAAqE,IAAI,CAACC,KAAK;AAA/E,MAAA;QAAEC,SAAS;QAAEC,KAAK;QAAEC,MAAM;QAAEC,QAAQ;AAAEC,QAAAA,YAAAA;AAAY,OAAA,GAAAN,EAA6B;AAAxBO,MAAAA,SAAS,GAAAC,MAAA,CAAAR,EAAA,EAAhE,CAAkE,WAAA,EAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,cAAA,CAAA,CAAa,CAAA;AACrF,IAAA,MAAMS,GAAG,GAAGC,UAAU,CAAC,cAAc,EAAER,SAAS,CAAC,CAAA;AACjD,IAAA,oBACES,GAAA,CAAA,KAAA,EAAA;MACEC,GAAG,EAAGrB,CAAC,IAAI;QACT,IAAIA,CAAC,IAAIe,YAAY,EAAE;UACrBA,YAAY,CAACO,OAAO,GAAGtB,CAAC,CAAA;AAC1B,SAAA;OACA;AACFW,MAAAA,SAAS,EAAEO,GAAI;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AAAA,QAAA,gBAC/FM,GAAA,CAAA,KAAA,EAAA;AACEqH,UAAAA,uBAAuB,EAAE;AACvBC,YAAAA,MAAM,EAAE,CAAA;6BACO,IAAI,CAACjH,GAAG,CAAA,oFAAA,EAAuFoG,qBAAqB,CAAA;6BACpH,IAAI,CAACpG,GAAG,CAAA,2FAAA,EAA8FqG,2BAA2B,CAAA;AACvI,sBAAA,CAAA;AACV,WAAA;SAEH,CAAA,eAAA1G,GAAA,CAAA,KAAA,EAAA;AAAKT,UAAAA,SAAS,EAAC,gBAAgB;AAAAG,UAAAA,QAAA,EAAE,IAAI,CAACJ,KAAK,CAACI,QAAAA;SAAc,CAC1D,eAAAM,GAAA,CAAA,KAAA,EAAA;AAAKT,UAAAA,SAAS,EAAE2H,aAAAA;AAAc,SAChC,CAAA,CAAA;OAAK,CAAA;AACP,KAAK,CAAC,CAAA;AAEV,GAAA;AACD,CAAA;MAEYK,MAAM,GAAGC,yBAAyB,CAACrH,WAAW,EAAC;MAC/CsH,UAAU,GAAGD,yBAAyB,CAACvI,eAAe;;;;"}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import './style/index.css.js';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import
|
|
4
|
+
import 'react';
|
|
5
|
+
import { createForwardRefComponent } from '../../utils/index.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
function Text(props) {
|
|
9
|
+
const {
|
|
10
|
+
className,
|
|
11
|
+
selectable = false,
|
|
12
|
+
forwardedRef
|
|
13
|
+
} = props,
|
|
14
|
+
restProps = __rest(props, ["className", "selectable", "forwardedRef"]);
|
|
15
|
+
const cls = classNames('taro-text', {
|
|
16
|
+
'taro-text__selectable': selectable
|
|
17
|
+
}, className);
|
|
18
|
+
return /*#__PURE__*/jsx("span", {
|
|
19
|
+
...restProps,
|
|
20
|
+
className: cls,
|
|
21
|
+
ref: forwardedRef,
|
|
22
|
+
children: props.children
|
|
23
|
+
});
|
|
21
24
|
}
|
|
25
|
+
var index = createForwardRefComponent(Text);
|
|
22
26
|
|
|
23
|
-
export {
|
|
27
|
+
export { index as default };
|
|
24
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/text/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLSpanElement> {\n selectable?: boolean\n}\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/text/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent } from '../../utils'\n\ninterface IProps extends React.HTMLAttributes<HTMLSpanElement> {\n selectable?: boolean\n forwardedRef?: React.MutableRefObject<HTMLSpanElement>\n}\n\nfunction Text (props: IProps) {\n const { className, selectable = false, forwardedRef, ...restProps } = props\n const cls = classNames(\n 'taro-text',\n {\n 'taro-text__selectable': selectable\n },\n className\n )\n return (\n <span {...restProps} className={cls} ref={forwardedRef}>\n {props.children}\n </span>\n )\n}\n\nexport default createForwardRefComponent(Text)\n"],"names":["Text","props","className","selectable","forwardedRef","restProps","__rest","cls","classNames","_jsx","ref","children","createForwardRefComponent"],"mappings":";;;;;;;AAYA,SAASA,IAAIA,CAAEC,KAAa,EAAA;EAC1B,MAAM;MAAEC,SAAS;AAAEC,MAAAA,UAAU,GAAG,KAAK;AAAEC,MAAAA,YAAAA;AAA+B,KAAA,GAAAH,KAAK;AAAnBI,IAAAA,SAAS,GAAAC,MAAA,CAAKL,KAAK,EAArE,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,CAA6D,CAAQ,CAAA;AAC3E,EAAA,MAAMM,GAAG,GAAGC,UAAU,CACpB,WAAW,EACX;AACE,IAAA,uBAAuB,EAAEL,UAAAA;GAC1B,EACDD,SAAS,CACV,CAAA;AACD,EAAA,oBACEO,GAAA,CAAA,MAAA,EAAA;AAAA,IAAA,GAAUJ,SAAS;AAAEH,IAAAA,SAAS,EAAEK,GAAI;AAACG,IAAAA,GAAG,EAAEN,YAAa;IAAAO,QAAA,EACpDV,KAAK,CAACU,QAAAA;AAAQ,GACX,CAAC,CAAA;AAEX,CAAA;AAEA,YAAeC,yBAAyB,CAACZ,IAAI,CAAC;;;;"}
|
|
@@ -1,84 +1,81 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import './style/index.css.js';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import
|
|
4
|
+
import { useState, useEffect } from '../../utils/hooks.js';
|
|
5
|
+
import { createForwardRefComponent } from '../../utils/index.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
className: cls,
|
|
76
|
-
onTouchStart: _onTouchStart,
|
|
77
|
-
onTouchEnd: _onTouchEnd,
|
|
78
|
-
onTouchMove: _onTouchMove
|
|
79
|
-
}, other), this.props.children);
|
|
80
|
-
}
|
|
8
|
+
function View(_a) {
|
|
9
|
+
var {
|
|
10
|
+
className,
|
|
11
|
+
hoverClass,
|
|
12
|
+
forwardedRef,
|
|
13
|
+
onTouchStart,
|
|
14
|
+
onTouchEnd,
|
|
15
|
+
onTouchMove,
|
|
16
|
+
hoverStartTime = 50,
|
|
17
|
+
hoverStayTime = 400
|
|
18
|
+
} = _a,
|
|
19
|
+
other = __rest(_a, ["className", "hoverClass", "forwardedRef", "onTouchStart", "onTouchEnd", "onTouchMove", "hoverStartTime", "hoverStayTime"]);
|
|
20
|
+
let timeoutEvent;
|
|
21
|
+
let startTime = 0;
|
|
22
|
+
const [hover, setHover] = useState(false);
|
|
23
|
+
const [touch, setTouch] = useState(false);
|
|
24
|
+
const [cls, setCls] = useState(classNames('', {
|
|
25
|
+
[`${hoverClass}`]: "react" === 'solid' ? hover() : hover
|
|
26
|
+
}, className));
|
|
27
|
+
const _onTouchStart = e => {
|
|
28
|
+
if (hoverClass) {
|
|
29
|
+
setTouch(true);
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
if ("react" === 'solid' ? touch() : touch) {
|
|
32
|
+
setHover(true);
|
|
33
|
+
}
|
|
34
|
+
}, hoverStartTime);
|
|
35
|
+
}
|
|
36
|
+
onTouchStart && onTouchStart(e);
|
|
37
|
+
if (other.onLongPress) {
|
|
38
|
+
timeoutEvent = setTimeout(() => {
|
|
39
|
+
other.onLongPress();
|
|
40
|
+
}, 350);
|
|
41
|
+
startTime = new Date().getTime();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const _onTouchMove = e => {
|
|
45
|
+
clearTimeout(timeoutEvent);
|
|
46
|
+
onTouchMove && onTouchMove(e);
|
|
47
|
+
};
|
|
48
|
+
const _onTouchEnd = e => {
|
|
49
|
+
const spanTime = new Date().getTime() - startTime;
|
|
50
|
+
if (spanTime < 350) {
|
|
51
|
+
clearTimeout(timeoutEvent);
|
|
52
|
+
}
|
|
53
|
+
if (hoverClass) {
|
|
54
|
+
setTouch(false);
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
if ("react" === 'solid' ? touch() : touch) {
|
|
57
|
+
setHover(false);
|
|
58
|
+
}
|
|
59
|
+
}, hoverStayTime);
|
|
60
|
+
}
|
|
61
|
+
onTouchEnd && onTouchEnd(e);
|
|
62
|
+
};
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
setCls(classNames('', {
|
|
65
|
+
[`${hoverClass}`]: "react" === 'solid' ? hover() : hover
|
|
66
|
+
}, className));
|
|
67
|
+
}, [hover, className]);
|
|
68
|
+
return /*#__PURE__*/jsx("div", {
|
|
69
|
+
ref: forwardedRef,
|
|
70
|
+
className: "react" === 'solid' ? cls() : cls,
|
|
71
|
+
onTouchStart: _onTouchStart,
|
|
72
|
+
onTouchEnd: _onTouchEnd,
|
|
73
|
+
onTouchMove: _onTouchMove,
|
|
74
|
+
...other,
|
|
75
|
+
children: other.children
|
|
76
|
+
});
|
|
81
77
|
}
|
|
78
|
+
var index = createForwardRefComponent(View);
|
|
82
79
|
|
|
83
|
-
export {
|
|
80
|
+
export { index as default };
|
|
84
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/view/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n}\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/view/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\n\nimport { useEffect, useState } from '../../utils/hooks'\nimport { createForwardRefComponent } from '../../utils/index'\n\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction View ({\n className,\n hoverClass,\n forwardedRef,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n}: IProps) {\n let timeoutEvent: ReturnType<typeof setTimeout>\n let startTime = 0\n const [hover, setHover] = useState<boolean>(false)\n const [touch, setTouch] = useState<boolean>(false)\n\n const [cls, setCls] = useState<string>(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as Exclude<typeof hover, boolean>)() : hover\n },\n className\n ))\n\n const _onTouchStart = e => {\n if (hoverClass) {\n setTouch(true)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as Exclude<typeof touch, boolean>)() : touch) {\n setHover(true)\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (other.onLongPress) {\n timeoutEvent = setTimeout(() => {\n other.onLongPress!()\n }, 350)\n startTime = new Date().getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = new Date().getTime() - startTime\n if (spanTime < 350) {\n clearTimeout(timeoutEvent)\n }\n if (hoverClass) {\n setTouch(false)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as Exclude<typeof touch, boolean>)() : touch) {\n setHover(false)\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n useEffect(() => {\n setCls(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as Exclude<typeof hover, boolean>)() : hover\n },\n className\n ))\n }, [hover, className])\n\n return (\n <div\n ref={forwardedRef}\n className={process.env.FRAMEWORK === 'solid' ? (cls as Exclude<typeof cls, string>)() : cls as string}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {other.children}\n </div>\n )\n}\n\n\nexport default createForwardRefComponent(View)\n"],"names":["View","_a","className","hoverClass","forwardedRef","onTouchStart","onTouchEnd","onTouchMove","hoverStartTime","hoverStayTime","other","__rest","timeoutEvent","startTime","hover","setHover","useState","touch","setTouch","cls","setCls","classNames","process","_onTouchStart","e","setTimeout","onLongPress","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","useEffect","_jsx","ref","children","createForwardRefComponent"],"mappings":";;;;;;;AAoBA,SAASA,IAAIA,CAAEC,EAUN,EAAA;MAVM;MACbC,SAAS;MACTC,UAAU;MACVC,YAAY;MACZC,YAAY;MACZC,UAAU;MACVC,WAAW;AACXC,MAAAA,cAAc,GAAG,EAAE;AACnBC,MAAAA,aAAa,GAAG,GAAA;UAET;IADJC,KAAK,GATKC,MAAA,CAAAV,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA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AA;AAEV,CAAA;AAGA,YAAeC,yBAAyB,CAACrC,IAAI,CAAC;;;;"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain],.taro-button-core[plain][type=default],.taro-button-core[plain][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain][type=primary]:after{border-width:0}.taro-button-core[plain][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain][type=warn]:after{border-width:0}.taro-button-core[plain],.taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain]:not([disabled]):active,.taro-button-core[plain][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain]:after,.taro-button-core[plain][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain][disabled]
|
|
1
|
+
@-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain],.taro-button-core[plain][type=default],.taro-button-core[plain][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain][type=primary]:after{border-width:0}.taro-button-core[plain][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain][type=warn]:after{border-width:0}.taro-button-core[plain],.taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain]:not([disabled]):active,.taro-button-core[plain][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain]:after,.taro-button-core[plain][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain][disabled],.taro-button-core[plain][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-aspectfit,.taro-img__mode-scaletofill{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-top,.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom{bottom:0;position:absolute;width:100%}.taro-img__mode-left{height:100%}.taro-img__mode-right{height:100%}.taro-img__mode-right,.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}.taro-input-core,input{display:block}input{height:1.4rem;overflow:hidden;text-align:inherit;text-overflow:clip;white-space:nowrap}.weui-input{-webkit-appearance:none;background-color:transparent;border:0;color:inherit;font-size:inherit;height:1.4705882353em;line-height:1.4705882353;outline:0;width:100%}.weui-input::-webkit-inner-spin-button,.weui-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rmc-pull-to-refresh-content{transform-origin:left top 0}.rmc-pull-to-refresh-content-wrapper{min-height:100%}.rmc-pull-to-refresh-transition{transition:transform .3s}@keyframes rmc-pull-to-refresh-indicator{50%{opacity:.2}to{opacity:1}}.rmc-pull-to-refresh-indicator{height:30px;line-height:10px;text-align:center}.rmc-pull-to-refresh-indicator>div{animation-fill-mode:both;animation:rmc-pull-to-refresh-indicator .5s linear 0s infinite;background-color:grey;border-radius:100%;display:inline-block;height:6px;margin:3px;width:6px}.rmc-pull-to-refresh-indicator>div:nth-child(0){animation-delay:-.1s!important}.rmc-pull-to-refresh-indicator>div:first-child{animation-delay:-.2s!important}.rmc-pull-to-refresh-indicator>div:nth-child(2){animation-delay:-.3s!important}.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator{margin-top:-25px}.taro-scroll{-webkit-overflow-scrolling:auto}.taro-scroll::-webkit-scrollbar{display:none}.taro-scroll-view{overflow:hidden}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}.swiper-container-wrapper{height:150px}.swiper-container{height:100%}.swiper-pagination{font-size:0}.swiper-pagination-bullet{opacity:1}.taro-text{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}body,html{-webkit-tap-highlight-color:rgba(0,0,0,0);user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}
|