@ohos-cpf/3rdloop 0.0.8 → 0.0.9
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.
- package/README.md +25 -0
- package/lib/cli.js +22 -5
- package/lib/doctor.js +111 -10
- package/lib/mcp.js +498 -0
- package/package.json +6 -2
- package/vendor/Archive/data/.index/meta.json +7 -0
- package/vendor/Archive/data/.index/search.db +0 -0
- package/vendor/Archive/data/docs/experiences/arkts-check-tool-pitfalls-baseline-comparison.md +13 -0
- package/vendor/Archive/data/docs/experiences/arkts-deep-path-import-recognition.md +31 -0
- package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-entry-file-case-mismatch.md +25 -0
- package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-import-trailing-slash.md +20 -0
- package/vendor/Archive/data/docs/experiences/arkts-library-source-files-may-be-ts.md +18 -0
- package/vendor/Archive/data/docs/experiences/arkts-typedarray-buffer-interface-cast-compile-fixes.md +36 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-compile-error-clustering-fix.md +24 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-doc-expected-value-runtime-probe.md +35 -0
- package/vendor/Archive/data/docs/experiences/arkts-xts-fixture-rawfile-testability-injection.md +33 -0
- package/vendor/Archive/data/docs/experiences/code-linter-chinese-comment-false-positive.md +16 -0
- package/vendor/Archive/data/docs/experiences/esobject-new-expression-variable-tracking.md +33 -0
- package/vendor/Archive/data/docs/experiences/filesystem-case-sensitivity-module-resolution.md +31 -0
- package/vendor/Archive/data/docs/experiences/gitcode-clone-redirect-warning-normal.md +13 -0
- package/vendor/Archive/data/docs/experiences/kn_msgvq1w585ec8319.md +77 -0
- package/vendor/Archive/data/docs/experiences/kn_msovnm6rd46de72c.md +98 -0
- package/vendor/Archive/data/docs/experiences/kn_mspt8vntfe708576.md +87 -0
- package/vendor/Archive/data/docs/experiences/kn_mspu1ei77adbbb48.md +133 -0
- package/vendor/Archive/data/docs/experiences/kn_mspubgak8d30bfce.md +128 -0
- package/vendor/Archive/data/docs/experiences/kn_mspug2de3cb1f7c3.md +115 -0
- package/vendor/Archive/data/docs/experiences/kn_skill_opt_001.md +38 -0
- package/vendor/Archive/data/docs/experiences/loop-artifacts-verification-evidence-triangle.md +19 -0
- package/vendor/Archive/data/docs/experiences/macos-bash-replace-build-ps1.md +19 -0
- package/vendor/Archive/data/docs/experiences/macos-bsd-diff-q-illegal-option.md +15 -0
- package/vendor/Archive/data/docs/experiences/migrate-cjs-compatible-api-version-map-limit.md +17 -0
- package/vendor/Archive/data/docs/experiences/mp3agic-arkts-library-behavior-quirks.md +21 -0
- package/vendor/Archive/data/docs/experiences/ohos-face-detection-scan-api-mapping.md +15 -0
- package/vendor/Archive/data/docs/experiences/pr-metadata-and-diff-integrity-verification.md +12 -0
- package/vendor/Archive/data/docs/experiences/rn-coverage-index-signature-pseudo-member-false-negative.md +32 -0
- package/vendor/Archive/data/docs/experiences/rn-memory-check-severity-calibration.md +21 -0
- package/vendor/Archive/data/docs/experiences/rn-platform-specific-api-exclusion-evidence.md +24 -0
- package/vendor/Archive/data/docs/experiences/rn-upstream-version-diff-pitfalls.md +17 -0
- package/vendor/Archive/data/docs/experiences/rn-version-gap-risk-rating-rules.md +13 -0
- package/vendor/Archive/data/docs/experiences/rn-view-lib-native-contract-diff-fabric-spec.md +16 -0
- package/vendor/Archive/data/docs/experiences/rnoh-adapter-package-version-field-semantics.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-arkts-sqlite-rows-array-format.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-dependency-residue-scan-strategy.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-local-lib-dep-use-tgz.md +53 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-prereserve-rntesterlist.md +17 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-template-compatiblesdkversion-upgrade.md +29 -0
- package/vendor/Archive/data/docs/experiences/rnoh-example-turbomodule-shell-adaptation-checklist.md +41 -0
- package/vendor/Archive/data/docs/experiences/rnoh-mcp-build-project-tool-risk.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-npm-devdependencies-version-precheck.md +29 -0
- package/vendor/Archive/data/docs/experiences/rnoh-repo-baseline-version-verification.md +13 -0
- package/vendor/Archive/data/docs/experiences/rnoh-repo-upstream-directory-mapping.md +18 -0
- package/vendor/Archive/data/docs/experiences/rnoh-stateless-library-zero-leak-verification.md +31 -0
- package/vendor/Archive/data/docs/experiences/rnoh-template-npmrc-credential-removal.md +15 -0
- package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-codegen-wiring-verification.md +19 -0
- package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-cpp-methodmap-compatibility-check.md +20 -0
- package/vendor/Archive/data/docs/experiences/scenario-doc-vs-source-signature-diff-four-patterns.md +24 -0
- package/vendor/Archive/data/docs/experiences/static-analysis-grep-cross-validation.md +29 -0
- package/vendor/Archive/demo.js +489 -0
- package/vendor/Archive/index.js +43 -0
- package/vendor/Archive/package.json +16 -0
- package/vendor/Archive/src/constants.js +83 -0
- package/vendor/Archive/src/data/stopwords.txt +110 -0
- package/vendor/Archive/src/data/synonyms.json +25 -0
- package/vendor/Archive/src/data/terms.txt +59 -0
- package/vendor/Archive/src/db/sqlite-backend.js +312 -0
- package/vendor/Archive/src/db/sqlite-schema.js +64 -0
- package/vendor/Archive/src/engine.js +501 -0
- package/vendor/Archive/src/index/index-manager.js +203 -0
- package/vendor/Archive/src/index/index-state.js +94 -0
- package/vendor/Archive/src/index/search-text-builder.js +106 -0
- package/vendor/Archive/src/index.js +22 -0
- package/vendor/Archive/src/parser/api-identifiers.js +121 -0
- package/vendor/Archive/src/parser/api-suffixes.js +48 -0
- package/vendor/Archive/src/parser/heading-normalize.js +40 -0
- package/vendor/Archive/src/parser/markdown-splitter.js +215 -0
- package/vendor/Archive/src/search/catalog-routing.js +87 -0
- package/vendor/Archive/src/search/fts-search.js +289 -0
- package/vendor/Archive/src/search/query-normalizer.js +159 -0
- package/vendor/Archive/src/search/query-rewriter.js +72 -0
- package/vendor/Archive/src/search/search-engine.js +72 -0
- package/vendor/Archive/src/search/snippet.js +64 -0
- package/vendor/Archive/src/store/dir-store.js +103 -0
- package/vendor/Archive/src/store/doc-store.js +36 -0
- package/vendor/Archive/src/tokenizer/lexicon.js +151 -0
- package/vendor/Archive/src/tokenizer/tokenizer.js +167 -0
- package/vendor/Archive/src/types.js +86 -0
- package/vendor/Archive/src/utils/hash.js +16 -0
- package/vendor/Archive/src/utils/lock.js +73 -0
- package/vendor/Archive/src/utils/path-safety.js +96 -0
- package/vendor/Archive/src/utils/paths.js +39 -0
- package/vendor/BadCase/rn/INDEX.md +127 -0
- package/vendor/BadCase/rn/cases/KI-001-webview/350/247/206/351/242/221/346/227/240/346/263/225/346/250/252/345/261/217.md +52 -0
- package/vendor/BadCase/rn/cases/KI-002-fastImage/347/203/255/346/233/264/346/226/260/345/233/276/347/211/207/345/244/261/350/264/245.md +37 -0
- package/vendor/BadCase/rn/cases/KI-003-wechat/347/274/251/347/225/245/345/233/276/346/234/254/345/234/260/345/233/276/347/211/207.md +62 -0
- package/vendor/BadCase/rn/cases/KI-004-wechat/345/233/236/350/260/203/346/227/266/345/272/217.md +47 -0
- package/vendor/BadCase/rn/cases/KI-005-geolocation/345/257/274/345/205/245/350/267/257/345/276/204/345/220/216/347/274/200.md +31 -0
- package/vendor/BadCase/rn/cases/KI-006-SmartRefreshLayout/346/231/272/350/203/275/346/214/207/351/222/210/345/264/251/346/272/203.md +55 -0
- package/vendor/BadCase/rn/cases/KI-007-orientation-locker/344/274/240/346/204/237/345/231/250/345/210/235/345/247/213/345/214/226.md +58 -0
- package/vendor/BadCase/rn/cases/KI-008-orientation-locker/344/274/240/346/204/237/345/231/250/345/274/225/347/224/250/350/256/241/346/225/260.md +47 -0
- package/vendor/BadCase/rn/cases/KI-009-pager-view/345/265/214/345/245/227/346/273/221/345/212/250.md +38 -0
- package/vendor/BadCase/rn/cases/KI-010-screens/346/211/213/345/212/277/345/206/262/347/252/201.md +48 -0
- package/vendor/BadCase/rn/cases/KI-011-spring-scrollview/346/211/213/345/212/277/351/207/215/345/244/215/347/273/221/345/256/232.md +49 -0
- package/vendor/BadCase/rn/cases/KI-012-qr-camera/346/250/252/345/261/217/351/200/202/351/205/215.md +59 -0
- package/vendor/BadCase/rn/cases/KI-013-webview/346/267/261/350/211/262/346/250/241/345/274/217/350/203/214/346/231/257/350/211/262.md +37 -0
- package/vendor/BadCase/rn/cases/KI-014-amap-geolocation/345/233/236/350/260/203/347/274/272/345/244/261.md +42 -0
- package/vendor/BadCase/rn/cases/KI-015-reanimated/350/277/220/350/241/214/346/227/266/346/236/220/346/236/204/345/264/251/346/272/203.md +54 -0
- package/vendor/BadCase/rn/cases/KI-016-fs/346/226/207/344/273/266/350/257/273/345/217/226/347/274/226/347/240/201.md +58 -0
- package/vendor/BadCase/rn/cases/KI-017-blob-util/345/217/202/346/225/260/347/274/226/347/240/201/351/224/231/350/257/257.md +39 -0
- package/vendor/BadCase/rn/cases/KI-018-modal/345/274/271/347/252/227/351/227/252/347/203/201.md +53 -0
- package/vendor/BadCase/rn/cases/KI-019-code-push/351/207/215/345/220/257/351/200/273/350/276/221/345/244/261/346/225/210.md +79 -0
- package/vendor/BadCase/rn/cases/KI-020-netinfo/346/225/217/346/204/237/344/277/241/346/201/257/346/263/204/351/234/262.md +60 -0
- package/vendor/BadCase/rn/cases/KI-021-video/346/234/254/345/234/260/350/247/206/351/242/221/346/222/255/346/224/276/345/274/202/345/270/270.md +79 -0
- package/vendor/BadCase/rn/cases/KI-022-audio-recorder-player/346/236/232/344/270/276/347/274/272/345/244/261.md +38 -0
- package/vendor/BadCase/rn/cases/KI-023-svg/346/270/220/345/217/230/347/273/247/346/211/277/345/244/261/346/225/210.md +62 -0
- package/vendor/BadCase/rn/generalization-log.md +55 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.json +328 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.md +382 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.json +1351 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.md +1176 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.json +538 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.md +1488 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.json +211 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.md +35 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.json +2048 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.md +3866 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.md +40 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.json +751 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.md +883 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.json +1544 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.md +2598 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.json +246 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.md +554 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.json +211 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.md +54 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.json +1626 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.md +2213 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.json +208 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.md +77 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.json +377 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.md +174 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.json +232 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.md +194 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.md +67 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.md +38 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.json +208 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.md +34 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.json +222 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.md +56 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.json +463 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.md +383 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.json +464 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.md +565 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.json +198 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.md +47 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.json +232 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.md +422 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.json +295 -0
- package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.md +1038 -0
- package/vendor/BadCase/rn/rules/R-01-/345/205/250/345/261/217/347/252/227/345/217/243/347/212/266/346/200/201/347/256/241/347/220/206/345/256/214/346/225/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-02-/350/265/204/346/272/220URI/345/275/242/346/200/201/345/210/206/346/224/257/350/246/206/347/233/226.md +21 -0
- package/vendor/BadCase/rn/rules/R-03-/351/231/204/345/261/236/346/223/215/344/275/234/345/244/261/350/264/245/351/230/273/346/226/255/344/270/273/346/265/201/347/250/213.md +20 -0
- package/vendor/BadCase/rn/rules/R-04-/345/274/202/346/255/245/345/233/236/350/260/203/346/263/250/345/206/214/346/227/266/345/272/217.md +20 -0
- package/vendor/BadCase/rn/rules/R-05-/346/250/241/345/235/227/345/257/274/345/205/245/350/267/257/345/276/204/350/247/204/350/214/203.md +19 -0
- package/vendor/BadCase/rn/rules/R-06-/344/274/240/346/204/237/345/231/250/347/241/254/344/273/266/346/235/203/351/231/220/346/214/211/351/234/200/350/216/267/345/217/226.md +21 -0
- package/vendor/BadCase/rn/rules/R-07-/346/231/272/350/203/275/346/214/207/351/222/210/347/224/237/345/221/275/345/221/250/346/234/237/347/256/241/347/220/206.md +20 -0
- package/vendor/BadCase/rn/rules/R-08-/346/211/213/345/212/277/344/272/213/344/273/266/346/263/250/345/206/214/344/270/216/345/206/262/347/252/201/345/244/204/347/220/206.md +22 -0
- package/vendor/BadCase/rn/rules/R-09-/346/250/252/347/253/226/345/261/217/345/244/232/345/275/242/346/200/201/345/270/203/345/261/200/351/200/202/351/205/215.md +20 -0
- package/vendor/BadCase/rn/rules/R-10-/346/267/261/350/211/262/346/250/241/345/274/217/344/270/273/351/242/230/351/242/234/350/211/262/351/200/202/351/205/215.md +19 -0
- package/vendor/BadCase/rn/rules/R-11-/346/216/245/345/217/243/345/233/236/350/260/203/345/256/236/347/216/260/345/256/214/346/225/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-12-/345/216/237/347/224/237/350/277/220/350/241/214/346/227/266/350/265/204/346/272/220/346/236/220/346/236/204/346/227/266/345/272/217.md +20 -0
- package/vendor/BadCase/rn/rules/R-13-/346/226/207/344/273/266/346/225/260/346/215/256/347/274/226/347/240/201/344/270/216/346/240/274/345/274/217/345/205/274/345/256/271.md +21 -0
- package/vendor/BadCase/rn/rules/R-14-/345/212/250/347/224/273/345/210/235/345/247/213/345/214/226/346/227/266/345/272/217/344/270/216/347/212/266/346/200/201/345/220/214/346/255/245.md +20 -0
- package/vendor/BadCase/rn/rules/R-15-/347/212/266/346/200/201/346/214/201/344/271/205/345/214/226/344/270/216/351/207/215/345/220/257/351/200/273/350/276/221/344/270/200/350/207/264/346/200/247.md +20 -0
- package/vendor/BadCase/rn/rules/R-16-/346/225/217/346/204/237/344/277/241/346/201/257/346/227/245/345/277/227/346/263/204/351/234/262.md +19 -0
- package/vendor/BadCase/rn/rules/R-17-/345/252/222/344/275/223/350/265/204/346/272/220/347/224/237/345/221/275/345/221/250/346/234/237/344/270/216/351/224/231/350/257/257/345/244/204/347/220/206.md +21 -0
- package/vendor/BadCase/rn/rules/R-18-/350/203/275/345/212/233/346/236/232/344/270/276/351/205/215/347/275/256/345/256/214/346/225/264/346/200/247.md +19 -0
- package/vendor/BadCase/rn/rules/R-19-/345/233/276/345/275/242/346/270/262/346/237/223/345/261/236/346/200/247/347/273/247/346/211/277/344/270/216/351/207/215/347/275/256.md +19 -0
- package/vendor/MCP/README.md +490 -0
- package/vendor/MCP/config.json +29 -0
- package/vendor/MCP/package.json +23 -0
- package/vendor/MCP/scripts/analyze-demo-coverage.cjs +1203 -0
- package/vendor/MCP/scripts/analyze-xts-coverage.cjs +1245 -0
- package/vendor/MCP/scripts/deveco_docs.js +247 -0
- package/vendor/MCP/scripts/extract-interfaces.cjs +1487 -0
- package/vendor/MCP/scripts/flutter-analyze-demo-coverage.cjs +666 -0
- package/vendor/MCP/scripts/flutter-analyze-xts-coverage.cjs +684 -0
- package/vendor/MCP/scripts/flutter-extract-interfaces.cjs +1251 -0
- package/vendor/MCP/scripts/flutter-render-spec-doc.cjs +351 -0
- package/vendor/MCP/scripts/render-spec-doc.cjs +347 -0
- package/vendor/MCP/scripts/rn-analyze-demo-coverage.cjs +645 -0
- package/vendor/MCP/scripts/rn-analyze-test-coverage.cjs +614 -0
- package/vendor/MCP/scripts/rn-extract-interfaces.cjs +1462 -0
- package/vendor/MCP/scripts/rn-render-spec-doc.cjs +327 -0
- package/vendor/MCP/scripts/rn-scan-exports.cjs +1336 -0
- package/vendor/MCP/src/client/MCPClientPool.js +220 -0
- package/vendor/MCP/src/config/ConfigLoader.js +189 -0
- package/vendor/MCP/src/executor/ScriptExecutor.js +110 -0
- package/vendor/MCP/src/gateway/Gateway.js +451 -0
- package/vendor/MCP/src/index.js +87 -0
- package/vendor/MCP/src/library/KBToolProvider.js +229 -0
- package/vendor/MCP/src/library/logger.js +60 -0
- package/vendor/MCP/src/registry/ScriptRegistry.js +238 -0
- package/vendor/MCP/src/registry/ToolRegistry.js +111 -0
- package/vendor/MCP/src/types.js +115 -0
- package/vendor/Server/Skills/arkts-library-test-coverage-check/references/MCP_TOOL_USAGE.md +4 -2
- package/vendor/Server/Skills/arkts-library-xts-coverage/SKILL.md +3 -3
- package/vendor/Server/Skills/knowledge-import/SKILL.md +1 -1
- package/vendor/Server/Skills/knowledge-import/references/MCP_TOOL_USAGE.md +12 -4
- package/vendor/Server/Skills/ohos-lib-pr-push/SKILL.md +5 -4
- package/vendor/Server/Skills/rn-library-issue-generalizer/SKILL.md +2 -2
- package/vendor/Server/Skills/rn-library-known-issue-check/SKILL.md +2 -2
- package/vendor/Server/Skills/rnoh-lib-demo-coverage/SKILL.md +1 -2
- package/vendor/Server/Skills/rnoh-lib-test-align/references/port-test-demo-guide.md +1 -1
- package/vendor/Server/Skills/rnoh-lib-xts-coverage/SKILL.md +1 -2
- package/vendor/Server/package.json +5 -1
- package/vendor/VERSION +3 -3
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# PR #32: fix:修复嵌套滑动时父子组件无法联动响应的问题
|
|
2
|
+
|
|
3
|
+
- **状态**: merged
|
|
4
|
+
- **作者**: qq_434633291111
|
|
5
|
+
- **创建时间**: 2026-08-01T19:34:53+08:00
|
|
6
|
+
- **分支**: br_rnoh0.77 → br_rnoh0.77
|
|
7
|
+
- **变更文件数**: 8
|
|
8
|
+
|
|
9
|
+
## PR 描述
|
|
10
|
+
|
|
11
|
+
fix:修复嵌套滑动时父子组件无法联动响应的问题
|
|
12
|
+
Close: [#19](https://gitcode.com/CPF-RN/rntpc_react-native-pager-view/issues/19)
|
|
13
|
+
|
|
14
|
+
## 变更文件
|
|
15
|
+
|
|
16
|
+
| 文件 | 变更 | +行 | -行 |
|
|
17
|
+
|------|------|-----|-----|
|
|
18
|
+
| `.npmignore` | added | +2 | -0 |
|
|
19
|
+
| `example/harmony/build-profile.template.json5` | ? | +4 | -1 |
|
|
20
|
+
| `example/harmony/entry/oh-package.json5` | ? | +1 | -1 |
|
|
21
|
+
| `example/harmony/oh-package.json5` | ? | +1 | -1 |
|
|
22
|
+
| `example/metro.config.js` | ? | +2 | -2 |
|
|
23
|
+
| `example/package.json` | ? | +2 | -2 |
|
|
24
|
+
| `harmony/pager_view/src/main/cpp/SwiperNode.cpp` | ? | +4 | -0 |
|
|
25
|
+
| `harmony/pager_view/src/main/cpp/SwiperNode.h` | ? | +1 | -0 |
|
|
26
|
+
|
|
27
|
+
## Diff
|
|
28
|
+
|
|
29
|
+
### `.npmignore`
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
@@ -0,0 +1,2 @@
|
|
33
|
+
+example
|
|
34
|
+
+build
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### `example/harmony/build-profile.template.json5`
|
|
40
|
+
|
|
41
|
+
```diff
|
|
42
|
+
@@ -4,7 +4,6 @@
|
|
43
|
+
{
|
|
44
|
+
"name": 'default',
|
|
45
|
+
"signingConfig": 'default',
|
|
46
|
+
- "compileSdkVersion": '5.0.1(13)',
|
|
47
|
+
"compatibleSdkVersion": '5.0.0(12)',
|
|
48
|
+
"runtimeOS": 'HarmonyOS'
|
|
49
|
+
},
|
|
50
|
+
@@ -31,6 +30,10 @@
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
+ },
|
|
55
|
+
+ {
|
|
56
|
+
+ name: 'pager_view',
|
|
57
|
+
+ srcPath: '../../harmony/pager_view',
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### `example/harmony/entry/oh-package.json5`
|
|
66
|
+
|
|
67
|
+
```diff
|
|
68
|
+
@@ -5,7 +5,7 @@
|
|
69
|
+
"description": "example description",
|
|
70
|
+
"version": "1.0.0",
|
|
71
|
+
"dependencies": {
|
|
72
|
+
- "@rnoh/react-native-openharmony": "file:../../node_modules/react-native-harmony/harmony/react_native_openharmony.har",
|
|
73
|
+
+ "@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
|
|
74
|
+
"@react-native-ohos/react-native-pager-view": "file:../../node_modules/@react-native-ohos/react-native-pager-view/harmony/pager_view.har"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `example/harmony/oh-package.json5`
|
|
82
|
+
|
|
83
|
+
```diff
|
|
84
|
+
@@ -6,7 +6,7 @@
|
|
85
|
+
"repository": {},
|
|
86
|
+
"version": "1.0.0",
|
|
87
|
+
"overrides": {
|
|
88
|
+
- "@rnoh/react-native-openharmony": "file:./../node_modules/react-native-harmony/harmony/react_native_openharmony.har"
|
|
89
|
+
+ '@rnoh/react-native-openharmony': 'file:../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har'
|
|
90
|
+
},
|
|
91
|
+
"dynamicDependencies": {}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### `example/metro.config.js`
|
|
98
|
+
|
|
99
|
+
```diff
|
|
100
|
+
@@ -5,7 +5,7 @@
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
const {mergeConfig, getDefaultConfig} = require('@react-native/metro-config');
|
|
104
|
+
-const {createHarmonyMetroConfig} = require('react-native-harmony/metro.config');
|
|
105
|
+
+const {createHarmonyMetroConfig} = require('@react-native-oh/react-native-harmony/metro.config');
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @type {import("metro-config").ConfigT}
|
|
109
|
+
@@ -24,7 +24,7 @@ const config = {
|
|
110
|
+
module.exports = mergeConfig(
|
|
111
|
+
getDefaultConfig(__dirname),
|
|
112
|
+
createHarmonyMetroConfig({
|
|
113
|
+
- reactNativeHarmonyPackageName: 'react-native-harmony',
|
|
114
|
+
+ reactNativeHarmonyPackageName: '@react-native-oh/react-native-harmony',
|
|
115
|
+
}),
|
|
116
|
+
config,
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### `example/package.json`
|
|
122
|
+
|
|
123
|
+
```diff
|
|
124
|
+
@@ -19,7 +19,7 @@
|
|
125
|
+
"@react-native-ohos/react-native-pager-view": "file:../react-native-ohos-react-native-pager-view-6.7.3.tgz",
|
|
126
|
+
"react": "18.3.1",
|
|
127
|
+
"react-native": "0.77.1",
|
|
128
|
+
- "react-native-harmony": "file:../packages/rnoh-react-native-harmony-0.77.10.tgz",
|
|
129
|
+
+ "@react-native-oh/react-native-harmony": "npm:@react-native-oh/react-native-harmony@0.77.18-1",
|
|
130
|
+
"react-native-reanimated": "^3.6.0"
|
|
131
|
+
},
|
|
132
|
+
"devDependencies": {
|
|
133
|
+
@@ -34,7 +34,7 @@
|
|
134
|
+
"@react-native/eslint-config": "0.77.1",
|
|
135
|
+
"@react-native/metro-config": "^0.77.1",
|
|
136
|
+
"@react-native/typescript-config": "0.77.1",
|
|
137
|
+
- "@rnoh/react-native-harmony-cli": "file:../packages/rnoh-react-native-harmony-cli-0.77.10.tgz",
|
|
138
|
+
+ "@rnoh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@0.77.18",
|
|
139
|
+
"@tsconfig/react-native": "^3.0.0",
|
|
140
|
+
"@types/d3-scale-chromatic": "^3.0.0",
|
|
141
|
+
"@types/jest": "^29.5.13",
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### `harmony/pager_view/src/main/cpp/SwiperNode.cpp`
|
|
146
|
+
|
|
147
|
+
```diff
|
|
148
|
+
@@ -42,6 +42,10 @@ namespace rnoh {
|
|
149
|
+
m_nodeHandle, NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL, NODE_SWIPER_EVENT_ON_CONTENT_DID_SCROLL, this));
|
|
150
|
+
maybeThrow(NativeNodeApi::getInstance()->registerNodeEvent(
|
|
151
|
+
m_nodeHandle, NODE_EVENT_ON_APPEAR, NODE_EVENT_ON_APPEAR, this));
|
|
152
|
+
+ // 开启嵌套滑动时的父子联动响应
|
|
153
|
+
+ ArkUI_NumberValue indexValue[] = {{.i32 = m_swiperNestedScrollMode}};
|
|
154
|
+
+ ArkUI_AttributeItem indexItem = {indexValue, sizeof(indexValue) / sizeof(ArkUI_NumberValue)};
|
|
155
|
+
+ maybeThrow(NativeNodeApi::getInstance()->setAttribute(m_nodeHandle, NODE_SWIPER_NESTED_SCROLL, &indexItem));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### `harmony/pager_view/src/main/cpp/SwiperNode.h`
|
|
163
|
+
|
|
164
|
+
```diff
|
|
165
|
+
@@ -81,6 +81,7 @@ namespace rnoh {
|
|
166
|
+
std::chrono::high_resolution_clock::time_point animationEnd;
|
|
167
|
+
bool m_interceptSendOffset = false;
|
|
168
|
+
std::map<void*,ArkUI_NodeHandle> m_nodeHandleMap;
|
|
169
|
+
+ ArkUI_SwiperNestedScrollMode m_swiperNestedScrollMode = ARKUI_SWIPER_NESTED_SRCOLL_SELF_FIRST;
|
|
170
|
+
public:
|
|
171
|
+
SwiperNode();
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
```
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pr": {
|
|
3
|
+
"id": 8966051,
|
|
4
|
+
"html_url": "https://gitcode.com/CPF-RN/rntpc_react-native-qr-decode-image-camera/merge_requests/37",
|
|
5
|
+
"number": 37,
|
|
6
|
+
"state": "merged",
|
|
7
|
+
"title": "fix:Fix the issue where the horizontal camera view shifts downward.",
|
|
8
|
+
"url": "https://api.gitcode.com/api/v5/repos/CPF-RN/rntpc_react-native-qr-decode-image-camera/pulls/37",
|
|
9
|
+
"issue_url": "https://api.gitcode.com/api/v5/repos/CPF-RN/rntpc_react-native-qr-decode-image-camera/pulls/37/issues",
|
|
10
|
+
"body": "## 一、变更类型(单选,仅勾选一项)\n- [ ] feat(新增功能,对应 Changelog Added)\n- [x] fix(修复 Bug,对应 Changelog Fixed)\n- [ ] docs(文档变更,对应 Changelog Documentation)\n- [ ] refactor(代码重构,对应 Changelog Changed)\n- [ ] perf(性能优化,对应 Changelog Performance)\n- [ ] test(测试相关,不进入 Changelog)\n- [ ] chore(构建/工具链/依赖,不进入 Changelog)\n- [ ] deprecated(标记弃用,对应 Changelog Deprecated)\n- [ ] removed(移除功能,对应 Changelog Removed)\n- [ ] security(安全修复,对应 Changelog Security)\n\n## 二、变更内容\n### 简要描述\n解决横屏状态下相机显示问题\n\n### 破坏性变更说明\n无破坏性变更\n\n\n## 三、测试步骤\n运行demo,手机切换横屏,观察相机UI状态\n测试demo\n```\n/**\n * @format\n */\n\nimport { AppRegistry } from 'react-native';\nimport RNTester from './rn-tester';\nimport { name as appName } from './app.json';\n\nimport React, { useState } from 'react';\nimport { View, Text, TouchableOpacity, StyleSheet } from 'react-native';\nimport { QRscanner } from 'react-native-qr-decode-image-camera';\n\n\nexport const QrExample = () => {\n\n const [flashMode, setflashMode] = useState(false);\n const onRead = res => {\n console.log(\"result:\" + res);\n };\n return (\n <View style={styles.container}>\n <QRscanner\n onRead={onRead}\n isRepeatScan={true}\n renderBottomView={() => {\n return (\n <View\n style={{\n flex: 1,\n flexDirection: 'row',\n backgroundColor: '#0000004D',\n }}>\n <TouchableOpacity\n style={{\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n }}\n onPress={() => {\n if (flashMode) {\n setflashMode(false);\n } else {\n setflashMode(true);\n }\n }}>\n <Text style={{ color: '#fff' }}>flashMode</Text>\n </TouchableOpacity>\n </View>\n );\n }}\n flashMode={flashMode}\n finderY={50}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: '#000',\n },\n});\n\nAppRegistry.registerComponent(appName, () => QrExample);\n\n```\n\n## 四、测试情况\n横屏状态UI显示正常\n不涉及\n\n## 五、合入前自检\n- [x] 不涉及非兼容性变更;若涉及,已通过相应评审。\n- [x] 不涉及性能或已进行性能测试且无性能劣化。\n- [x] 符合对应的编码规范。\n- [x] 无敏感信息泄露,如密码、密钥等。\n- [x] 不涉及文档更新,或已更新了文档。\n- [x] 针对可测试性要求,已增加必要的自测用例、合理的日志记录或Trace信息。\n- [x] 不存在非法的文件引入,包括图片和代码等",
|
|
11
|
+
"assignees_number": 3,
|
|
12
|
+
"assignees": [
|
|
13
|
+
{
|
|
14
|
+
"id": "6731c8f2fbbddc0c200a6019",
|
|
15
|
+
"login": "zhu_chengcheng",
|
|
16
|
+
"name": "zhu_chengcheng",
|
|
17
|
+
"avatar_url": "https://cdn-img.gitcode.com/fe/bd/f406eb600317d9bbb6a5c23042b49e5193dfbb7a63ee407f5bbfcbabcd177af1.jpg",
|
|
18
|
+
"html_url": "https://gitcode.com/zhu_chengcheng",
|
|
19
|
+
"assignee": true,
|
|
20
|
+
"code_owner": false,
|
|
21
|
+
"accept": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "67fdb69df01e3c566929edd4",
|
|
25
|
+
"login": "gcw_N7oHqLFR",
|
|
26
|
+
"name": "huang_jy",
|
|
27
|
+
"avatar_url": "",
|
|
28
|
+
"html_url": "https://gitcode.com/gcw_N7oHqLFR",
|
|
29
|
+
"assignee": true,
|
|
30
|
+
"code_owner": false,
|
|
31
|
+
"accept": false
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "67316e3733741160e6751351",
|
|
35
|
+
"login": "dingchengjie",
|
|
36
|
+
"name": "dingchengjie",
|
|
37
|
+
"avatar_url": "https://cdn-img.gitcode.com/fa/ed/6fa18810e4276d04d77bccf2f37c2287b44631cdcae7587fc4446f0bd79c2ed3.png",
|
|
38
|
+
"html_url": "https://gitcode.com/dingchengjie",
|
|
39
|
+
"assignee": true,
|
|
40
|
+
"code_owner": false,
|
|
41
|
+
"accept": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"testers": [
|
|
45
|
+
{
|
|
46
|
+
"id": "6541ccea82d8f837210e92c3",
|
|
47
|
+
"login": "openharmony_ci",
|
|
48
|
+
"name": "openharmony_ci",
|
|
49
|
+
"avatar_url": "https://cdn-img.gitcode.com/cb/be/5cb10620b4e9195576142df69cd44bb84df15d769c2a04eff5bf7324b903022c.png?time=1723462328974",
|
|
50
|
+
"html_url": "https://gitcode.com/openharmony_ci",
|
|
51
|
+
"assignee": false,
|
|
52
|
+
"code_owner": false,
|
|
53
|
+
"accept": true
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"approval_reviewers": [],
|
|
57
|
+
"labels": [
|
|
58
|
+
{
|
|
59
|
+
"id": 13245124,
|
|
60
|
+
"color": "#428BCA",
|
|
61
|
+
"name": "dco检查成功",
|
|
62
|
+
"repository_id": 4368657,
|
|
63
|
+
"created_at": "2026-07-02T17:57:08+08:00",
|
|
64
|
+
"updated_at": "2026-07-31T16:29:40+08:00"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": 13245970,
|
|
68
|
+
"color": "#428BCA",
|
|
69
|
+
"name": "编译成功",
|
|
70
|
+
"repository_id": 4368657,
|
|
71
|
+
"created_at": "2026-07-08T12:11:50+08:00",
|
|
72
|
+
"updated_at": "2026-08-06T16:12:25+08:00"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": 13245743,
|
|
76
|
+
"color": "#428BCA",
|
|
77
|
+
"name": "静态检查成功",
|
|
78
|
+
"repository_id": 4368657,
|
|
79
|
+
"created_at": "2026-07-07T20:59:55+08:00",
|
|
80
|
+
"updated_at": "2026-08-06T16:25:03+08:00"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"created_at": "2026-07-31T16:28:57+08:00",
|
|
84
|
+
"updated_at": "2026-08-06T19:04:23+08:00",
|
|
85
|
+
"closed_at": "2026-08-06T19:04:22+08:00",
|
|
86
|
+
"merged_at": "2026-08-06T19:04:22+08:00",
|
|
87
|
+
"merged_by": {
|
|
88
|
+
"id": "6541ccea82d8f837210e92c3",
|
|
89
|
+
"login": "openharmony_ci",
|
|
90
|
+
"name": "openharmony_ci",
|
|
91
|
+
"avatar_url": "https://cdn-img.gitcode.com/cb/be/5cb10620b4e9195576142df69cd44bb84df15d769c2a04eff5bf7324b903022c.png?time=1723462328974",
|
|
92
|
+
"html_url": "https://gitcode.com/openharmony_ci"
|
|
93
|
+
},
|
|
94
|
+
"draft": false,
|
|
95
|
+
"can_merge_check": true,
|
|
96
|
+
"prune_branch": false,
|
|
97
|
+
"mergeable": true,
|
|
98
|
+
"user": {
|
|
99
|
+
"id": "67fe10947795fd623e1a1214",
|
|
100
|
+
"login": "chenbaodi123",
|
|
101
|
+
"name": "chenbaodi123",
|
|
102
|
+
"avatar_url": "",
|
|
103
|
+
"html_url": "https://gitcode.com/chenbaodi123"
|
|
104
|
+
},
|
|
105
|
+
"head": {
|
|
106
|
+
"ref": "br_rnoh0.82",
|
|
107
|
+
"sha": "e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf",
|
|
108
|
+
"label": "br_rnoh0.82",
|
|
109
|
+
"repo": {
|
|
110
|
+
"path": "rntpc_react-native-qr-decode-image-camera",
|
|
111
|
+
"name": "rntpc_react-native-qr-decode-image-camera",
|
|
112
|
+
"namespace": {
|
|
113
|
+
"path": "chenbaodi123"
|
|
114
|
+
},
|
|
115
|
+
"full_name": "chenbaodi123/rntpc_react-native-qr-decode-image-camera",
|
|
116
|
+
"html_url": "https://gitcode.com/chenbaodi123/rntpc_react-native-qr-decode-image-camera.git"
|
|
117
|
+
},
|
|
118
|
+
"user": {
|
|
119
|
+
"id": "67fe10947795fd623e1a1214",
|
|
120
|
+
"login": "chenbaodi123",
|
|
121
|
+
"name": "chenbaodi123",
|
|
122
|
+
"avatar_url": "",
|
|
123
|
+
"html_url": "https://gitcode.com/chenbaodi123"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"base": {
|
|
127
|
+
"ref": "br_rnoh0.82",
|
|
128
|
+
"sha": "2b9a5126d7ce9772cae4529b5c4fc51fb7f615f2",
|
|
129
|
+
"label": "br_rnoh0.82",
|
|
130
|
+
"repo": {
|
|
131
|
+
"path": "rntpc_react-native-qr-decode-image-camera",
|
|
132
|
+
"name": "rntpc_react-native-qr-decode-image-camera",
|
|
133
|
+
"namespace": {
|
|
134
|
+
"path": "CPF-RN"
|
|
135
|
+
},
|
|
136
|
+
"full_name": "CPF-RN/rntpc_react-native-qr-decode-image-camera",
|
|
137
|
+
"html_url": "https://gitcode.com/CPF-RN/rntpc_react-native-qr-decode-image-camera.git"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"mergeable_state": {
|
|
141
|
+
"merge_request_id": 8966051,
|
|
142
|
+
"state": true,
|
|
143
|
+
"status_without_user_auth": true,
|
|
144
|
+
"conflict_passed": true,
|
|
145
|
+
"branch_missing_passed": true,
|
|
146
|
+
"non_ff_passed": true,
|
|
147
|
+
"mr_state_passed": true,
|
|
148
|
+
"merged_by_user_passed": true,
|
|
149
|
+
"work_in_progress_passed": true,
|
|
150
|
+
"resolve_discussion_passed": true,
|
|
151
|
+
"ci_state_passed": true,
|
|
152
|
+
"merge_by_self_passed": true,
|
|
153
|
+
"can_force_merge": true,
|
|
154
|
+
"approval_reviewers_required_passed": true,
|
|
155
|
+
"approval_approvers_required_passed": true,
|
|
156
|
+
"approval_testers_required_passed": true,
|
|
157
|
+
"merge_request_switch": {
|
|
158
|
+
"review_mode": "approval",
|
|
159
|
+
"merge_method": "merge",
|
|
160
|
+
"only_allow_merge_if_all_discussions_are_resolved": true,
|
|
161
|
+
"disable_merge_by_self": true,
|
|
162
|
+
"only_allow_merge_if_pipeline_succeeds": false,
|
|
163
|
+
"disable_squash_merge": false,
|
|
164
|
+
"squash_merge_with_no_merge_commit": false,
|
|
165
|
+
"approval_required_reviewers_count": 0,
|
|
166
|
+
"approval_required_reviewers_branch": "*",
|
|
167
|
+
"add_notes_after_merged": true,
|
|
168
|
+
"mark_auto_merged_mr_as_closed": false,
|
|
169
|
+
"can_force_merge": true,
|
|
170
|
+
"can_reopen": true
|
|
171
|
+
},
|
|
172
|
+
"reason": {},
|
|
173
|
+
"check_tasks_num": 2,
|
|
174
|
+
"all_depend_merge_request_merged_passed": true,
|
|
175
|
+
"approval_approvers_result": 2,
|
|
176
|
+
"approval_testers_result": 2
|
|
177
|
+
},
|
|
178
|
+
"visibility_reason": "public",
|
|
179
|
+
"close_related_issue": true,
|
|
180
|
+
"squash_merge": false
|
|
181
|
+
},
|
|
182
|
+
"files": [
|
|
183
|
+
{
|
|
184
|
+
"sha": "e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf",
|
|
185
|
+
"filename": "src/Camera.tsx",
|
|
186
|
+
"additions": 1,
|
|
187
|
+
"deletions": 2,
|
|
188
|
+
"blob_id": "83a35ae00587184d73e833a7ee0d25d9c20a2e8b",
|
|
189
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-qr-decode-image-camera/blob/e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf/src/Camera.tsx",
|
|
190
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-qr-decode-image-camera/raw/e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf/src/Camera.tsx",
|
|
191
|
+
"patch": "@@ -82,7 +82,6 @@ export const ComponentCamera = (props) => {\n \n const styles = StyleSheet.create({\n camera: {\n- width: '100%',\n- aspectRatio: 3 / 4,\n+ flex: 1,\n },\n });\n\\n",
|
|
192
|
+
"target_branch": "br_rnoh0.82",
|
|
193
|
+
"source_branch": "br_rnoh0.82",
|
|
194
|
+
"source_project": {
|
|
195
|
+
"id": 10498861,
|
|
196
|
+
"full_name": "chenbaodi123/rntpc_react-native-qr-decode-image-camera",
|
|
197
|
+
"human_name": "chenbaodi123 / rntpc_react-native-qr-decode-image-camera",
|
|
198
|
+
"path": "rntpc_react-native-qr-decode-image-camera"
|
|
199
|
+
},
|
|
200
|
+
"target_project": {
|
|
201
|
+
"id": 4368657,
|
|
202
|
+
"full_name": "CPF-RN/rntpc_react-native-qr-decode-image-camera",
|
|
203
|
+
"human_name": "CPF-RN / rntpc_react-native-qr-decode-image-camera",
|
|
204
|
+
"path": "rntpc_react-native-qr-decode-image-camera"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"sha": "e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf",
|
|
209
|
+
"filename": "src/QRScannerView.js",
|
|
210
|
+
"additions": 11,
|
|
211
|
+
"deletions": 5,
|
|
212
|
+
"blob_id": "a8c01e06dfeb6072f37ddcb883f1a49d3f9b1bfd",
|
|
213
|
+
"blob_url": "https://gitcode.com/CPF-RN/rntpc_react-native-qr-decode-image-camera/blob/e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf/src/QRScannerView.js",
|
|
214
|
+
"raw_url": "https://raw.gitcode.com/CPF-RN/rntpc_react-native-qr-decode-image-camera/raw/e05f632ffc76d2afa87b523ea708ff6ea8f7b2cf/src/QRScannerView.js",
|
|
215
|
+
"patch": "@@ -10,7 +10,8 @@ import {\n Vibration,\n Platform,\n PixelRatio,\n- StatusBar\n+ StatusBar,\n+ Dimensions\n } from 'react-native';\n /**\n * Scanning Interface Mask\n@@ -46,11 +47,13 @@ export default class QRScannerView extends Component {\n \n constructor(props) {\n super(props);\n+ const { width, height } = Dimensions.get('window');\n this.state = {\n topWidth: 0,\n topHeight: 0,\n leftWidth: 0,\n- animatedValue: new Animated.Value(0)\n+ animatedValue: new Animated.Value(0),\n+ isLandscape: width > height,\n }\n this.isClosed = false;\n }\n@@ -101,7 +104,8 @@ export default class QRScannerView extends Component {\n //Measure the size of the entire scanning component\n measureTotalSize = (e) => {\n let totalSize = e.layout;\n- this.setState({ topWidth: totalSize.width })\n+ const isLandscape = totalSize.width > totalSize.height;\n+ this.setState({ topWidth: totalSize.width, isLandscape })\n }\n \n //Measure the position of the scan frame\n@@ -298,9 +302,11 @@ export default class QRScannerView extends Component {\n <View\n style={{\n position: 'absolute',\n- bottom: this.props.hintTextPosition\n+ ...(this.state.isLandscape\n+ ? { top: this.getBottomMaskHeight() - this.props.finderY + 10, left: 0, right: 0, alignItems: 'center' }\n+ : { bottom: this.props.hintTextPosition })\n }}>\n- <Text style={[this.props.hintTextStyle, { top: this.props.finderY, left: this.props.finderX }]}>{this.props.hintText}</Text>\n+ <Text style={[this.props.hintTextStyle, !this.state.isLandscape ? { top: this.props.finderY, left: this.props.finderX } : {}]}>{this.props.hintText}</Text>\n </View>\n \n </View>\n",
|
|
216
|
+
"target_branch": "br_rnoh0.82",
|
|
217
|
+
"source_branch": "br_rnoh0.82",
|
|
218
|
+
"source_project": {
|
|
219
|
+
"id": 10498861,
|
|
220
|
+
"full_name": "chenbaodi123/rntpc_react-native-qr-decode-image-camera",
|
|
221
|
+
"human_name": "chenbaodi123 / rntpc_react-native-qr-decode-image-camera",
|
|
222
|
+
"path": "rntpc_react-native-qr-decode-image-camera"
|
|
223
|
+
},
|
|
224
|
+
"target_project": {
|
|
225
|
+
"id": 4368657,
|
|
226
|
+
"full_name": "CPF-RN/rntpc_react-native-qr-decode-image-camera",
|
|
227
|
+
"human_name": "CPF-RN / rntpc_react-native-qr-decode-image-camera",
|
|
228
|
+
"path": "rntpc_react-native-qr-decode-image-camera"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# PR #37: fix:Fix the issue where the horizontal camera view shifts downward.
|
|
2
|
+
|
|
3
|
+
- **状态**: merged
|
|
4
|
+
- **作者**: chenbaodi123
|
|
5
|
+
- **创建时间**: 2026-07-31T16:28:57+08:00
|
|
6
|
+
- **分支**: br_rnoh0.82 → br_rnoh0.82
|
|
7
|
+
- **变更文件数**: 2
|
|
8
|
+
|
|
9
|
+
## PR 描述
|
|
10
|
+
|
|
11
|
+
## 一、变更类型(单选,仅勾选一项)
|
|
12
|
+
- [ ] feat(新增功能,对应 Changelog Added)
|
|
13
|
+
- [x] fix(修复 Bug,对应 Changelog Fixed)
|
|
14
|
+
- [ ] docs(文档变更,对应 Changelog Documentation)
|
|
15
|
+
- [ ] refactor(代码重构,对应 Changelog Changed)
|
|
16
|
+
- [ ] perf(性能优化,对应 Changelog Performance)
|
|
17
|
+
- [ ] test(测试相关,不进入 Changelog)
|
|
18
|
+
- [ ] chore(构建/工具链/依赖,不进入 Changelog)
|
|
19
|
+
- [ ] deprecated(标记弃用,对应 Changelog Deprecated)
|
|
20
|
+
- [ ] removed(移除功能,对应 Changelog Removed)
|
|
21
|
+
- [ ] security(安全修复,对应 Changelog Security)
|
|
22
|
+
|
|
23
|
+
## 二、变更内容
|
|
24
|
+
### 简要描述
|
|
25
|
+
解决横屏状态下相机显示问题
|
|
26
|
+
|
|
27
|
+
### 破坏性变更说明
|
|
28
|
+
无破坏性变更
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## 三、测试步骤
|
|
32
|
+
运行demo,手机切换横屏,观察相机UI状态
|
|
33
|
+
测试demo
|
|
34
|
+
```
|
|
35
|
+
/**
|
|
36
|
+
* @format
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
import { AppRegistry } from 'react-native';
|
|
40
|
+
import RNTester from './rn-tester';
|
|
41
|
+
import { name as appName } from './app.json';
|
|
42
|
+
|
|
43
|
+
import React, { useState } from 'react';
|
|
44
|
+
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
|
|
45
|
+
import { QRscanner } from 'react-native-qr-decode-image-camera';
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export const QrExample = () => {
|
|
49
|
+
|
|
50
|
+
const [flashMode, setflashMode] = useState(false);
|
|
51
|
+
const onRead = res => {
|
|
52
|
+
console.log("result:" + res);
|
|
53
|
+
};
|
|
54
|
+
return (
|
|
55
|
+
<View style={styles.container}>
|
|
56
|
+
<QRscanner
|
|
57
|
+
onRead={onRead}
|
|
58
|
+
isRepeatScan={true}
|
|
59
|
+
renderBottomView={() => {
|
|
60
|
+
return (
|
|
61
|
+
<View
|
|
62
|
+
style={{
|
|
63
|
+
flex: 1,
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
backgroundColor: '#0000004D',
|
|
66
|
+
}}>
|
|
67
|
+
<TouchableOpacity
|
|
68
|
+
style={{
|
|
69
|
+
flex: 1,
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
}}
|
|
73
|
+
onPress={() => {
|
|
74
|
+
if (flashMode) {
|
|
75
|
+
setflashMode(false);
|
|
76
|
+
} else {
|
|
77
|
+
setflashMode(true);
|
|
78
|
+
}
|
|
79
|
+
}}>
|
|
80
|
+
<Text style={{ color: '#fff' }}>flashMode</Text>
|
|
81
|
+
</TouchableOpacity>
|
|
82
|
+
</View>
|
|
83
|
+
);
|
|
84
|
+
}}
|
|
85
|
+
flashMode={flashMode}
|
|
86
|
+
finderY={50}
|
|
87
|
+
/>
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const styles = StyleSheet.create({
|
|
93
|
+
container: {
|
|
94
|
+
flex: 1,
|
|
95
|
+
backgroundColor: '#000',
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
AppRegistry.registerComponent(appName, () => QrExample);
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 四、测试情况
|
|
104
|
+
横屏状态UI显示正常
|
|
105
|
+
不涉及
|
|
106
|
+
|
|
107
|
+
## 五、合入前自检
|
|
108
|
+
- [x] 不涉及非兼容性变更;若涉及,已通过相应评审。
|
|
109
|
+
- [x] 不涉及性能或已进行性能测试且无性能劣化。
|
|
110
|
+
- [x] 符合对应的编码规范。
|
|
111
|
+
- [x] 无敏感信息泄露,如密码、密钥等。
|
|
112
|
+
- [x] 不涉及文档更新,或已更新了文档。
|
|
113
|
+
- [x] 针对可测试性要求,已增加必要的自测用例、合理的日志记录或Trace信息。
|
|
114
|
+
- [x] 不存在非法的文件引入,包括图片和代码等
|
|
115
|
+
|
|
116
|
+
## 变更文件
|
|
117
|
+
|
|
118
|
+
| 文件 | 变更 | +行 | -行 |
|
|
119
|
+
|------|------|-----|-----|
|
|
120
|
+
| `src/Camera.tsx` | ? | +1 | -2 |
|
|
121
|
+
| `src/QRScannerView.js` | ? | +11 | -5 |
|
|
122
|
+
|
|
123
|
+
## Diff
|
|
124
|
+
|
|
125
|
+
### `src/Camera.tsx`
|
|
126
|
+
|
|
127
|
+
```diff
|
|
128
|
+
@@ -82,7 +82,6 @@ export const ComponentCamera = (props) => {
|
|
129
|
+
|
|
130
|
+
const styles = StyleSheet.create({
|
|
131
|
+
camera: {
|
|
132
|
+
- width: '100%',
|
|
133
|
+
- aspectRatio: 3 / 4,
|
|
134
|
+
+ flex: 1,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### `src/QRScannerView.js`
|
|
142
|
+
|
|
143
|
+
```diff
|
|
144
|
+
@@ -10,7 +10,8 @@ import {
|
|
145
|
+
Vibration,
|
|
146
|
+
Platform,
|
|
147
|
+
PixelRatio,
|
|
148
|
+
- StatusBar
|
|
149
|
+
+ StatusBar,
|
|
150
|
+
+ Dimensions
|
|
151
|
+
} from 'react-native';
|
|
152
|
+
/**
|
|
153
|
+
* Scanning Interface Mask
|
|
154
|
+
@@ -46,11 +47,13 @@ export default class QRScannerView extends Component {
|
|
155
|
+
|
|
156
|
+
constructor(props) {
|
|
157
|
+
super(props);
|
|
158
|
+
+ const { width, height } = Dimensions.get('window');
|
|
159
|
+
this.state = {
|
|
160
|
+
topWidth: 0,
|
|
161
|
+
topHeight: 0,
|
|
162
|
+
leftWidth: 0,
|
|
163
|
+
- animatedValue: new Animated.Value(0)
|
|
164
|
+
+ animatedValue: new Animated.Value(0),
|
|
165
|
+
+ isLandscape: width > height,
|
|
166
|
+
}
|
|
167
|
+
this.isClosed = false;
|
|
168
|
+
}
|
|
169
|
+
@@ -101,7 +104,8 @@ export default class QRScannerView extends Component {
|
|
170
|
+
//Measure the size of the entire scanning component
|
|
171
|
+
measureTotalSize = (e) => {
|
|
172
|
+
let totalSize = e.layout;
|
|
173
|
+
- this.setState({ topWidth: totalSize.width })
|
|
174
|
+
+ const isLandscape = totalSize.width > totalSize.height;
|
|
175
|
+
+ this.setState({ topWidth: totalSize.width, isLandscape })
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
//Measure the position of the scan frame
|
|
179
|
+
@@ -298,9 +302,11 @@ export default class QRScannerView extends Component {
|
|
180
|
+
<View
|
|
181
|
+
style={{
|
|
182
|
+
position: 'absolute',
|
|
183
|
+
- bottom: this.props.hintTextPosition
|
|
184
|
+
+ ...(this.state.isLandscape
|
|
185
|
+
+ ? { top: this.getBottomMaskHeight() - this.props.finderY + 10, left: 0, right: 0, alignItems: 'center' }
|
|
186
|
+
+ : { bottom: this.props.hintTextPosition })
|
|
187
|
+
}}>
|
|
188
|
+
- <Text style={[this.props.hintTextStyle, { top: this.props.finderY, left: this.props.finderX }]}>{this.props.hintText}</Text>
|
|
189
|
+
+ <Text style={[this.props.hintTextStyle, !this.state.isLandscape ? { top: this.props.finderY, left: this.props.finderX } : {}]}>{this.props.hintText}</Text>
|
|
190
|
+
</View>
|
|
191
|
+
|
|
192
|
+
</View>
|
|
193
|
+
|
|
194
|
+
```
|