Merged
Conversation
Collaborator
Blackgan3
commented
Nov 11, 2024
- 增加 harmony mode
# Conflicts: # packages/api-proxy/src/platform/api/system/rnSystem.js # packages/core/@types/global.d.ts # packages/core/src/convertor/convertor.js # packages/core/src/core/proxy.js # packages/core/src/platform/patch/index.js # packages/core/src/platform/patch/react/getDefaultOptions.ios.js # packages/webpack-plugin/lib/platform/style/wx/index.js # packages/webpack-plugin/lib/platform/template/wx/component-config/picker-view.js
# Conflicts: # packages/core/src/platform/patch/getDefaultOptions.ios.js # packages/webpack-plugin/lib/platform/template/wx/component-config/view.js # packages/webpack-plugin/lib/runtime/components/react/mpx-web-view.tsx
# Conflicts: # packages/webpack-plugin/lib/runtime/components/react/mpx-video.tsx
hiyuki
reviewed
Apr 7, 2025
| const getDeviceInfo = function () { | ||
| const deviceInfo = {} | ||
| if (__mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
| export default function getBuiltInMixins ({ type, rawOptions = {} }) { | ||
| let bulitInMixins | ||
| if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'ios' || __mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
|
|
||
| // TODO 此部分内容在native-stack可删除,用setOptions设置 | ||
| if (__mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
packages/webpack-plugin/lib/index.js
Outdated
| } | ||
| if (isReact(options.mode) && options.srcMode !== 'wx') { | ||
| errors.push('MpxWebpackPlugin supports mode to be "ios" or "android" only when srcMode is set to "wx"!') | ||
| errors.push('MpxWebpackPlugin supports mode to be "ios" or "android" of "harmony" only when srcMode is set to "wx"!') |
Collaborator
There was a problem hiding this comment.
"ios | android | harmony"
hiyuki
reviewed
Apr 7, 2025
| } | ||
| const cssMap = formatAbbreviation({ prop, value, selector }, { mode }) | ||
| if (mode === 'android') return cssMap | ||
| if (mode === 'android' || mode === 'harmony') return cssMap |
hiyuki
reviewed
Apr 7, 2025
| value | ||
| } | ||
| }, | ||
| harmony ({ name, value }, { eventRules, el }) { |
hiyuki
reviewed
Apr 7, 2025
| error(`React native environment does not support [${eventName}] event!`) | ||
| } | ||
| }, | ||
| harmony (eventName) { |
hiyuki
reviewed
Apr 7, 2025
| }) | ||
|
|
||
| if (__mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
| animated: false | ||
| }) | ||
| }, isAndroid ? 200 : 0) | ||
| }, isAndroid || isHarmony ? 200 : 0) |
hiyuki
reviewed
Apr 7, 2025
| { | ||
| detail: { | ||
| position: __mpx_mode__ === 'android' ? seekTime * 1000 : seekTime | ||
| position: __mpx_mode__ === 'android' || __mpx_mode__ === 'harmony' ? seekTime * 1000 : seekTime |
hiyuki
reviewed
Apr 7, 2025
| source.drm = { | ||
| type: DRMType.FAIRPLAY, | ||
| certificateUrl: __mpx_mode__ === 'android' ? provisionUrl : certificateUrl, | ||
| certificateUrl: __mpx_mode__ === 'android' || __mpx_mode__ === 'harmony' ? provisionUrl : certificateUrl, |
hiyuki
reviewed
Apr 7, 2025
|
|
||
| const _reload = function () { | ||
| if (__mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
|
|
||
| const _onLoadProgress = function (event: WebViewProgressEvent) { | ||
| if (__mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
| } | ||
| const onLoadEnd = function (res: WebViewEvent) { | ||
| if (__mpx_mode__ === 'android') { | ||
| if (__mpx_mode__ === 'android' || __mpx_mode__ === 'harmony') { |
hiyuki
reviewed
Apr 7, 2025
|
|
||
| export const isIOS = __mpx_mode__ === 'ios' | ||
| export const isAndroid = __mpx_mode__ === 'android' | ||
| export const isHarmony = __mpx_mode__ === 'harmony' |
hiyuki
reviewed
Apr 8, 2025
| const { dash2hump } = require('../../../utils/hump-dash') | ||
|
|
||
| module.exports = function getSpec ({ warn, error }) { | ||
| function rnDirectiveEventHandle ({ name, value, eventRules, el, mode, match }) { |
hiyuki
approved these changes
Apr 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.