Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Commit

Permalink
fix(events): use onLowercase for all builtin events in order to compl…
Browse files Browse the repository at this point in the history
…y with vue@^3.0.6
  • Loading branch information
b2nil committed Mar 5, 2021
1 parent 42310d9 commit b01004a
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/components/action-sheet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const AtActionSheet = defineComponent({
return () => (
h(View, mergeProps(attrs, {
class: rootClasses.value,
onTouchMove: handleTouchMove
onTouchmove: handleTouchMove
}), {
default: () => [
h(View, {
Expand Down
16 changes: 8 additions & 8 deletions src/components/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ const AtButton = defineComponent({
interface miniAppEventHandleProps {
onError?: typeof props.onError
onContact?: typeof props.onContact
onOpenSetting?: typeof props.onOpenSetting
onGetPhoneNumber?: typeof props.onGetPhoneNumber
onGetUserInfo?: typeof props.onGetUserInfo
onGetAuthorize?: typeof props.onGetAuthorize
onOpensetting?: typeof props.onOpenSetting
onGetphonenumber?: typeof props.onGetPhoneNumber
onGetuserinfo?: typeof props.onGetUserInfo
onGetauthorize?: typeof props.onGetAuthorize
onLaunchapp?: typeof props.onLaunchapp
}

Expand All @@ -185,16 +185,16 @@ const AtButton = defineComponent({
wxButtonProps.onContact = handleContact
break
case 'openSetting':
wxButtonProps.onOpenSetting = handleOpenSetting
wxButtonProps.onOpensetting = handleOpenSetting
break
case 'getPhoneNumber':
wxButtonProps.onGetPhoneNumber = handleGetPhoneNumber
wxButtonProps.onGetphonenumber = handleGetPhoneNumber
break
case 'getUserInfo':
wxButtonProps.onGetUserInfo = handleGetUserInfo
wxButtonProps.onGetuserinfo = handleGetUserInfo
break
case 'getAuthorize':
wxButtonProps.onGetAuthorize = handleGetAuthorize
wxButtonProps.onGetauthorize = handleGetAuthorize
break
case 'launchApp':
wxButtonProps.onLaunchapp = handleLaunchapp
Expand Down
12 changes: 6 additions & 6 deletions src/components/calendar/body/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ const AtCalendarBody = defineComponent({
if (isWeb.value) {
return h(View, {
class: rootClass.value,
onTouchEnd: handleTouchEnd,
onTouchMove: handleTouchMove,
onTouchStart: handleTouchStart
onTouchend: handleTouchEnd,
onTouchmove: handleTouchMove,
onTouchstart: handleTouchStart
}, {
default: () => [
h(AtCalendarDayList),
Expand Down Expand Up @@ -370,9 +370,9 @@ const AtCalendarBody = defineComponent({
skipHiddenItemLayout: true,
current: currentSwiperIndex.value,
onChange: handleChange,
onTouchMove: handleSwipeTouchMove,
onTouchEnd: handleSwipeTouchEnd,
onTouchStart: handleSwipeTouchStart
onTouchmove: handleSwipeTouchMove,
onTouchend: handleSwipeTouchEnd,
onTouchstart: handleSwipeTouchStart
}), {
default: () => state.listGroup.map((item, key) => (
h(SwiperItem, {
Expand Down
2 changes: 1 addition & 1 deletion src/components/calendar/ui/date-list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const AtCalendarList = defineComponent({
key: `list-item-${item.value}-${index}`,
class: flexItemClass.value(item),
onTap: handleClick.bind(this, item),
onLongPress: handleLongClick.bind(this, item)
onLongpress: handleLongClick.bind(this, item)
}, {
default: () => [
h(View, {
Expand Down
6 changes: 3 additions & 3 deletions src/components/float-layout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const AtFloatLayout = defineComponent({
return () => (
h(View, mergeProps(attrs, {
class: rootClass.value,
onTouchMove: handleTouchMove
onTouchmove: handleTouchMove
}), {
default: () => [
// overlay
Expand Down Expand Up @@ -113,8 +113,8 @@ const AtFloatLayout = defineComponent({
lowerThreshold: props.lowerThreshold,
scrollWithAnimation: props.scrollWithAnimation,
onScroll: props.onScroll,
onScrollToLower: props.onScrollToLower,
onScrollToUpper: props.onScrollToUpper,
onScrolltolower: props.onScrollToLower,
onScrolltoupper: props.onScrollToUpper,
}, { default: () => slots.default && slots.default() })
]
})
Expand Down
6 changes: 3 additions & 3 deletions src/components/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,13 @@ const AtInput = defineComponent({
onInput: handleInput,
onFocus: handleFocus,
onConfirm: handleConfirm,
onKeyboardHeightChange: handleKeyboardHeightChange,
onKeyboardheightchange: handleKeyboardHeightChange,
}),

(props.clear && String(props.value)) && (
h(View, {
class: 'at-input__icon',
onTouchStart: handleClearValue
onTouchstart: handleClearValue
}, {
default: () => [
h(Text, {
Expand All @@ -288,7 +288,7 @@ const AtInput = defineComponent({
props.error && (
h(View, {
class: 'at-input__icon',
onTouchStart: handleErrorClick
onTouchstart: handleErrorClick
}, {
default: () => [
h(Text, {
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const AtModal = defineComponent({
return (
h(View, mergeProps(attrs, {
class: rootClasses.value,
onTouchMove: handleTouchMove,
onTouchmove: handleTouchMove,
}), {
default: () => [
h(View, {
Expand Down
4 changes: 2 additions & 2 deletions src/components/range/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ const AtRange = defineComponent({
key: `${sliderName} - ${index}`,
class: 'at-range__slider',
style: sliderName === 'aX' ? sliderAStyle.value : sliderBStyle.value,
onTouchEnd: handleTouchEnd.bind(this, sliderName),
onTouchMove: handleTouchMove.bind(this, sliderName),
onTouchend: handleTouchEnd.bind(this, sliderName),
onTouchmove: handleTouchMove.bind(this, sliderName),
})
))
]
Expand Down
2 changes: 1 addition & 1 deletion src/components/search-bar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const AtSearchBar = defineComponent({
inputValue.value && h(View, {
class: 'at-search-bar__clear',
style: clearIconStyle.value,
onTouchStart: handleClear
onTouchstart: handleClear
}, {
default: () => [
h(Text, { class: 'at-icon at-icon-close-circle' })
Expand Down
8 changes: 4 additions & 4 deletions src/components/skeleton/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ const AtSkeleton = defineComponent({
})

return h(TransitionGroup, {
onAfterEnter: resetStyles,
onBeforeEnter: onBeforeEnter,
onBeforeLeave: onBeforeLeave,
onLeaveCancelled: resetStyles
onAfterenter: resetStyles,
onBeforeenter: onBeforeEnter,
onBeforeleave: onBeforeLeave,
onLeavecancelled: resetStyles
}, { default: () => children })
}

Expand Down
6 changes: 3 additions & 3 deletions src/components/swipe-action/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ const AtSwipeAction = defineComponent({
h(View, mergeProps(attrs, {
id: `swipeAction-${state.componentId}`,
class: 'at-swipe-action',
onTouchMove: handleTouchMove,
onTouchEnd: handleTouchEnd,
onTouchStart: handleTouchStart
onTouchmove: handleTouchMove,
onTouchend: handleTouchEnd,
onTouchstart: handleTouchStart
}), {
default: () => [
// action content
Expand Down
6 changes: 3 additions & 3 deletions src/components/tabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ const AtTabs = defineComponent({
h(View, {
class: 'at-tabs__body',
style: bodyStyle.value,
onTouchStart: handleTouchStart,
onTouchEnd: handleTouchEnd,
onTouchMove: handleTouchMove,
onTouchstart: handleTouchStart,
onTouchend: handleTouchEnd,
onTouchmove: handleTouchMove,
}, {
default: () => [
h(View, {
Expand Down
2 changes: 1 addition & 1 deletion src/components/textarea/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const AtTextarea = defineComponent({
onFocus: handleFocus,
onBlur: handleBlur,
onConfirm: handleConfirm,
onLineChange: handleLinechange,
onLinechange: handleLinechange,
})),

props.count && process.env.TARO_ENV !== 'alipay' && (
Expand Down
4 changes: 2 additions & 2 deletions src/components/virtual-scroll/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ const AtVirtualScroll = defineComponent({
lowerThreshold: parseInt(`${props.reachBottomThreshold}`, 10),
ref: (e) => { elRef.value = e },
onScroll: handleScroll,
onScrollToUpper: props.onReachTop,
onScrollToLower: props.onReachBottom,
onScrolltoupper: props.onReachTop,
onScrolltolower: props.onReachBottom,
}), { default: () => [content] })

return h(View, null, {
Expand Down

0 comments on commit b01004a

Please sign in to comment.