Skip to content

feat:NoticeBar 通告栏增加文字样式修改功能 及 页面demo展示 #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
fc4779e
fix:发布 iOS 应用商店:一. 创建AppID
Aug 4, 2021
7370cbe
fix:发布 iOS 应用商店优化排版
Amber-Nan Aug 4, 2021
0116759
fix:合并冲突
Amber-Nan Aug 4, 2021
88ba81d
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 4, 2021
ac1455b
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 4, 2021
942ffd8
fix:ios应用商店文档更新及排版优化
Amber-Nan Aug 4, 2021
8fb23b6
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 4, 2021
c3dd513
fix:修改环境安装文档语法错误及部分内容优化
Amber-Nan Aug 4, 2021
720ab49
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 5, 2021
abcdbba
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 5, 2021
304e53e
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 5, 2021
2f5a183
fix:更新ios应用发布流程
Amber-Nan Aug 5, 2021
bdc6d5f
fix:拉代码
Amber-Nan Aug 6, 2021
413ace1
fix:ios应用商店发布更新
Amber-Nan Aug 6, 2021
4509c4b
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 9, 2021
c5f474c
fix:更新ios及安卓应用商店发布
Amber-Nan Aug 9, 2021
5c4caf8
fix:拉代码
Amber-Nan Aug 10, 2021
dc7d384
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 10, 2021
e0566db
fix:安卓上架更新
Amber-Nan Aug 10, 2021
498f195
fix:拉代码
Amber-Nan Aug 11, 2021
035558f
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 13, 2021
4e5a1cf
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Amber-Nan Aug 26, 2021
0e69653
fix:增加button自定义文本实例
Amber-Nan Aug 26, 2021
1f6058f
fix:拉取代码
Sep 13, 2021
52f4a03
fix:增加checkBox复选框size调整及文档描述效果展示
Sep 13, 2021
094eddd
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Sep 13, 2021
63660c7
fix:拉代码合并冲突
Oct 13, 2021
9c811f4
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 13, 2021
3edb7d7
拉代码
Oct 14, 2021
da65726
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 15, 2021
2455c98
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 18, 2021
3d29638
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 18, 2021
9a0b211
doc:更新文档导入图片
Oct 18, 2021
c5a1e6f
doc(website): Update Readme.md
Oct 18, 2021
2bc4671
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 20, 2021
099d980
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 21, 2021
a145168
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 21, 2021
5eb26c3
fix:修复SpeedDial Android 点击事件失效及拖拽失效问题 #286
Oct 21, 2021
2d90a2f
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 21, 2021
cb0f0be
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 22, 2021
e157d35
fix:解决SelectCascader 在安卓端不能选择问题 #289
Oct 22, 2021
cce5796
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 23, 2021
0b19db0
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 23, 2021
5d4c459
fix:修复Modal 弹出动画底层延迟收起问题
Oct 23, 2021
a9f6c04
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 23, 2021
63caed2
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 25, 2021
f728193
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 25, 2021
48121a9
Merge branch 'master' of github.com:uiwjs/react-native-uiw
Oct 25, 2021
0dc3e13
feat:NoticeBar 通告栏增加文字样式修改及页面demo展示
Oct 25, 2021
380c5cb
doc(website): Update NoticeBar Readme.md
Oct 25, 2021
a11cc1b
fix:解决 MenuDropdown 安卓下拉菜单被遮挡问题
Oct 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions example/examples/src/routes/MenuDropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {Text, StyleSheet} from 'react-native';
import {MenuDropdown} from '@uiw/react-native';
import {Text, View, StyleSheet, TouchableOpacity} from 'react-native';
import {MenuDropdown, Toast} from '@uiw/react-native';
import Layout, {Container} from '../../Layout';
import {ComProps} from '../../routes';

Expand Down Expand Up @@ -29,6 +29,12 @@ export default class MenuDropdownView extends Component<MenuDropdownProps> {
<MenuDropdown.Item>
<Text>列表</Text>
</MenuDropdown.Item>
<MenuDropdown.Item>
<TouchableOpacity
onPress={() => Toast.info('你点击了选择一', 2, 'info')}>
<Text>选择一</Text>
</TouchableOpacity>
</MenuDropdown.Item>
</MenuDropdown>
</Card>
</Body>
Expand Down
24 changes: 22 additions & 2 deletions example/examples/src/routes/NoticeBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {Image, Text, View} from 'react-native';
import {NoticeBar, Spacing} from '@uiw/react-native';
import {NoticeBar, Spacing, Icon} from '@uiw/react-native';

export default class NoticeBarExample extends Component {
render() {
Expand All @@ -10,9 +10,11 @@ export default class NoticeBarExample extends Component {
source={{
uri: 'https://zos.alipayobjects.com/rmsportal/bRnouywfdRsCcLU.png',
}}
style={{width: 12, height: 12}}
style={{width: 12, height: 12, tintColor: 'balck'}}
/>
);

const newCustomIcon = <Icon name={'star-off'} size={20} stroke={'blue'} />;
return (
<View style={{marginTop: 10}}>
<NoticeBar
Expand Down Expand Up @@ -49,6 +51,24 @@ export default class NoticeBarExample extends Component {
<NoticeBar mode="link" action={<Text>去看看</Text>}>
Link demo for `actionText`.
</NoticeBar>
<Spacing />
<NoticeBar mode="link" textStyle={{color: 'blue'}}>
Change `actionText` color
</NoticeBar>
<Spacing />
<NoticeBar
mode="link"
action={<Text style={{color: 'blue'}}>去看看</Text>}>
Change `Prompt` color
</NoticeBar>
<Spacing />
<NoticeBar
mode="link"
icon={newCustomIcon}
textStyle={{color: 'blue', fontSize: 20}}
style={{backgroundColor: 'lightblue', height: 50}}>
Change demo for `action`.
</NoticeBar>
</View>
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/MenuDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class MenuDropdown extends React.Component<MenuDropdownProps> {

const { btnIcon, listHeightValue, listHeight } = this.state;
return (
<View style={styles.menuBox}>
<View style={[styles.menuBox, { height: this.state.listHeight + 50 }]}>
<Button {...btnProps} onPress={this.handleonPress} size={size}>
<Text>{title}</Text>
<Icon name={btnIcon} size={17} />
Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/NoticeBar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ const NoticeBarExample = () => {
<NoticeBar mode="link" action={<Text>去看看</Text>}>
Link demo for `actionText`.
</NoticeBar>
<Spacing />
<NoticeBar
textStyle={{color: 'blue', fontSize: 20}}
style={{backgroundColor: 'lightblue', height: 50}}>
Change demo for `action`.
</NoticeBar>
</View>
)
}
Expand All @@ -72,3 +78,5 @@ export default NoticeBarExample;
| onPress | 点击关闭或者操作区域的回调函数 | (): void | |
| marqueeProps | marquee 参数 | Object | `{loop: false, leading: 500, trailing: 800, fps: 40, style: {}}` |
| action | 用于替换操作 icon 的文案 | ReactElement | |
| style | 用于设置通告栏样式 | ViewStyle | |
| textStyle | 用于设置通告栏文字样式 | TextStyle | |
8 changes: 5 additions & 3 deletions packages/core/src/NoticeBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { StyleProp, Text, TouchableWithoutFeedback, View, ViewStyle, StyleSheet } from 'react-native';
import { StyleProp, Text, TouchableWithoutFeedback, View, ViewStyle, TextStyle, StyleSheet } from 'react-native';
import Icon from '../Icon';
import Marquee, { MarqueeProps } from './Marquee';

Expand All @@ -9,6 +9,7 @@ export type NoticeBarProps = {
onPress?: any;
icon?: any;
action?: any;
textStyle?: StyleProp<TextStyle>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Amber-Nan 新增API请更新文档

Copy link
Contributor Author

@Amber-Nan Amber-Nan Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的 @jaywcjlove

style?: StyleProp<ViewStyle>;
marqueeProps?: MarqueeProps;
};
Expand All @@ -25,7 +26,8 @@ export default (props: NoticeBarProps) => {
setShow(false);
}
};
let { children, mode, icon, style, action, marqueeProps } = props;
let { children, mode, icon, style, action, marqueeProps, textStyle } = props;

let operationDom: any = null;
icon = typeof icon === 'undefined' ? <Icon name="notification" color="#f4333c" size={15} /> : icon;
if (mode === 'closable') {
Expand All @@ -41,7 +43,7 @@ export default (props: NoticeBarProps) => {
<View style={[styles.notice, style]}>
{icon && <View style={styles.left15}>{icon}</View>}
<View style={[styles.container, icon ? styles.left6 : styles.left15]}>
<Marquee style={styles.content} text={children} {...marqueeProps} />
<Marquee style={[styles.content, textStyle]} text={children} {...marqueeProps} />
</View>
{operationDom}
</View>
Expand Down