Skip to content

Commit 916e625

Browse files
committed
ifx:pull master
2 parents 89f3778 + 13394f7 commit 916e625

File tree

14 files changed

+43
-21
lines changed

14 files changed

+43
-21
lines changed

example/base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@example/base",
3-
"version": "2.10.0",
3+
"version": "2.10.1",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -10,7 +10,7 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13-
"@uiw/react-native": "2.10.0",
13+
"@uiw/react-native": "2.10.1",
1414
"react": "17.0.2",
1515
"react-native": "0.65.1",
1616
"react-native-svg": "12.1.1"

example/examples/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "examples",
3-
"version": "2.10.0",
3+
"version": "2.10.1",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -14,7 +14,7 @@
1414
"@react-native-picker/picker": "2.1.0",
1515
"@react-navigation/native": "6.0.4",
1616
"@react-navigation/stack": "6.0.9",
17-
"@uiw/react-native": "2.10.0",
17+
"@uiw/react-native": "2.10.1",
1818
"react": "17.0.2",
1919
"react-native": "0.65.1",
2020
"react-native-gesture-handler": "1.10.3",

example/examples/src/routes/Rating/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ export default class Index extends Component<IndexProps, IndexState> {
3535
<Rating
3636
defaultRating={2}
3737
resultRating={10}
38-
icon={[<Icon name="star-off" />, <Icon name="star-on" />]}
39-
// icon={["star-off", "star-on"]}
38+
icon={{
39+
unactived: <Icon name="star-off" />,
40+
actived: <Icon name="star-on" />,
41+
}}
4042
onPress={console.log}
4143
/>
4244
<View style={styles.divider} />

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.10.0",
2+
"version": "2.10.1",
33
"packages": ["example/*", "packages/*", "website"],
44
"npmClient": "yarn",
55
"npmClientArgs": ["--production", "--no-optional"],

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uiw/react-native",
3-
"version": "2.10.0",
3+
"version": "2.10.1",
44
"description": "UIW for React Native",
55
"homepage": "https://uiwjs.github.io/react-native-uiw/",
66
"main": "lib/index.js",

packages/core/src/Drawer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function Demo() {
5757
## 注意事项 - 抽屉高度是页面有效高度
5858

5959
```jsx
60-
import { Fragment } from 'react';
60+
import { Fragment, useState } from 'react';
6161
import { View, Text, SafeAreaView } from 'react-native';
6262
import { Drawer, Button } from '@uiw/react-native';
6363

@@ -101,7 +101,7 @@ export default () => {
101101

102102

103103
// 在使用组件页面
104-
import { Fragment } from 'react';
104+
import { Fragment, useState } from 'react';
105105
import { View, Text, SafeAreaView } from 'react-native';
106106
import { Drawer, Button } from '@uiw/react-native';
107107
import {RootSiblingPortal} from 'react-native-root-siblings';

packages/core/src/Rating/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ export interface RatingProps {
5757
size?: number;
5858
/** icon 颜色 */
5959
color?: string;
60-
/** [未选中, 已选中] */
61-
icon?: icoType;
60+
/** actived 激活 unactived 未激活 */
61+
icon?: {
62+
actived?: TabsItemIconTypes,
63+
unactived?: TabsItemIconTypes
64+
};
6265
/**
6366
* void
6467
* @param score type: number 选中几个

packages/core/src/Rating/index.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, StyleSheet, Text, TouchableOpacity } from 'react-native';
2+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
33

44
import Icon, { IconsName } from '../Icon';
55
import { TabsItemIconTypes } from '../Tabs/TabsItem';
@@ -14,8 +14,11 @@ export interface RatingProps {
1414
size?: number;
1515
/** icon 颜色 */
1616
color?: string;
17-
/** [未选中, 已选中] */
18-
icon?: icoType;
17+
/** actived 激活 unactived 未激活 */
18+
icon?: {
19+
actived?: TabsItemIconTypes;
20+
unactived?: TabsItemIconTypes;
21+
};
1922
/**
2023
* void
2124
* @param score type: number 得到几分
@@ -35,8 +38,8 @@ export interface RatingState {
3538
export default class Rating extends React.Component<RatingProps, RatingState> {
3639
constructor(props: RatingProps) {
3740
super(props);
38-
let start = (props.icon && props.icon[0]) || 'star-off';
39-
let end = (props.icon && props.icon[1]) || 'star-on';
41+
let start = (props.icon && props.icon.unactived) || 'star-off';
42+
let end = (props.icon && props.icon.actived) || 'star-on';
4043
this.state = {
4144
defaultRating: props.defaultRating || 0,
4245
resultRating: props.resultRating || 5,

packages/core/src/SegmentedControl/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ function Demo() {
8585
|------|------|-----|------|
8686
| `actived` | 激活 | String | `#fff` |
8787
| `unactived` | 未激活 | String | `color` |
88-
```ts

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uiw/react-native-doc",
3-
"version": "2.10.0",
3+
"version": "2.10.1",
44
"license": "MIT",
55
"homepage": "https://uiwjs.github.io/react-native-uiw/",
66
"repository": {

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "website",
3-
"version": "2.10.0",
3+
"version": "2.10.1",
44
"description": "Documentation site for React Native UIW.",
55
"private": true,
66
"scripts": {
@@ -17,7 +17,7 @@
1717
"@rematch/loading": "2.1.1",
1818
"@uiw/react-code-preview": "2.1.4",
1919
"@uiw/react-markdown-preview": "3.4.0",
20-
"@uiw/react-native": "2.10.0",
20+
"@uiw/react-native": "2.10.1",
2121
"@uiw/react-native-template": "2.1.4",
2222
"@uiw/reset.css": "1.0.5",
2323
"react": "17.0.2",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Markdown, { importAll } from '../../../component/Markdown';
2+
3+
export default class Page extends Markdown {
4+
path = '/packages/core/src/Table/README.md';
5+
getMarkdown = async () => {
6+
const md = await import('@uiw/react-native/lib/Table/README.md');
7+
// 支持 markdown 中,相对于当前 index.tsx 相对路径引入图片资源
8+
importAll((require as any).context('./', true, /\.(png|gif|jpg|svg)$/), this.imageFiles);
9+
return md.default || md;
10+
};
11+
}

website/src/routes/menus.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const componentMenus: MenuData[] = [
99
{ divider: true, name: 'Layout' },
1010
{ path: '/components/divider', name: 'Divider 分割线' },
1111
{ path: '/components/flex', name: 'Flex 布局' },
12+
{ path: '/components/table', name: 'Table 表格' },
1213
{ path: '/components/spacing', name: 'Spacing 间距' },
1314
{ path: '/components/winblank', name: 'WingBlank 两翼留白' },
1415
{ divider: true, name: 'Navigation' },

website/src/routes/router.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export const getRouterData = {
7878
'/components/flex': {
7979
component: dynamicWrapper([], () => import('../pages/components/flex')),
8080
},
81+
'/components/table': {
82+
component: dynamicWrapper([], () => import('../pages/components/table')),
83+
},
8184
'/components/spacing': {
8285
component: dynamicWrapper([], () => import('../pages/components/spacing')),
8386
},

0 commit comments

Comments
 (0)