@mpxjs/webpack-plugin 2.10.11 → 2.10.12

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.
@@ -71,7 +71,7 @@ const easeMap = {
71
71
  easeInOutCubic: Easing.inOut(Easing.cubic)
72
72
  };
73
73
  const SwiperWrapper = forwardRef((props, ref) => {
74
- const { 'indicator-dots': showPagination, 'indicator-color': dotColor = 'rgba(0, 0, 0, .3)', 'indicator-active-color': activeDotColor = '#000000', 'enable-var': enableVar = false, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'external-var-context': externalVarContext, 'simultaneous-handlers': originSimultaneousHandlers = [], 'wait-for': waitFor = [], style = {}, autoplay = false, circular = false, disableGesture = false } = props;
74
+ const { 'indicator-dots': showPagination, 'indicator-color': dotColor = 'rgba(0, 0, 0, .3)', 'indicator-active-color': activeDotColor = '#000000', 'enable-var': enableVar = false, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'external-var-context': externalVarContext, 'simultaneous-handlers': originSimultaneousHandlers = [], 'wait-for': waitFor = [], style = {}, autoplay = false, circular = false, disableGesture = false, bindchange } = props;
75
75
  const easeingFunc = props['easing-function'] || 'default';
76
76
  const easeDuration = props.duration || 500;
77
77
  const horizontal = props.vertical !== undefined ? !props.vertical : true;
@@ -329,7 +329,7 @@ const SwiperWrapper = forwardRef((props, ref) => {
329
329
  function handleSwiperChange(current) {
330
330
  if (props.current !== currentIndex.value) {
331
331
  const eventData = getCustomEvent('change', {}, { detail: { current, source: 'touch' }, layoutRef: layoutRef });
332
- props.bindchange && props.bindchange(eventData);
332
+ bindchange && bindchange(eventData);
333
333
  }
334
334
  }
335
335
  function getOffset(index, stepValue) {
@@ -373,7 +373,7 @@ const SwiperWrapper = forwardRef((props, ref) => {
373
373
  // 1. 用户在当前页切换选中项,动画;用户携带选中index打开到swiper页直接选中不走动画
374
374
  useAnimatedReaction(() => currentIndex.value, (newIndex, preIndex) => {
375
375
  // 这里必须传递函数名, 直接写()=> {}形式会报 访问了未sharedValue信息
376
- if (newIndex !== preIndex && props.bindchange) {
376
+ if (newIndex !== preIndex && bindchange) {
377
377
  runOnJS(handleSwiperChange)(newIndex);
378
378
  }
379
379
  });
@@ -143,7 +143,8 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
143
143
  style = {},
144
144
  autoplay = false,
145
145
  circular = false,
146
- disableGesture = false
146
+ disableGesture = false,
147
+ bindchange
147
148
  } = props
148
149
  const easeingFunc = props['easing-function'] || 'default'
149
150
  const easeDuration = props.duration || 500
@@ -427,7 +428,7 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
427
428
  function handleSwiperChange (current: number) {
428
429
  if (props.current !== currentIndex.value) {
429
430
  const eventData = getCustomEvent('change', {}, { detail: { current, source: 'touch' }, layoutRef: layoutRef })
430
- props.bindchange && props.bindchange(eventData)
431
+ bindchange && bindchange(eventData)
431
432
  }
432
433
  }
433
434
 
@@ -469,7 +470,7 @@ const SwiperWrapper = forwardRef<HandlerRef<View, SwiperProps>, SwiperProps>((pr
469
470
  // 1. 用户在当前页切换选中项,动画;用户携带选中index打开到swiper页直接选中不走动画
470
471
  useAnimatedReaction(() => currentIndex.value, (newIndex: number, preIndex: number) => {
471
472
  // 这里必须传递函数名, 直接写()=> {}形式会报 访问了未sharedValue信息
472
- if (newIndex !== preIndex && props.bindchange) {
473
+ if (newIndex !== preIndex && bindchange) {
473
474
  runOnJS(handleSwiperChange)(newIndex)
474
475
  }
475
476
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.11",
3
+ "version": "2.10.12",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"
@@ -100,5 +100,5 @@
100
100
  "engines": {
101
101
  "node": ">=14.14.0"
102
102
  },
103
- "gitHead": "4ea2a49ba7989edb3b0e292ed41e357d476d70fc"
103
+ "gitHead": "430dd358e9737dc543d3395fee3c304d19a98702"
104
104
  }