Skip to content

Commit 593b932

Browse files
committed
Merge remote-tracking branch 'upstream/feat_v3.x' into 3.0-countdown
2 parents 54bd751 + f042dc2 commit 593b932

File tree

22 files changed

+2569
-5341
lines changed

22 files changed

+2569
-5341
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@nutui/nutui-react",
3-
"version": "3.0.0-beta.5",
2+
"name": "@nutui/nutui-react-taro",
3+
"version": "3.0.0-beta.6",
44
"style": "dist/style.css",
55
"main": "dist/nutui.react.umd.js",
66
"module": "dist/es/packages/nutui.react.build.js",
@@ -102,7 +102,7 @@
102102
},
103103
"dependencies": {
104104
"@babel/runtime": "^7.23.9",
105-
"@nutui/icons-react": "^1.0.5",
105+
"@nutui/icons-react": "^2.0.1",
106106
"@nutui/icons-react-taro": "^2.0.1",
107107
"@nutui/jdesign-icons-react-taro": "1.0.6-beta.2",
108108
"@nutui/touch-emulator": "^1.0.0",

packages/nutui-taro-demo/config/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ const config = {
7171
sourceRoot: 'src',
7272
outputRoot: `dist/${process.env.TARO_ENV === 'h5' ? 'demo' : process.env.TARO_ENV}`,
7373
plugins: [...plugins],
74-
compiler: 'webpack5',
74+
compiler: {
75+
type: 'webpack5',
76+
prebundle: {
77+
exclude: ['@nutui/icons-react-taro']
78+
},
79+
},
7580
alias:
7681
process.env.TARO_ENV === 'rn' || process.env.TARO_ENV === 'jdrn'
7782
? {

packages/nutui-taro-demo/src/pages/index/index.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Taro from '@tarojs/taro'
2+
import { useState } from 'react'
23
import {
34
View,
45
Image,
@@ -11,21 +12,19 @@ import {
1112
Video,
1213
Textarea,
1314
} from '@tarojs/components'
15+
import { SearchBar } from '@/packages/searchbar/searchbar.taro'
1416
import pkg from '@/packages/../config.json'
1517
import packageJson from '@/packages/../../package.json'
1618
import './index.scss'
17-
// import Schema from 'async-validator'
1819

1920
const navs = pkg.nav
20-
// console.log(navs)
2121

2222
// hack taro load button xml
2323
console.log(Button, Input, Video, Image, Swiper, SwiperItem, Textarea)
2424

25-
// try {
26-
// console.log('xxx', Schema)
27-
// } catch (e) {}
25+
2826
const Index = () => {
27+
const [search, setSearch] = useState()
2928
const gotoNext = (name: string, enName: string) => {
3029
// 跳转到目的页面,打开新页面
3130
Taro.navigateTo({
@@ -67,15 +66,22 @@ const Index = () => {
6766
</View>
6867
</View>
6968
</View>
70-
<View className="index-components">
69+
70+
<View className='index-components'>
71+
{process.env.NODE_ENV === 'development' ? <>
72+
<SearchBar style={{ background: '#fff' }} placeholder='' value={search} onChange={(e) => {
73+
setSearch(e)
74+
}} />
75+
<View style={{ height: 25 }}></View>
76+
</> : null}
7177
{navs.map((nav) => (
7278
<View key={nav.enName} className="index-components-item">
7379
{nav.enName === 'dataentry' ? null : (
7480
<View className="index-components-item-title">{nav.name}</View>
7581
)}
7682
<View className="index-components-sublist">
7783
{nav.packages.map((com) =>
78-
com.show && com.taro && com.version === '3.0.0' ? (
84+
com.show && com.taro && com.version === '3.0.0' && (!search || new RegExp(search, 'ig').test(com.name.toLowerCase())) ? (
7985
<View
8086
key={com.name}
8187
className="index-components-sublist-item"

0 commit comments

Comments
 (0)