Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: taro 组件支持字节 PaymentChannelSelect 组件 #16889

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/taro-platform-tt/src/components-react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export const AwemeData = 'aweme-data'
export const RateButton = 'rate-button'
export const OpenData = 'open-data'
export const AwemeUserCard = 'aweme-user-card'
export const PaymentChannelSelect = 'payment-channel-select'
20 changes: 15 additions & 5 deletions packages/taro-platform-tt/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const components = {
'adjust-position': _true,
'hold-keyboard': _false,
'clue-type': '0',
bindKeyboardHeightChange: _empty,
bindKeyboardHeightChange: _empty
},
Button: {
bindGetPhoneNumber: _empty,
Expand All @@ -22,7 +22,7 @@ export const components = {
'group-id': _empty,
'data-is-half-page': _empty,
bindOpenAwemeUserProfile: _empty,
bindJoinGroup: _empty,
bindJoinGroup: _empty
},
Form: {
'report-submit-timeout': '0'
Expand Down Expand Up @@ -57,7 +57,7 @@ export const components = {
bindControlTap: _empty,
bindEnterBackground: _empty,
bindCloseBackground: _empty,
bindLeaveBackground: _empty,
bindLeaveBackground: _empty
},
Ad: {
fixed: _empty,
Expand All @@ -83,7 +83,7 @@ export const components = {
bindRefresherPulling: _empty,
bindRefresherRefresh: _empty,
bindRefresherRestore: _empty,
bindRefresherAbort: _empty,
bindRefresherAbort: _empty
},
Canvas: {
type: _empty
Expand Down Expand Up @@ -152,7 +152,7 @@ export const components = {
'order-id': _empty,
bindInit: _empty,
bindSuccess: _empty,
bindError: _empty,
bindError: _empty
},
OpenData: {
type: _empty,
Expand All @@ -168,5 +168,15 @@ export const components = {
fixed: _false,
'left-right-padding': _empty,
bindError: _empty
},
PaymentChannelSelect: {
scene: 'cash',
'sku-list': _empty,
'merchant-uid': _empty,
'limit-pay-way-list ': _empty,
'custom-style': _empty,
bindRequestOrder: _empty,
bindError: _empty,
bindGetpaymentresult: _empty
}
}
11 changes: 8 additions & 3 deletions packages/taro-platform-tt/src/runtime-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ export * from './apis-list'
export * from './components'
export const hostConfig = {
initNativeApi,
modifyMpEventImpl (event) {
modifyMpEventImpl(event) {
if (event.type === 'regionchange') {
event.type = event.detail.type
}
},
modifyTaroEventReturn (node, event, returnVal) {
modifyTaroEventReturn(node, event, returnVal) {
if (node.nodeName === 'pay-button') {
if (event.type === 'applyrefund' || event.type === 'getgoodsinfo') {
return returnVal
}
}
}
if (node.nodeName === 'payment-channel-select') {
if (event.type === 'requestorder' || event.type === 'getpaymentresult') {
return returnVal
}
}
},
}
Loading