From cb41b9a07b775492703fc5fb29009fbc569c5859 Mon Sep 17 00:00:00 2001 From: p60087772 Date: Mon, 16 Jun 2025 15:52:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20[Issues:=20#ICFHL6]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9async-storage=E3=80=81geolocation=E5=92=8Cdrag-sort?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=A3=98=E7=BA=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-async-storage-async-storage.md | 4 ++-- en/react-native-community-geolocation.md | 1 + en/react-native-drag-sort.md | 10 ++++++++-- zh-cn/react-native-async-storage-async-storage.md | 4 ++-- zh-cn/react-native-community-geolocation.md | 1 + zh-cn/react-native-drag-sort.md | 10 ++++++++-- 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/en/react-native-async-storage-async-storage.md b/en/react-native-async-storage-async-storage.md index 652e68b5..795d63dc 100644 --- a/en/react-native-async-storage-async-storage.md +++ b/en/react-native-async-storage-async-storage.md @@ -82,10 +82,10 @@ export default function App() { const readItemFromStorage = async () => { const item = await getItem(); - setValue(item); + setValue(item === null ? '' : item); }; - const writeItemToStorage = async (newValue) => { + const writeItemToStorage = async (newValue: any) => { await setItem(newValue); setValue(newValue); }; diff --git a/en/react-native-community-geolocation.md b/en/react-native-community-geolocation.md index d88de7f1..84dad7e5 100644 --- a/en/react-native-community-geolocation.md +++ b/en/react-native-community-geolocation.md @@ -45,6 +45,7 @@ The following code shows the basic use scenario of the repository: ```js import Geolocation from "@react-native-community/geolocation"; import { Button } from "react-native"; +import React from 'react'; export function GeolocationDemo(): JSX.Element { const tap = () => { diff --git a/en/react-native-drag-sort.md b/en/react-native-drag-sort.md index 9f224948..d85f507c 100644 --- a/en/react-native-drag-sort.md +++ b/en/react-native-drag-sort.md @@ -304,10 +304,16 @@ const bottomViewHeight = 40; const getW = (index, isWidth) => isWidth ? (index % 3 === 0 ? width - 40 : (width - 60) / 2) : 80; -export default class AnySizeDragSortDemo extends React.Component { +type State = { + items: { text: string, width: number, height: number }[]; + movedKey: any +} + +export default class AnySizeDragSortDemo extends React.Component { + sortableViewRef: React.RefObject; constructor(props) { super(props); - const items = []; + const items:State["items"] = []; for (let i = 0; i < 26; i++) { items.push({ text: String.fromCharCode(65 + i), diff --git a/zh-cn/react-native-async-storage-async-storage.md b/zh-cn/react-native-async-storage-async-storage.md index 47876ae2..11572d4b 100644 --- a/zh-cn/react-native-async-storage-async-storage.md +++ b/zh-cn/react-native-async-storage-async-storage.md @@ -80,10 +80,10 @@ export default function App() { const readItemFromStorage = async () => { const item = await getItem(); - setValue(item); + setValue(item === null ? '' : item); }; - const writeItemToStorage = async (newValue) => { + const writeItemToStorage = async (newValue: any) => { await setItem(newValue); setValue(newValue); }; diff --git a/zh-cn/react-native-community-geolocation.md b/zh-cn/react-native-community-geolocation.md index 56784249..7774b0ae 100644 --- a/zh-cn/react-native-community-geolocation.md +++ b/zh-cn/react-native-community-geolocation.md @@ -43,6 +43,7 @@ yarn add @react-native-oh-tpl/geolocation ```js import Geolocation from "@react-native-community/geolocation"; import { Button } from "react-native"; +import React from 'react'; export function GeolocationDemo(): JSX.Element { const tap = () => { diff --git a/zh-cn/react-native-drag-sort.md b/zh-cn/react-native-drag-sort.md index 121293c0..d57d58eb 100644 --- a/zh-cn/react-native-drag-sort.md +++ b/zh-cn/react-native-drag-sort.md @@ -300,10 +300,16 @@ const bottomViewHeight = 40; const getW = (index, isWidth) => isWidth ? (index % 3 === 0 ? width - 40 : (width - 60) / 2) : 80; -export default class AnySizeDragSortDemo extends React.Component { +type State = { + items: { text: string, width: number, height: number }[]; + movedKey: any +} + +export default class AnySizeDragSortDemo extends React.Component { + sortableViewRef: React.RefObject; constructor(props) { super(props); - const items = []; + const items:State["items"] = []; for (let i = 0; i < 26; i++) { items.push({ text: String.fromCharCode(65 + i), -- Gitee From e8307da7a0c71fbd321c31855cfb946e04f419ea Mon Sep 17 00:00:00 2001 From: p60087772 Date: Tue, 17 Jun 2025 11:23:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20[Issues:=20#ICFHL6]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9geolocation=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-community-geolocation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/react-native-community-geolocation.md b/en/react-native-community-geolocation.md index 84dad7e5..23a617e2 100644 --- a/en/react-native-community-geolocation.md +++ b/en/react-native-community-geolocation.md @@ -273,7 +273,7 @@ Open the `entry/src/main/resources/base/element/string.json` file and add the fo ## Known Issues -- [ ] @react-native-oh-tpl/geolocation 部分属性未完全实现 HarmonyOS 化,maximumAge 延时问题: [issue#6](https://github.com/react-native-oh-library/react-native-geolocation/issues/6) +- [ ] Some attributes of @react-native-oh-tpl/geolocation have not been fully implemented for HarmonyOS, and there is a delay issue with maximumAge: [issue#6](https://github.com/react-native-oh-library/react-native-geolocation/issues/6). ## Others -- Gitee