Skip to content

Commit

Permalink
feat: 删除组件<SelectCascader /> 删除依赖 @react-native-picker/picker 优化DragD…
Browse files Browse the repository at this point in the history
…rawe实例
  • Loading branch information
cuilanxin committed Jan 9, 2022
1 parent 9399fb3 commit 08d64bc
Show file tree
Hide file tree
Showing 17 changed files with 159 additions and 1,397 deletions.
563 changes: 0 additions & 563 deletions example/base/ios/Podfile.lock

This file was deleted.

6 changes: 0 additions & 6 deletions example/examples/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ PODS:
- React-perflogger (= 0.66.1)
- RNCMaskedView (0.1.11):
- React
- RNCPicker (2.1.0):
- React-Core
- RNGestureHandler (2.0.0):
- React-Core
- RNScreens (3.7.2):
Expand Down Expand Up @@ -409,7 +407,6 @@ DEPENDENCIES:
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSVG (from `../node_modules/react-native-svg`)
Expand Down Expand Up @@ -495,8 +492,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNCPicker:
:path: "../node_modules/@react-native-picker/picker"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNScreens:
Expand Down Expand Up @@ -551,7 +546,6 @@ SPEC CHECKSUMS:
React-runtimeexecutor: 33a949a51bec5f8a3c9e8d8092deb259600d761e
ReactCommon: 620442811dc6f707b4bf5e3b27d4f19c12d5a821
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNCPicker: f7a40b21b915b7a187624d52f52b7bc2f73ea413
RNGestureHandler: 51c9f32f43720c3a1c7660690a843f33acbcf01f
RNScreens: 0591543e343c7444ea1756b6265d81a4295922c9
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
Expand Down
1 change: 0 additions & 1 deletion example/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"dependencies": {
"@react-native-community/masked-view": "0.1.11",
"@react-native-picker/picker": "2.1.0",
"@react-navigation/native": "6.0.4",
"@react-navigation/stack": "6.0.9",
"@uiw/react-native": "3.0.3",
Expand Down
8 changes: 0 additions & 8 deletions example/examples/src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,6 @@ export const stackPageData: Routes[] = [
description: '由至少 2 个分段控件组成,用作不同视图的显示。',
},
},
{
name: 'SelectCascader',
component: require('./routes/SelectCascader').default,
params: {
title: 'SelectCascader 级联选择',
description: '可用于类似于省市区选择。',
},
},
{
name: 'Spacing',
component: require('./routes/Spacing').default,
Expand Down
12 changes: 7 additions & 5 deletions example/examples/src/routes/DragDrawer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, {useState, Fragment} from 'react';
import {View, Text, FlatList} from 'react-native';
import {View, Text, FlatList, ListRenderItemInfo} from 'react-native';
import {DragDrawer, Card, Icon, List} from '@uiw/react-native';
import Layout, {Container} from '../../Layout';
import {ComProps} from '../../routes';
const {Header, Body, Footer} = Layout;
const data = [];
const data: Array<number> = [];
for (let i = 1; i < 21; i++) {
data.push(i);
}
Expand All @@ -13,8 +13,10 @@ export default function DragDrawerView({route}: DragDrawerViewProps) {
const description = route.params.description;
const title = route.params.title;

const renderItem = ({item}) => (
<View style={{borderWidth: 0.5, padding: 10, borderColor: '#D9D9D9'}}>
const renderItem = ({item}: ListRenderItemInfo<Number>) => (
<View
style={{borderWidth: 0.5, padding: 10, borderColor: '#D9D9D9'}}
key={item + ''}>
<Text style={{fontSize: 20, textAlign: 'center'}}>{item}</Text>
</View>
);
Expand All @@ -28,7 +30,7 @@ export default function DragDrawerView({route}: DragDrawerViewProps) {
<FlatList
data={data}
renderItem={renderItem}
keyExtractor={item => item.id}
keyExtractor={item => item + ''}
/>
</DragDrawer>
<Container>
Expand Down
82 changes: 0 additions & 82 deletions example/examples/src/routes/SelectCascader/city.ts

This file was deleted.

90 changes: 0 additions & 90 deletions example/examples/src/routes/SelectCascader/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A UI component library based on React Native (Android & iOS).

## Install
```bash
yarn add @uiw/react-native [email protected] [email protected] @react-native-picker/[email protected] [email protected]
yarn add @uiw/react-native [email protected] [email protected] [email protected]
```

## Basic Usage
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
],
"dependencies": {
"@babel/runtime": "7.16.0",
"@react-native-picker/picker": "2.2.0",
"@types/color": "3.0.2",
"@types/lodash": "4.14.172",
"@types/react-native": "0.65.5",
Expand Down
Loading

0 comments on commit 08d64bc

Please sign in to comment.