Skip to content

Commit

Permalink
Merge pull request #1374 from ant-design/5.2.3
Browse files Browse the repository at this point in the history
5.2.3
  • Loading branch information
1uokun authored Sep 9, 2024
2 parents 6076e43 + 3e8a0e3 commit 84f828d
Show file tree
Hide file tree
Showing 16 changed files with 976 additions and 934 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ toc: false

---

### 5.2.3
`2024-09-09`
- 🔥 **Carousel**
- fix: Carousel autoplay and manual conflict. [#1259](https://github.com/ant-design/ant-design-mobile-rn/issues/1259)
- fix: **Button** `children` support `string[]` type. [~commit](https://github.com/ant-design/ant-design-mobile-rn/commit/ce08b346cd1f53c39ea9cd861626247880720af4)

### 5.2.2
`2024-08-12`
- 🔥 **NoticeBar**
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ toc: false

---

### 5.2.3
`2024-09-09`
- 🔥 **Carousel**
- fix: Carousel自动切换和手动切换冲突。[#1259](https://github.com/ant-design/ant-design-mobile-rn/issues/1259)
- fix: **Button** `children` 支持 `string[]` 类型。[~commit](https://github.com/ant-design/ant-design-mobile-rn/commit/ce08b346cd1f53c39ea9cd861626247880720af4)

### 5.2.2
`2024-08-12`
- 🔥 **NoticeBar**
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ A configurable Mobile UI specification and React-based implementation.
> HTML5 Preview: [ant-design-mobile-rn/index.html](https://1uokun.github.io/ant-design-mobile-rn/index.html)

|SDK 49+|
|SDK 51|
|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08" />](https://expo.dev/preview/update?message=5.2.2&updateRuntimeVersion=5.2.2&createdAt=2024-08-12T13%3A33%3A56.096Z&slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&group=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08) |
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=2e623b22-08d9-4ab2-92f2-017c7a92d5aa" />](https://expo.dev/preview/update?message=5.2.3&updateRuntimeVersion=5.2.3&createdAt=2024-09-09T09%3A01%3A36.394Z&slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&group=2e623b22-08d9-4ab2-92f2-017c7a92d5aa) |

Open the camera app on your device and scan the code above, <br>
need install expo app: https://expo.io/tools

<details><summary>Expo SDK history version</summary>
<details><summary>Expo SDK(44, 47, 49, 50) history version</summary>

|Expo SDK 44|SDK 47 iOS|SDK 47 Android|
|--|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) |
|Expo SDK 44|SDK 47 iOS|SDK 47 Android|SDK 49,50|
|--|--|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08" />](https://expo.dev/preview/update?message=5.2.2&updateRuntimeVersion=5.2.2&createdAt=2024-08-12T13%3A33%3A56.096Z&slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&group=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08) |
</details>


Expand Down
12 changes: 6 additions & 6 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ Ant Design 移动端设计规范。`@ant-design/react-native` 是 Ant Design 的
> HTML5 预览: [ant-design-mobile-rn/index.html](https://1uokun.github.io/ant-design-mobile-rn/index.html)

|SDK 49+|
|SDK 51|
|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08" />](https://expo.dev/preview/update?message=5.2.2&updateRuntimeVersion=5.2.2&createdAt=2024-08-12T13%3A33%3A56.096Z&slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&group=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08) |
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=2e623b22-08d9-4ab2-92f2-017c7a92d5aa" />](https://expo.dev/preview/update?message=5.2.3&updateRuntimeVersion=5.2.3&createdAt=2024-09-09T09%3A01%3A36.394Z&slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&group=2e623b22-08d9-4ab2-92f2-017c7a92d5aa) |

提示:使用本地原相机扫瞄上面的二维码, 需要下载 Expo App: https://expo.io/tools

<details><summary>Expo SDK历史版本</summary>
<details><summary>Expo SDK(44, 47, 49, 50) 历史版本</summary>

|Expo SDK 44|SDK 47 iOS|SDK 47 Android|
|--|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) |
|Expo SDK 44|SDK 47 iOS|SDK 47 Android|SDK 49,50|
|--|--|--|--|
| [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/expo-go?owner=1uokun&slug=ant-design-mobile-rn&releaseChannel=default&host=exp.host" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=38b3a547-ab2b-4066-95ed-400f1707dcc6&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?updateId=05f0e308-2dd5-4cb9-9e6b-1ae31561bfee&appScheme=exp&host=u.expo.dev" />](https://expo.dev/@1uokun/ant-design-mobile-rn) | [<img width="250" alt="expo/ant-design-mobile-rn" src="https://qr.expo.dev/eas-update?slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&groupId=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08" />](https://expo.dev/preview/update?message=5.2.2&updateRuntimeVersion=5.2.2&createdAt=2024-08-12T13%3A33%3A56.096Z&slug=exp&projectId=7729a68b-f881-4294-89f5-5ae751bfb2b2&group=bbf0a647-4ff2-46bd-9aad-dfd81bc6ba08) |
</details>

## 安装 & 使用
Expand Down
33 changes: 24 additions & 9 deletions components/button/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -984,22 +984,37 @@ exports[`renders ./components/button/demo/basic.tsx correctly 1`] = `
}
}
>
<Text
<View
style={
Array [
Object {
"color": "#cccccc",
"fontFamily": "antoutline",
"fontSize": 22,
"fontStyle": "normal",
"fontWeight": "normal",
"fontSize": 18,
},
Object {
"color": "#ffffff",
},
undefined,
false,
false,
]
}
>
</Text>
<Text
style={
Array [
Object {
"color": "#cccccc",
"fontFamily": "antoutline",
"fontSize": 22,
"fontStyle": "normal",
"fontWeight": "normal",
},
undefined,
]
}
>
</Text>
</View>
</View>
</View>
</View>
Expand Down
8 changes: 2 additions & 6 deletions components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import {
GestureResponderEvent,
StyleProp,
StyleSheet,
Text,
TouchableHighlight,
TouchableHighlightProps,
View,
ViewStyle,
} from 'react-native'
import { WithTheme, WithThemeStyles } from '../style'
import AntmView from '../view'
import { ButtonPropsType } from './PropsType'
import buttonStyles, { ButtonStyles } from './style/index'

Expand Down Expand Up @@ -140,11 +140,7 @@ export default class Button extends React.Component<ButtonProps, any> {
size="small"
/>
) : null}
{typeof this.props.children === 'string' ? (
<Text style={textStyle}>{this.props.children}</Text>
) : (
<>{this.props.children}</>
)}
<AntmView style={textStyle}>{this.props.children}</AntmView>
</View>
</TouchableHighlight>
)
Expand Down
37 changes: 37 additions & 0 deletions components/carousel/PropsType.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { ReactNode } from 'react'
import { ScrollViewProps, StyleProp, ViewStyle } from 'react-native'
import { CarouselStyle } from './style/index'

export interface CarouselProps extends ScrollViewProps {
accessibilityLabel?: string
autoplay?: boolean
autoplayInterval?: number
afterChange?: (index: number) => void
children?: ReactNode
dots?: boolean
dotActiveStyle?: StyleProp<ViewStyle>
dotStyle?: StyleProp<ViewStyle>
infinite?: boolean
pageStyle?: StyleProp<ViewStyle>
pagination?: (props: PaginationProps) => ReactNode
selectedIndex?: number
style?: StyleProp<ViewStyle>
styles?: Partial<CarouselStyle>
vertical?: boolean
}

export interface PaginationProps {
current: number
count: number
dotStyle?: StyleProp<ViewStyle>
dotActiveStyle?: StyleProp<ViewStyle>
styles: Partial<CarouselStyle>
vertical?: boolean
}

export interface CarouselForwardedRef {
scrollToStart: () => void
scrollToEnd: () => void
scrollNextPage: () => void
goTo: (index: number, animated?: boolean) => void
}
Loading

0 comments on commit 84f828d

Please sign in to comment.