Skip to content

Commit 5a5ee5a

Browse files
committed
fix: merge nut-3x branch
2 parents 7c2eebc + a532330 commit 5a5ee5a

File tree

122 files changed

+6392
-2065
lines changed

Some content is hidden

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

122 files changed

+6392
-2065
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# v3.0.11
2+
3+
`2025-05-09`
4+
5+
- :bug: fix(address): 构建单一样式文件 (#3220)
6+
- 📖 docs: 升级文档补充 (#3204)
7+
- :sparkles: feat(address): v15 适配 (#3171)
8+
- :bug: fix: 修复编译单个组件在小程序下路径异常的问题 (#3215)
9+
- :bug: fix(picker): 解决透传popup的round属性不生效问题 (#3205)
10+
- zap: perf: optimize the performance issues caused by style injection (#3203)
11+
112
# v3.0.10
213

314
`2025-04-25`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nutui/nutui-react",
3-
"version": "3.0.10",
3+
"version": "3.0.11-patch.0",
44
"style": "dist/style.css",
55
"main": "dist/nutui.react.umd.js",
66
"module": "dist/es/packages/nutui.react.build.js",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const Index = () => {
8282
)}
8383
<View className="index-components-sublist">
8484
{nav.packages.map((com) =>
85-
com.show && com.taro && (harmony() ? com.dd : true) && (!search || new RegExp(search, 'ig').test(com.name.toLowerCase())) ? (
85+
com.show && com.taro && (!search || new RegExp(search, 'ig').test(com.name.toLowerCase())) ? (
8686
<View
8787
key={com.name}
8888
className="index-components-sublist-item"

scripts/build-taro.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ async function buildCSS(themeName = '') {
428428
join(`${dist}/cjs`, cssPath, `${themeDir}/css.js`),
429429
cssContent.join('\n'),
430430
)
431-
432431
// copy harmonycss
433432
if (file.indexOf('countup') === -1) {
434433
const harmonyCss = join(__dirname, '../', file.replace('scss', 'harmony.css'))

scripts/harmony/update-taro-entry.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ const isShow = (item) => {
2121

2222
// 更新 app.config.ts 文件
2323
const createConfig = async () => {
24-
const configRef = []
24+
let configRef = []
2525

2626
return new Promise((res, rej) => {
2727
config.nav.map((item) => {
2828
let co = {
2929
root: item.enName,
3030
pages: [],
3131
}
32-
if(paramG) {
33-
if(paramG === item.enName){
32+
if (paramG) {
33+
if (paramG === item.enName) {
3434
item.packages.map((it) => {
3535
if (isShow(it)) {
3636
co.pages.push(`pages/${it.name.toLowerCase()}/index`)
@@ -49,6 +49,10 @@ const createConfig = async () => {
4949
co = { ...co, pages: co.pages.sort() }
5050
configRef.push(co)
5151
})
52+
53+
// 如果 pages 数据为空,则删除该项
54+
configRef = configRef.filter((item) => item.pages.length !== 0)
55+
5256
res(configRef)
5357
})
5458
}

scripts/replace-css-var.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,36 @@ components.forEach((component) => {
4242
`../src/packages/${componentName}/${componentName}.harmony.css`,
4343
)
4444
const matched = content.match(/@import.*?[;][\n\r]?/gi)
45+
const componentSplitScss = []
4546
if (matched) {
4647
matched.forEach((m) => {
4748
if (m.indexOf('styles') > -1) {
4849
content = content.replace(m, mixin)
4950
} else {
50-
content = content.replace(m, '')
51+
// 相对路径是 ../ 是组件,所以剔除
52+
if (m.indexOf("'./") === - 1) {
53+
content = content.replace(m, '')
54+
} else {
55+
// 组件内的样式拆分
56+
content = content.replace(m, '')
57+
const splitScssName = m.match(/\'\.\/([a-z]+)\.scss/)
58+
if (splitScssName && splitScssName.length == 2) {
59+
componentSplitScss.push(fs
60+
.readFileSync(
61+
path.join(
62+
__dirname,
63+
`../src/packages/${componentName}/${splitScssName[1]}.scss`,
64+
),
65+
)
66+
.toString())
67+
}
68+
69+
}
5170
}
5271
})
5372
}
5473

55-
const res = sass.compileString(theme + variables + content)
74+
const res = sass.compileString(theme + variables + componentSplitScss.join('\n') + content)
5675
postcss([
5776
cssvariables(/*options*/),
5877
])

src/config.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -455,16 +455,16 @@
455455
"enName": "dentry",
456456
"packages": [
457457
{
458-
"version": "2.0.0",
458+
"version": "3.0.0",
459459
"name": "Address",
460460
"type": "component",
461461
"cName": "地址",
462462
"desc": "地址组件",
463463
"sort": 3,
464464
"show": true,
465465
"taro": true,
466-
"v15": 2,
467-
"author": "yangxiaolu",
466+
"v15": 1,
467+
"author": "hanyuxinting",
468468
"dd": false
469469
},
470470
{
@@ -811,7 +811,6 @@
811811
"taro": true,
812812
"jdtaro": 2,
813813
"v15": 1,
814-
815814
"author": "VickyYe",
816815
"dd": true
817816
},
@@ -1269,18 +1268,20 @@
12691268
"dd": true
12701269
},
12711270
{
1272-
"version": "2.0.0",
1271+
"version": "3.0.0",
12731272
"name": "Step",
12741273
"sort": 17,
12751274
"cName": "步骤条子组件",
12761275
"type": "component",
12771276
"show": false,
12781277
"exportEmpty": true,
12791278
"desc": "步骤条子组件",
1280-
"author": "swag~jun"
1279+
"v15": 2,
1280+
"author": "songsong",
1281+
"dd": true
12811282
},
12821283
{
1283-
"version": "2.0.0",
1284+
"version": "3.0.0",
12841285
"name": "Steps",
12851286
"type": "component",
12861287
"cName": "步骤条",
@@ -1289,8 +1290,8 @@
12891290
"show": true,
12901291
"taro": true,
12911292
"v15": 2,
1292-
"author": "swag~jun",
1293-
"dd": false
1293+
"author": "songsong",
1294+
"dd": true
12941295
},
12951296
{
12961297
"version": "3.0.0",

src/locales/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ export interface BaseLang {
6565
selectRegion: string
6666
deliveryTo: string
6767
chooseAnotherAddress: string
68+
hotCity: string
69+
selectProvince: string
6870
}
6971
signature: {
7072
reSign: string

src/locales/en-US.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const enUS: BaseLang = {
6565
selectRegion: 'Choose Address',
6666
deliveryTo: 'Delivery To',
6767
chooseAnotherAddress: 'Choose Another Address',
68+
hotCity: 'Hot City',
69+
selectProvince: 'Choose Province or City',
6870
},
6971
signature: {
7072
reSign: 'Re Sign',

src/locales/id-ID.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const idID: BaseLang = {
6666
selectRegion: 'Pilih Daerah',
6767
deliveryTo: 'Kirim Ke',
6868
chooseAnotherAddress: 'Pilih alamat lain',
69+
hotCity: 'Kota-kota populer',
70+
selectProvince: 'Pilih provinsi/wilayah',
6971
},
7072
signature: {
7173
reSign: 'Masuk Kembali',

0 commit comments

Comments
 (0)