Skip to content

Commit 56f239d

Browse files
authored
feat(address): v15 适配 (#3171)
* feat: 添加电梯模式 * feat: 构造数据 * feat: tabs 切换处理 * feat: 修复最后一个元素可以一直被添加的问题 * feat: taro 适配 * feat: 热门城市反选 * feat: 走查代码 * feat: add docs and fix types * feat: 调整某些写法 * fix: 修改展示逻辑 * fix: 鸿蒙样式 * feat: 增加是否展示滚动条 * test: fixed * test: fixed * fix: build error * fix: spell error * refactor: 重构类型及相关实现 * fix: import path * fix: ai cr * fix: 修订left 传入 * docs: add update version * fix: types
1 parent e84f671 commit 56f239d

39 files changed

+2094
-211
lines changed

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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,6 @@ async function buildCSS(themeName = '') {
428428
join(`${dist}/cjs`, cssPath, `${themeDir}/css.js`),
429429
cssContent.join('\n'),
430430
)
431-
432-
// copy harmonycss
433-
if (file.indexOf('countup') === -1) {
434-
const harmonyCss = join(__dirname, '../', file.replace('scss', 'harmony.css'))
435-
await copy(harmonyCss, join(`${dist}/cjs`, cssPath, 'style/style.harmony.css'))
436-
await copy(harmonyCss, join(`${dist}/es`, cssPath, 'style/style.harmony.css'))
437-
}
438431
}
439432
}
440433

src/config.json

Lines changed: 3 additions & 3 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
{

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',

src/locales/tr-TR.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ const trTR: BaseLang = {
7474
selectRegion: 'Lütfen bölgenizi seçin',
7575
deliveryTo: 'Teslimat yeri',
7676
chooseAnotherAddress: 'Başka bir adres seçin',
77+
hotCity: 'Popüler şehirler',
78+
selectProvince: 'İl/bölge seçin',
7779
},
7880
signature: {
7981
reSign: 'Yeniden imzala',

src/locales/zh-CN.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const zhCN: BaseLang = {
6767
selectRegion: '请选择地址',
6868
deliveryTo: '配送至',
6969
chooseAnotherAddress: '选择其他地址',
70+
hotCity: '热门城市',
71+
selectProvince: '选择省份/地区',
7072
},
7173
signature: {
7274
reSign: '重签',

src/locales/zh-TW.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const zhCN: BaseLang = {
6767
selectRegion: '請選擇地址',
6868
deliveryTo: '配送至',
6969
chooseAnotherAddress: '選擇其他地址',
70+
hotCity: '熱門城市',
71+
selectProvince: '選擇省份/地區',
7072
},
7173
signature: {
7274
reSign: '重簽',

src/locales/zh-UG.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const zhUG: BaseLang = {
6565
selectRegion: 'ئادىرىسنى تاللاڭ',
6666
deliveryTo: 'قەيەرگە',
6767
chooseAnotherAddress: 'باشقىنى تاللاش',
68+
hotCity: 'ئاۋات شەھەرلەر',
69+
selectProvince: 'ئۆلكە / شەھەرنى تاللاڭ',
6870
},
6971
signature: {
7072
reSign: 'قايتا',

src/packages/address/__test__/__snapshots__/address.spec.tsx.snap

Lines changed: 6 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)