diff --git a/README.md b/README.md index 01e55fe0..947bd36f 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,16 @@ A configurable Mobile UI specification and React-based implementation. - **Expo demo app** +|SDK 49+ iOS|SDK 49+ Android| +|--|--| +| [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | + +
Expo SDK history version + |Expo SDK 44|SDK 47 iOS|SDK 47 Android| |--|--|--| | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | - +
> Open the camera app on your device and scan the code above,
need install expo app: https://expo.io/tools diff --git a/README.zh-CN.md b/README.zh-CN.md index cc5ed069..94a12efa 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -33,10 +33,16 @@ Ant Design 移动端设计规范。`@ant-design/react-native` 是 Ant Design 的 - **Expo demo app** +|SDK 49+ iOS|SDK 49+ Android| +|--|--| +| [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | + +
Expo SDK历史版本 + |Expo SDK 44|SDK 47 iOS|SDK 47 Android| |--|--|--| | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | [expo/ant-design-mobile-rn](https://expo.dev/@1uokun/ant-design-mobile-rn) | - +
> 提示:使用本地原相机扫瞄上面的二维码, 需要下载 Expo App: https://expo.io/tools diff --git a/example/App.js b/example/App.js index 67af603b..dcdb966a 100644 --- a/example/App.js +++ b/example/App.js @@ -1,9 +1,10 @@ -import App from '@ant-design/react-native/rn-kitchen-sink/App' import { useFonts } from 'expo-font' import * as SplashScreen from 'expo-splash-screen' import React, { useCallback } from 'react' import { View } from 'react-native' import 'react-native-gesture-handler' +import 'react-native-reanimated' +import App from '../rn-kitchen-sink/App' SplashScreen.preventAutoHideAsync() diff --git a/example/app.json b/example/app.json index 656ad6ec..585a3804 100644 --- a/example/app.json +++ b/example/app.json @@ -4,16 +4,31 @@ "expo": { "name": "@ant-design/react-native", "slug": "ant-design-mobile-rn", + "version": "5.1.0", "description": "基于蚂蚁金服移动设计规范的 React Native 组件库", - "sdkVersion": "49.0.0", "icon": "../rn-kitchen-sink/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png", "splash": { "image": "../rn-kitchen-sink/ios/KitchenSink/Images.xcassets/AppIcon.appiconset/ios-marketing-1024@1x.png" }, - "version": "5.0.3", - "entryPoint": "index.js", + "assetBundlePatterns": [ + "**/*" + ], + "experiments": { + "baseUrl": "https://1uokun.github.io/ant-design-mobile-rn/" + }, "web": { - "bundler": "metro" + "bundler": "metro", + "favicon": "./assets/favicon.png" + }, + "ios": { + "bundler": "metro", + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "../rn-kitchen-sink/ios/KitchenSink/Images.xcassets/AppIcon.appiconset/ios-marketing-1024@1x.png", + "backgroundColor": "#ffffff" + } }, "extra": { "eas": { @@ -21,12 +36,10 @@ } }, "runtimeVersion": { - "policy": "sdkVersion" + "policy": "appVersion" }, "updates": { "url": "https://u.expo.dev/7729a68b-f881-4294-89f5-5ae751bfb2b2" - }, - "android": {}, - "ios": {} + } } } diff --git a/example/assets/favicon.png b/example/assets/favicon.png new file mode 100644 index 00000000..facdb2a8 Binary files /dev/null and b/example/assets/favicon.png differ diff --git a/example/babel.config.js b/example/babel.config.js index 912653a1..e1e3637a 100644 --- a/example/babel.config.js +++ b/example/babel.config.js @@ -1,10 +1,6 @@ module.exports = function (api) { api.cache(true) return { - presets: ['babel-preset-expo', 'module:metro-react-native-babel-preset'], - plugins: [ - '@babel/plugin-proposal-export-namespace-from', - 'react-native-reanimated/plugin', - ], + presets: ['babel-preset-expo'], } } diff --git a/example/package.json b/example/package.json index 4183ff64..91c937a0 100644 --- a/example/package.json +++ b/example/package.json @@ -11,26 +11,26 @@ "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject", - "export": "expo export", - "publish": "expo publish", + "build-web": "expo export -p web", + "publish": "eas update", "prettify": "prettier --write . --config ./.prettierrc", "lint": "eslint --ext js,ts,tsx ." }, "dependencies": { "@ant-design/icons-react-native": "^2.3.2", - "@ant-design/react-native": "*", - "expo": "49", - "expo-font": "~11.0.1", - "expo-splash-screen": "~0.17.4", - "expo-updates": "~0.15.6", - "react": "18.1.0", - "react-dom": "18.1.0", - "react-native": "0.70.8", + "@expo/metro-runtime": "~3.1.3", + "expo": "^50.0.3", + "expo-splash-screen": "~0.26.3", + "expo-status-bar": "~1.11.1", + "expo-updates": "~0.24.11", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-native": "0.73.2", "react-native-gesture-handler": "~2.12.0", - "react-native-reanimated": "~2.12.0" + "react-native-web": "~0.19.6", + "react-native-reanimated": "~3.6.2" }, "devDependencies": { - "@expo/metro-runtime": "^2.2.15", - "babel-preset-expo": "~9.2.1" + "@babel/core": "^7.20.0" } } diff --git a/example/tsconfig.json b/example/tsconfig.json deleted file mode 100644 index 0e6371f6..00000000 --- a/example/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "compilerOptions": {}, - "extends": "expo/tsconfig.base" -} diff --git a/example/webpack.config.js b/example/webpack.config.js deleted file mode 100644 index d369a97d..00000000 --- a/example/webpack.config.js +++ /dev/null @@ -1,30 +0,0 @@ -const createExpoWebpackConfigAsync = require('@expo/webpack-config') - -module.exports = async function (env, argv) { - const config = await createExpoWebpackConfigAsync(env, argv) - - config.module.rules.push({ - test: /\.(js|ts|tsx)$/, - exclude: /node_modules/, - use: 'babel-loader', - }) - - config.module.rules.push({ - test: /\.(js)$/, - include: [/node_modules\/@bang88\/react-native-ultimate-listview/], - use: { - loader: 'babel-loader', - options: { - presets: [ - [ - '@babel/preset-env', - { - modules: false, - }, - ], - ], - }, - }, - }) - return config -} diff --git a/rn-kitchen-sink/components/index.js b/rn-kitchen-sink/components/index.js index ecb07919..5817ae8e 100644 --- a/rn-kitchen-sink/components/index.js +++ b/rn-kitchen-sink/components/index.js @@ -1,12 +1,12 @@ /* eslint no-console:0 */ import React from 'react' -import { ScrollView, StyleSheet, View } from 'react-native' +import { Dimensions, ScrollView, StyleSheet, View } from 'react-native' import { List, SearchBar } from '../../components' import { OTHERS, UIBARS, UICONTROLS, UIVIEWS } from '../demoList' const styles = StyleSheet.create({ container: { - flex: 1, + height: Dimensions.get('window').height, }, }) diff --git a/site/desktop/src/static/home.less b/site/desktop/src/static/home.less index 445e3132..9343f079 100644 --- a/site/desktop/src/static/home.less +++ b/site/desktop/src/static/home.less @@ -21,7 +21,7 @@ right: 40px; width: 591px; height: 407px; - background: url("https://gw.alipayobjects.com/zos/rmsportal/BYcmVgqmFmqHywEgcyVH.png") no-repeat center / cover; + background: url("https://gw.alipayobjects.com/zos/rmsportal/BYcmVgqmFmqHywEgcyVH.png?x-oss-process=image/resize,w_591/format,webp") no-repeat center / cover; } } diff --git a/site/desktop/src/static/template.html b/site/desktop/src/static/template.html index cc76f533..569dabff 100644 --- a/site/desktop/src/static/template.html +++ b/site/desktop/src/static/template.html @@ -7,7 +7,7 @@ Ant Design Mobile | A Mobile Design Specification {% if not isDev %}