Skip to content

Commit 90d7460

Browse files
committed
Merge branch 'feat_v3.x' into feat_switch_changing
2 parents 9150905 + cc94ce3 commit 90d7460

Some content is hidden

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

95 files changed

+1285
-1461
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# v3.0.7
2+
3+
`2025-04-03`
4+
5+
- :sparkles: feat(jdesign): 修订变量名 (#3127)
6+
- :sparkles: feat(collapse): 适配鸿蒙 (#3139)
7+
- :bug: fix(tabs): 兼容16的处理 (#3150)
8+
- :bug: fix(dialog):修复函数式调用时 hidecancel 不生效问题 (#3145)
9+
- :bug: fix(button): 样式变量无法生效问题修复 (#3142)
10+
- :bug: fix(Popup): 调整最小高度设定为 26% (#3144)
11+
- :bug: fix: popover 无法关闭的问题,删除无用代码和无用的样式变量 (#3129)
12+
- :bug: fix: contribution img failed to display (#3141)
13+
- :bug: fix(switch): 简化props使用 (#3132)
14+
- :bug: fix: tabbar config json (#3134)
15+
- 🪵 refactor(dialog): 抽离types到标准spec下,去掉web h5 wrap层 (#3147)
16+
- 🏡 chore: 修复正式环境的 publicPath (#3137)
17+
118
# v3.0.6
219

320
`2025-03-28`

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nutui/nutui-react-taro",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"style": "dist/style.css",
55
"main": "dist/nutui.react.umd.js",
66
"module": "dist/es/packages/nutui.react.build.js",
@@ -54,12 +54,14 @@
5454
"changelog": "node ./scripts/generate-changelog.js",
5555
"clone:jdharmony": "node ./scripts/harmony/clone-jdharmony.js",
5656
"dev": "vite --open --force",
57+
"dev:jmapp": "VITE_APP_PROJECT_ID=jmapp vite --open --force",
5758
"dev:rtl": "VITE_RTL=rtl vite --open --force",
5859
"dev:jrkf": "VITE_APP_PROJECT_ID=jrkf vite --open --force",
5960
"dev:taro:rn:dark": "THEME=dark pnpm dev:taro:rn",
6061
"predev:taro": "pnpm run update:taro:entry",
6162
"dev:taro": "pnpm --dir ./packages/nutui-taro-demo dev",
6263
"dev:taro:h5": "pnpm dev:taro h5",
64+
"dev:taro:h5:html": "USE_HTML=1 pnpm dev:taro h5",
6365
"predev:jdtaro": "pnpm run update:taro:entry",
6466
"dev:jdtaro": "JD=1 pnpm --dir ./packages/nutui-taro-demo dev",
6567
"dev:jdtaro:jdharmonycpp": "pnpm run clone:jdharmony cpp && pnpm run update:taro:entry && JD=1 pnpm --dir ./packages/nutui-taro-demo dev:jdharmonycpp",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ let themeStr = `src/styles/theme-default.scss`
55
const projectID = process.env.VITE_APP_PROJECT_ID
66
const JD = process.env.JD
77
console.log('JDJDJDJDJDJD', JD)
8+
const useHtml = process.env.USE_HTML
9+
console.log('useHtml', useHtml)
10+
811
if (projectID) {
912
fileStr = `src/styles/variables-${projectID}.scss`
1013
themeStr = `src/styles/theme-${projectID}.scss`
@@ -210,6 +213,7 @@ const config = {
210213
},
211214
publicPath: '/',
212215
staticDirectory: 'static',
216+
useHtmlComponents: useHtml === '1',
213217
postcss: {
214218
pxtransform: {
215219
enable: true,

packages/nutui-taro-demo/src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Component } from 'react'
2-
import './app.scss'
3-
42
import('@/sites/assets/styles/reset.scss')
53
import('@/packages/nutui.react.scss.taro')
64
import('@nutui/touch-emulator')
75

6+
import './app.scss'
7+
88
// console.log(NutUI)
99
class App extends Component {
1010
render() {

src/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,9 +960,9 @@
960960
"sort": 19,
961961
"show": true,
962962
"taro": true,
963-
"v15": 10,
963+
"v15": 1,
964964
"author": "lzz",
965-
"dd": false
965+
"dd": true
966966
},
967967
{
968968
"version": "3.0.0",

src/hooks/use-taro-rect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const getTaroRectById = (id: string) => {
1313
query
1414
.select(`#${id}`)
1515
.boundingClientRect()
16-
.exec(function (rect: any) {
16+
.exec((rect: any) => {
1717
if (rect[0]) {
1818
resolve(rect[0])
1919
} else {

src/packages/button/button.scss

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,6 @@
101101

102102
&-round {
103103
border-radius: $button-border-radius;
104-
105-
&-xlarge {
106-
border-radius: $button-xlarge-border-radius;
107-
}
108-
109-
&-large {
110-
border-radius: $button-large-border-radius;
111-
}
112-
113-
&-small {
114-
border-radius: $button-small-border-radius;
115-
}
116-
117-
&-mini {
118-
border-radius: $button-mini-border-radius;
119-
}
120104
}
121105

122106
&-default {
@@ -155,7 +139,7 @@
155139
height: $button-xlarge-height;
156140
padding: $button-xlarge-padding;
157141
font-size: $button-xlarge-font-size;
158-
border-radius: $radius-base;
142+
border-radius: $button-xlarge-border-radius;
159143

160144
.nut-button-text {
161145
margin-left: $button-xlarge-text-icon-margin;
@@ -178,7 +162,7 @@
178162
height: $button-large-height;
179163
padding: $button-large-padding;
180164
font-size: $button-large-font-size;
181-
border-radius: $radius-s;
165+
border-radius: $button-large-border-radius;
182166

183167
.nut-button-text {
184168
margin-left: $button-xlarge-text-icon-margin;
@@ -202,7 +186,7 @@
202186
height: $button-small-height;
203187
padding: $button-small-padding;
204188
font-size: $button-small-font-size;
205-
border-radius: $radius-xs;
189+
border-radius: $button-small-border-radius;
206190

207191
.nut-icon {
208192
font-size: $button-small-font-size;
@@ -219,7 +203,7 @@
219203
height: $button-mini-height;
220204
padding: $button-mini-padding;
221205
font-size: $button-mini-font-size;
222-
border-radius: $radius-xs;
206+
border-radius: $button-mini-border-radius;
223207

224208
.nut-icon {
225209
font-size: $button-mini-font-size;

src/packages/button/demo.tsx

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import { useTranslate } from '@/sites/assets/locale'
3-
import Cell from '../cell'
43
import Demo1 from './demos/h5/demo1'
54
import Demo2 from './demos/h5/demo2'
65
import Demo3 from './demos/h5/demo3'
@@ -54,41 +53,23 @@ const ButtonDemo = () => {
5453
<>
5554
<div className="demo">
5655
<h2>{translated.ce5c5446}</h2>
57-
<Cell style={{ flexWrap: 'wrap' }}>
58-
<Demo1 />
59-
</Cell>
56+
<Demo1 />
6057
<h2>{translated.e51e4582}</h2>
61-
<Cell style={{ flexWrap: 'wrap' }}>
62-
<Demo2 />
63-
</Cell>
58+
<Demo2 />
6459
<h2>{translated['0aaad622']}</h2>
65-
<Cell style={{ flexWrap: 'wrap' }}>
66-
<Demo3 />
67-
</Cell>
60+
<Demo3 />
6861
<h2>{translated['7db1a8b2']}</h2>
69-
<Cell style={{ flexWrap: 'wrap' }}>
70-
<Demo4 />
71-
</Cell>
62+
<Demo4 />
7263
<h2>{translated.ce5c5447}</h2>
73-
<Cell style={{ flexWrap: 'wrap' }}>
74-
<Demo5 />
75-
</Cell>
64+
<Demo5 />
7665
<h2>{translated.a52bef0c}</h2>
77-
<Cell style={{ flexWrap: 'wrap' }}>
78-
<Demo6 />
79-
</Cell>
66+
<Demo6 />
8067
<h2>{translated['0aaad620']}</h2>
81-
<Cell style={{ flexWrap: 'wrap' }}>
82-
<Demo7 />
83-
</Cell>
68+
<Demo7 />
8469
<h2>{translated.c9e6df49}</h2>
85-
<Cell>
86-
<Demo8 />
87-
</Cell>
70+
<Demo8 />
8871
<h2>{translated.customColor}</h2>
89-
<Cell style={{ flexWrap: 'wrap' }}>
90-
<Demo9 />
91-
</Cell>
72+
<Demo9 />
9273
</div>
9374
</>
9475
)

src/packages/button/demos/h5/demo1.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react'
2-
import { Button } from '@nutui/nutui-react'
2+
import { Button, Cell } from '@nutui/nutui-react'
33

44
const Demo1 = () => {
55
const marginStyle = { margin: 8 }
66
return (
7-
<>
7+
<Cell style={{ flexWrap: 'wrap' }}>
88
<Button type="primary" style={marginStyle}>
99
Primary
1010
</Button>
@@ -23,7 +23,7 @@ const Demo1 = () => {
2323
<Button type="success" style={marginStyle}>
2424
Success
2525
</Button>
26-
</>
26+
</Cell>
2727
)
2828
}
2929
export default Demo1

src/packages/button/demos/h5/demo2.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react'
2-
import { Button } from '@nutui/nutui-react'
2+
import { Button, Cell } from '@nutui/nutui-react'
33

44
const Demo2 = () => {
55
const marginStyle = { margin: 8 }
66
return (
7-
<>
7+
<Cell style={{ flexWrap: 'wrap' }}>
88
<Button type="primary" fill="solid" style={marginStyle}>
99
Solid
1010
</Button>
@@ -17,7 +17,7 @@ const Demo2 = () => {
1717
<Button fill="none" style={marginStyle}>
1818
None
1919
</Button>
20-
</>
20+
</Cell>
2121
)
2222
}
2323
export default Demo2

0 commit comments

Comments
 (0)