@tarojs/components 3.5.0-beta.2 → 3.5.0-beta.3

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.
@@ -9,7 +9,7 @@ let RichText = class {
9
9
  index.registerInstance(this, hostRef);
10
10
  this.renderNode = (node) => {
11
11
  if ('type' in node && node.type === 'text') {
12
- // unsupport Html Entries
12
+ // nonsupport Html Entries
13
13
  const content = (node.text || '').replace(/ /g, '\u00A0');
14
14
  return content;
15
15
  }
@@ -10054,7 +10054,7 @@ let Swiper = class {
10054
10054
  (_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
10055
10055
  }
10056
10056
  handleInit() {
10057
- const { autoplay, current, interval, duration, circular, vertical, displayMultipleItems } = this;
10057
+ const { autoplay, circular, current, displayMultipleItems, duration, interval, vertical } = this;
10058
10058
  // eslint-disable-next-line @typescript-eslint/no-this-alias
10059
10059
  const that = this;
10060
10060
  const options = {
@@ -10072,7 +10072,7 @@ let Swiper = class {
10072
10072
  },
10073
10073
  // slideChange 事件在 swiper.slideTo 改写 current 时不触发,因此用 slideChangeTransitionEnd 事件代替
10074
10074
  slideChangeTransitionEnd(_swiper) {
10075
- if (circular) {
10075
+ if (that.circular) {
10076
10076
  if (_swiper.isBeginning || _swiper.isEnd) {
10077
10077
  _swiper.slideToLoop(this.realIndex, 0); // 更新下标
10078
10078
  return;
@@ -10094,7 +10094,12 @@ let Swiper = class {
10094
10094
  const className = target && typeof target.className === 'string' ? target.className : '';
10095
10095
  if (className.includes('taro_page') && target.style.display !== 'none') {
10096
10096
  if (that.autoplay && target.contains(_swiper.$el[0])) {
10097
- _swiper.slideTo(that.current);
10097
+ if (that.circular) {
10098
+ _swiper.slideToLoop(this.realIndex, 0); // 更新下标
10099
+ }
10100
+ else {
10101
+ _swiper.slideTo(this.realIndex);
10102
+ }
10098
10103
  }
10099
10104
  }
10100
10105
  }
@@ -3,7 +3,7 @@ export class RichText {
3
3
  constructor() {
4
4
  this.renderNode = (node) => {
5
5
  if ('type' in node && node.type === 'text') {
6
- // unsupport Html Entries
6
+ // nonsupport Html Entries
7
7
  const content = (node.text || '').replace(/ /g, '\u00A0');
8
8
  return content;
9
9
  }
@@ -197,7 +197,7 @@ export class Swiper {
197
197
  (_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
198
198
  }
199
199
  handleInit() {
200
- const { autoplay, current, interval, duration, circular, vertical, displayMultipleItems } = this;
200
+ const { autoplay, circular, current, displayMultipleItems, duration, interval, vertical } = this;
201
201
  // eslint-disable-next-line @typescript-eslint/no-this-alias
202
202
  const that = this;
203
203
  const options = {
@@ -215,7 +215,7 @@ export class Swiper {
215
215
  },
216
216
  // slideChange 事件在 swiper.slideTo 改写 current 时不触发,因此用 slideChangeTransitionEnd 事件代替
217
217
  slideChangeTransitionEnd(_swiper) {
218
- if (circular) {
218
+ if (that.circular) {
219
219
  if (_swiper.isBeginning || _swiper.isEnd) {
220
220
  _swiper.slideToLoop(this.realIndex, 0); // 更新下标
221
221
  return;
@@ -237,7 +237,12 @@ export class Swiper {
237
237
  const className = target && typeof target.className === 'string' ? target.className : '';
238
238
  if (className.includes('taro_page') && target.style.display !== 'none') {
239
239
  if (that.autoplay && target.contains(_swiper.$el[0])) {
240
- _swiper.slideTo(that.current);
240
+ if (that.circular) {
241
+ _swiper.slideToLoop(this.realIndex, 0); // 更新下标
242
+ }
243
+ else {
244
+ _swiper.slideTo(this.realIndex);
245
+ }
241
246
  }
242
247
  }
243
248
  }
@@ -5,7 +5,7 @@ let RichText = class {
5
5
  registerInstance(this, hostRef);
6
6
  this.renderNode = (node) => {
7
7
  if ('type' in node && node.type === 'text') {
8
- // unsupport Html Entries
8
+ // nonsupport Html Entries
9
9
  const content = (node.text || '').replace(/ /g, '\u00A0');
10
10
  return content;
11
11
  }
@@ -10050,7 +10050,7 @@ let Swiper = class {
10050
10050
  (_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
10051
10051
  }
10052
10052
  handleInit() {
10053
- const { autoplay, current, interval, duration, circular, vertical, displayMultipleItems } = this;
10053
+ const { autoplay, circular, current, displayMultipleItems, duration, interval, vertical } = this;
10054
10054
  // eslint-disable-next-line @typescript-eslint/no-this-alias
10055
10055
  const that = this;
10056
10056
  const options = {
@@ -10068,7 +10068,7 @@ let Swiper = class {
10068
10068
  },
10069
10069
  // slideChange 事件在 swiper.slideTo 改写 current 时不触发,因此用 slideChangeTransitionEnd 事件代替
10070
10070
  slideChangeTransitionEnd(_swiper) {
10071
- if (circular) {
10071
+ if (that.circular) {
10072
10072
  if (_swiper.isBeginning || _swiper.isEnd) {
10073
10073
  _swiper.slideToLoop(this.realIndex, 0); // 更新下标
10074
10074
  return;
@@ -10090,7 +10090,12 @@ let Swiper = class {
10090
10090
  const className = target && typeof target.className === 'string' ? target.className : '';
10091
10091
  if (className.includes('taro_page') && target.style.display !== 'none') {
10092
10092
  if (that.autoplay && target.contains(_swiper.$el[0])) {
10093
- _swiper.slideTo(that.current);
10093
+ if (that.circular) {
10094
+ _swiper.slideToLoop(this.realIndex, 0); // 更新下标
10095
+ }
10096
+ else {
10097
+ _swiper.slideTo(this.realIndex);
10098
+ }
10094
10099
  }
10095
10100
  }
10096
10101
  }