Skip to content

Commit 3caca30

Browse files
authored
Merge branch 'feat_v3.x' into hxy/uploader/refactor
2 parents e232ce7 + f042dc2 commit 3caca30

File tree

109 files changed

+4618
-5892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+4618
-5892
lines changed

migrate-from-v2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ plugins: [
608608
- 移除 `isAsync`,通过 `checked`实现
609609
- 移除 `activeColor` ,通过css变量`--nutui-switch-open-background-color`实现
610610
- 移除 `inactiveColor`,通过css变量`--nutui-switch-close-background-color`实现
611+
- `activeText 属性类型更改为 `ReactNode`
612+
- `inactiveText` 属性类型更改为 `ReactNode`
611613

612614
#### Toast
613615

@@ -821,6 +823,8 @@ plugins: [
821823
- `upIconName` 重命名为 `riseIcon`,类型修改为 `React.Node`
822824
- `downIconName` 重命名为 `dropIcon`,类型修改为 `React.Node`
823825
- 移除 `iconSize`,通过`riseIcon``dropIcon`自定义传入icon大小
826+
- 新增 `size`,star 尺寸, 默认值 `normal``12px`
827+
- 新增 `showScore`, 展示评分
824828

825829
#### Video
826830

package.json

Lines changed: 4 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",
@@ -132,6 +132,7 @@
132132
"@tarojs/components": "4.0.8-beta.1",
133133
"@tarojs/plugin-platform-alipay": "4.0.8-beta.1",
134134
"@tarojs/plugin-platform-weapp": "4.0.8-beta.1",
135+
"@tarojs/plugin-platform-jd": "4.0.8-beta.1",
135136
"@tarojs/react": "4.0.8-beta.1",
136137
"@tarojs/taro": "4.0.8-beta.1",
137138
"@testing-library/jest-dom": "^6.4.2",

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)