Skip to content

Commit 539d5a9

Browse files
authored
Merge pull request #1035 from haoxiuwen/doc-v2
Modify IM UIKit Docs
2 parents dad4590 + 9e10e24 commit 539d5a9

File tree

7 files changed

+111
-0
lines changed

7 files changed

+111
-0
lines changed
-77.6 KB
Loading
-113 KB
Loading
-102 KB
Loading
-140 KB
Loading

docs/uikit/chatuikit/ios/releasenote.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# iOS 单群聊 UIKit 更新日志
22

3+
## 版本 4.10.1
4+
5+
修复了 Xcode16 以下版本 build 时关键字 @retroactive 报错问题。
6+
37
## 版本 4.10.0
48

59
### 新增特性

docs/uikit/chatuikit/react-native/chatuikit_chat.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,94 @@ export function ConversationDetailScreen(props: Props) {
383383
}
384384
```
385385

386+
### 自定义消息上下文菜单样式
387+
388+
`messageMenuStyle` 支持三种模式: `bottom-sheet``context``custom``bottom-sheet` 模式通过页面组件底部弹出菜单,`context` 模式类似微信,通过消息位置和点击位置弹出菜单,`custom` 模式通过用户自定组件实现,需要遵守 `MessageCustomLongPressMenu` 约束。
389+
390+
`custom` 模式示例代码如下:
391+
392+
1. 在全局设置属性 `Container.messageMenuStyle``custom`。其他模式不需要用户设置 `MessageCustomLongPressMenu`
393+
394+
```
395+
export function App() {
396+
return (
397+
<UIKitContainer messageMenuStyle={'custom'}>
398+
{/* sub component */}
399+
</UIKitContainer>
400+
);
401+
}
402+
```
403+
404+
2.`ConversationDetail` 组件中设置属性 `MessageCustomLongPressMenu`
405+
406+
```
407+
export const MyMessageContextNameMenu = React.forwardRef<
408+
ContextNameMenuRef,
409+
ContextNameMenuProps
410+
>(function (
411+
props: ContextNameMenuProps,
412+
ref?: React.ForwardedRef<ContextNameMenuRef>
413+
) {
414+
const {} = props;
415+
React.useImperativeHandle(
416+
ref,
417+
() => {
418+
return {
419+
startShow: () => {},
420+
startHide: (_onFinished?: () => void) => {},
421+
startShowWithInit: (_initItems: InitMenuItemsType[], _?: any) => {},
422+
startShowWithProps: (_props: ContextNameMenuProps) => {},
423+
getData: () => {
424+
return undefined;
425+
},
426+
};
427+
},
428+
[]
429+
);
430+
ref;
431+
return <View style={{ width: 100, height: 44, backgroundColor: 'red' }} />;
432+
});
433+
434+
type Props = NativeStackScreenProps<RootScreenParamsList>;
435+
export function MyConversationDetailScreen(props: Props) {
436+
const { route } = props;
437+
438+
return (
439+
<SafeAreaViewFragment>
440+
<ConversationDetail
441+
MessageCustomLongPressMenu={MyMessageContextNameMenu}
442+
/>
443+
</SafeAreaViewFragment>
444+
);
445+
}
446+
```
447+
448+
<ImageGallery>
449+
<ImageItem src="/images/uikit/chatuikit/ios/configurationitem/chat/Appearance_chat_messageLongPressedActions.png" title="bottom-sheet" />
450+
<ImageItem src="/images/uikit/chatuikit/ios/configurationitem/chat/[email protected]" title="context" />
451+
</ImageGallery>
452+
453+
### 自定义发送消息附件菜单样式
454+
455+
`messageInputBarStyle` 支持两种模式: `bottom-sheet``extension``bottom-sheet` 模式通过页面组件底部弹出菜单, `context` 模式通过布局组件实现。
456+
457+
在全局通过设置属性 `Container.messageInputBarStyle` 属性决定菜单样式。
458+
459+
```
460+
export function App() {
461+
return (
462+
<UIKitContainer messageInputBarStyle={'extension'}>
463+
{/* sub component */}
464+
</UIKitContainer>
465+
);
466+
}
467+
```
468+
469+
<ImageGallery>
470+
<ImageItem src="/images/uikit/chatuikit/ios/configurationitem/chat/[email protected]" title="bottom-sheet" />
471+
<ImageItem src="/images/uikit/chatuikit/ios/configurationitem/chat/[email protected]" title="context" />
472+
</ImageGallery>
473+
386474
### 事件通知
387475

388476
事件通知在列表中已经实现,收到对应事件会更新列表。通常情况下,不需要开发者关注。

docs/uikit/chatuikit/react-native/releasenote.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# React Native 单群聊 UIKit 更新日志
22

3+
## 版本 2.4.1
4+
5+
### 修复
6+
7+
- 页面布局问题。详见 [GestureHandlerRootView](https://github.com/software-mansion/react-native-gesture-handler) 相关内容。
8+
9+
## 版本 2.4.0
10+
11+
### 新增特性
12+
13+
- [新增消息上下文菜单样式,原来的样式和新增样式可选](chatuikit_chat.html#自定义消息上下文菜单样式)
14+
- [新增消息发送附件菜单样式,原来的样式和新增样式可选](chatuikit_chat.html#自定义发送消息附件菜单样式)
15+
16+
### 优化
17+
18+
- 更新 example 项目,支持 dev 模式。对于 dev 模式,可通过用户 ID 和密码登录。
19+
- dev 模式,需要连续点击 demo 版本号进行切换。
20+
- 支持 eas 云构建。
21+
322
## 版本 V2.3
423

524
### 新增特性

0 commit comments

Comments
 (0)