Skip to content

Commit

Permalink
Merge pull request #1485 from WX-DongXing/feat-react-comps-rn
Browse files Browse the repository at this point in the history
Feat unify comps
  • Loading branch information
yandadaFreedom committed May 24, 2024
2 parents 35400fa + 017d87c commit 3789570
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 165 deletions.
6 changes: 5 additions & 1 deletion packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ Mpx.config = {
hostWhitelists Array 类型 支持h5域名白名单安全校验
apiImplementations webview JSSDK接口 例如getlocation
*/
webviewConfig: {}
webviewConfig: {},
/**
* react-native 相关配置,用于挂载事件等,如 onShareAppMessage
*/
rnConfig: {}
}

global.__mpx = Mpx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ module.exports = function ({ print }) {
const webEventLog = print({ platform: 'web', tag: TAG_NAME, isError: false, type: 'event' })
const qaPropLog = print({ platform: 'qa', tag: TAG_NAME, isError: false })
const wxPropValueLog = print({ platform: 'wx', tag: TAG_NAME, isError: false, type: 'value' })
const iosValueLogError = print({ platform: 'ios', tag: TAG_NAME, isError: true, type: 'value' })
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
const androidValueLogError = print({ platform: 'android', tag: TAG_NAME, isError: true, type: 'value' })
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })

Expand Down Expand Up @@ -119,6 +121,18 @@ module.exports = function ({ print }) {
ttValueLogError({ name, value })
}
}
},
ios ({ name, value }) {
const supported = ['share']
if (!supported.includes(value)) {
iosValueLogError({ name, value })
}
},
android ({ name, value }) {
const supported = ['share']
if (!supported.includes(value)) {
androidValueLogError({ name, value })
}
}
},
{
Expand Down Expand Up @@ -157,7 +171,7 @@ module.exports = function ({ print }) {
qa: qaPropLog
},
{
test: /^(open-type|lang|from-type|hover-class|send-message-title|send-message-path|send-message-img|app-parameter|show-message-card|phone-number-no-quota-toast|bindgetuserinfo|bindcontact|createliveactivity|bindgetphonenumber|bindgetrealtimephonenumber|binderror|bindopensetting|bindlaunchapp|bindchooseavatar|bindagreeprivacyauthorization)$/,
test: /^(lang|from-type|hover-class|send-message-title|send-message-path|send-message-img|app-parameter|show-message-card|phone-number-no-quota-toast|bindgetuserinfo|bindcontact|createliveactivity|bindgetphonenumber|bindgetrealtimephonenumber|binderror|bindopensetting|bindlaunchapp|bindchooseavatar|bindagreeprivacyauthorization)$/,
ios: iosPropLog,
android: androidPropLog
}
Expand Down

0 comments on commit 3789570

Please sign in to comment.