antd-mobile 5.7.1 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/2x/cjs/components/dialog/confirm.js +9 -1
  2. package/2x/cjs/components/dialog/dialog.js +2 -2
  3. package/2x/cjs/components/form/form-array.d.ts +1 -0
  4. package/2x/cjs/components/form/form-array.js +1 -1
  5. package/2x/cjs/components/form/form-item.d.ts +1 -1
  6. package/2x/cjs/components/form/form-item.js +6 -3
  7. package/2x/cjs/components/input/input.d.ts +3 -2
  8. package/2x/cjs/components/input/input.js +6 -0
  9. package/2x/cjs/components/modal/confirm.js +9 -1
  10. package/2x/cjs/components/modal/modal.js +2 -2
  11. package/2x/cjs/components/passcode-input/passcode-input.js +1 -1
  12. package/2x/cjs/components/popover/popover.js +6 -6
  13. package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +11 -1
  14. package/2x/cjs/components/search-bar/search-bar.js +7 -0
  15. package/2x/cjs/components/slider/slider.css +2 -0
  16. package/2x/cjs/components/slider/slider.d.ts +2 -1
  17. package/2x/cjs/components/slider/slider.js +3 -1
  18. package/2x/cjs/components/slider/thumb.d.ts +2 -1
  19. package/2x/cjs/components/slider/thumb.js +3 -2
  20. package/2x/cjs/components/text-area/text-area.d.ts +2 -2
  21. package/2x/cjs/components/text-area/text-area.js +1 -0
  22. package/2x/cjs/locales/base.d.ts +7 -0
  23. package/2x/cjs/locales/base.js +8 -1
  24. package/2x/cjs/locales/en-US.d.ts +7 -0
  25. package/2x/cjs/locales/fa-IR.d.ts +102 -0
  26. package/2x/cjs/locales/fa-IR.js +109 -0
  27. package/2x/cjs/locales/zh-CN.d.ts +7 -0
  28. package/2x/cjs/locales/zh-CN.js +8 -1
  29. package/2x/cjs/locales/zh-HK.d.ts +102 -0
  30. package/2x/cjs/locales/zh-HK.js +59 -0
  31. package/2x/cjs/locales/zh-TW.d.ts +102 -0
  32. package/2x/cjs/locales/zh-TW.js +59 -0
  33. package/2x/es/components/dialog/confirm.js +8 -1
  34. package/2x/es/components/dialog/dialog.js +2 -2
  35. package/2x/es/components/form/form-array.d.ts +1 -0
  36. package/2x/es/components/form/form-array.js +1 -1
  37. package/2x/es/components/form/form-item.d.ts +1 -1
  38. package/2x/es/components/form/form-item.js +6 -3
  39. package/2x/es/components/input/input.d.ts +3 -2
  40. package/2x/es/components/input/input.js +6 -0
  41. package/2x/es/components/modal/confirm.js +8 -1
  42. package/2x/es/components/modal/modal.js +2 -2
  43. package/2x/es/components/passcode-input/passcode-input.js +1 -1
  44. package/2x/es/components/popover/popover.js +1 -1
  45. package/2x/es/components/pull-to-refresh/pull-to-refresh.js +10 -1
  46. package/2x/es/components/search-bar/search-bar.js +7 -0
  47. package/2x/es/components/slider/slider.css +2 -0
  48. package/2x/es/components/slider/slider.d.ts +2 -1
  49. package/2x/es/components/slider/slider.js +3 -1
  50. package/2x/es/components/slider/thumb.d.ts +2 -1
  51. package/2x/es/components/slider/thumb.js +3 -2
  52. package/2x/es/components/text-area/text-area.d.ts +2 -2
  53. package/2x/es/components/text-area/text-area.js +1 -0
  54. package/2x/es/locales/base.d.ts +7 -0
  55. package/2x/es/locales/base.js +8 -1
  56. package/2x/es/locales/en-US.d.ts +7 -0
  57. package/2x/es/locales/fa-IR.d.ts +102 -0
  58. package/2x/es/locales/fa-IR.js +99 -0
  59. package/2x/es/locales/zh-CN.d.ts +7 -0
  60. package/2x/es/locales/zh-CN.js +8 -1
  61. package/2x/es/locales/zh-HK.d.ts +102 -0
  62. package/2x/es/locales/zh-HK.js +49 -0
  63. package/2x/es/locales/zh-TW.d.ts +102 -0
  64. package/2x/es/locales/zh-TW.js +49 -0
  65. package/2x/package.json +8 -8
  66. package/cjs/components/dialog/confirm.js +9 -1
  67. package/cjs/components/dialog/dialog.js +2 -2
  68. package/cjs/components/form/form-array.d.ts +1 -0
  69. package/cjs/components/form/form-array.js +1 -1
  70. package/cjs/components/form/form-item.d.ts +1 -1
  71. package/cjs/components/form/form-item.js +6 -3
  72. package/cjs/components/input/input.d.ts +3 -2
  73. package/cjs/components/input/input.js +6 -0
  74. package/cjs/components/modal/confirm.js +9 -1
  75. package/cjs/components/modal/modal.js +2 -2
  76. package/cjs/components/passcode-input/passcode-input.js +1 -1
  77. package/cjs/components/popover/popover.js +6 -6
  78. package/cjs/components/pull-to-refresh/pull-to-refresh.js +11 -1
  79. package/cjs/components/search-bar/search-bar.js +7 -0
  80. package/cjs/components/slider/slider.css +2 -0
  81. package/cjs/components/slider/slider.d.ts +2 -1
  82. package/cjs/components/slider/slider.js +3 -1
  83. package/cjs/components/slider/thumb.d.ts +2 -1
  84. package/cjs/components/slider/thumb.js +3 -2
  85. package/cjs/components/text-area/text-area.d.ts +2 -2
  86. package/cjs/components/text-area/text-area.js +1 -0
  87. package/cjs/locales/base.d.ts +7 -0
  88. package/cjs/locales/base.js +8 -1
  89. package/cjs/locales/en-US.d.ts +7 -0
  90. package/cjs/locales/fa-IR.d.ts +102 -0
  91. package/cjs/locales/fa-IR.js +109 -0
  92. package/cjs/locales/zh-CN.d.ts +7 -0
  93. package/cjs/locales/zh-CN.js +8 -1
  94. package/cjs/locales/zh-HK.d.ts +102 -0
  95. package/cjs/locales/zh-HK.js +59 -0
  96. package/cjs/locales/zh-TW.d.ts +102 -0
  97. package/cjs/locales/zh-TW.js +59 -0
  98. package/es/components/dialog/confirm.js +8 -1
  99. package/es/components/dialog/dialog.js +2 -2
  100. package/es/components/form/form-array.d.ts +1 -0
  101. package/es/components/form/form-array.js +1 -1
  102. package/es/components/form/form-item.d.ts +1 -1
  103. package/es/components/form/form-item.js +6 -3
  104. package/es/components/input/input.d.ts +3 -2
  105. package/es/components/input/input.js +6 -0
  106. package/es/components/modal/confirm.js +8 -1
  107. package/es/components/modal/modal.js +2 -2
  108. package/es/components/passcode-input/passcode-input.js +1 -1
  109. package/es/components/popover/popover.js +1 -1
  110. package/es/components/pull-to-refresh/pull-to-refresh.js +10 -1
  111. package/es/components/search-bar/search-bar.js +7 -0
  112. package/es/components/slider/slider.css +2 -0
  113. package/es/components/slider/slider.d.ts +2 -1
  114. package/es/components/slider/slider.js +3 -1
  115. package/es/components/slider/thumb.d.ts +2 -1
  116. package/es/components/slider/thumb.js +3 -2
  117. package/es/components/text-area/text-area.d.ts +2 -2
  118. package/es/components/text-area/text-area.js +1 -0
  119. package/es/locales/base.d.ts +7 -0
  120. package/es/locales/base.js +8 -1
  121. package/es/locales/en-US.d.ts +7 -0
  122. package/es/locales/fa-IR.d.ts +102 -0
  123. package/es/locales/fa-IR.js +99 -0
  124. package/es/locales/zh-CN.d.ts +7 -0
  125. package/es/locales/zh-CN.js +8 -1
  126. package/es/locales/zh-HK.d.ts +102 -0
  127. package/es/locales/zh-HK.js +49 -0
  128. package/es/locales/zh-TW.d.ts +102 -0
  129. package/es/locales/zh-TW.js +49 -0
  130. package/package.json +8 -8
  131. package/umd/antd-mobile.js +1 -1
  132. package/2x/cjs/components/popover/temp-floating-ui.min.d.ts +0 -1
  133. package/2x/cjs/components/popover/temp-floating-ui.min.js +0 -1
  134. package/2x/es/components/popover/temp-floating-ui.min.d.ts +0 -1
  135. package/2x/es/components/popover/temp-floating-ui.min.js +0 -1
  136. package/cjs/components/popover/temp-floating-ui.min.d.ts +0 -1
  137. package/cjs/components/popover/temp-floating-ui.min.js +0 -1
  138. package/es/components/popover/temp-floating-ui.min.d.ts +0 -1
  139. package/es/components/popover/temp-floating-ui.min.js +0 -1
@@ -1,7 +1,9 @@
1
1
  export declare const base: {
2
+ locale: string;
2
3
  common: {
3
4
  confirm: string;
4
5
  cancel: string;
6
+ loading: string;
5
7
  };
6
8
  Calendar: {
7
9
  markItems: string[];
@@ -91,5 +93,10 @@ export declare const base: {
91
93
  Modal: {
92
94
  ok: string;
93
95
  };
96
+ PullToRefresh: {
97
+ pulling: string;
98
+ canRelease: string;
99
+ complete: string;
100
+ };
94
101
  };
95
102
  export declare type Locale = typeof base;
@@ -1,8 +1,10 @@
1
1
  const typeTemplate = '${label} is not a valid ${type}';
2
2
  export const base = {
3
+ locale: 'en',
3
4
  common: {
4
5
  confirm: 'Confirm',
5
- cancel: 'Cancel'
6
+ cancel: 'Cancel',
7
+ loading: 'Loading...'
6
8
  },
7
9
  Calendar: {
8
10
  markItems: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
@@ -91,5 +93,10 @@ export const base = {
91
93
  },
92
94
  Modal: {
93
95
  ok: 'OK'
96
+ },
97
+ PullToRefresh: {
98
+ pulling: 'Scroll down to refresh',
99
+ canRelease: 'Release to refresh immediately',
100
+ complete: 'Refresh successful'
94
101
  }
95
102
  };
@@ -1,7 +1,9 @@
1
1
  declare const enUS: {
2
+ locale: string;
2
3
  common: {
3
4
  confirm: string;
4
5
  cancel: string;
6
+ loading: string;
5
7
  };
6
8
  Calendar: {
7
9
  markItems: string[];
@@ -91,5 +93,10 @@ declare const enUS: {
91
93
  Modal: {
92
94
  ok: string;
93
95
  };
96
+ PullToRefresh: {
97
+ pulling: string;
98
+ canRelease: string;
99
+ complete: string;
100
+ };
94
101
  };
95
102
  export default enUS;
@@ -0,0 +1,102 @@
1
+ declare const faIR: {
2
+ locale: string;
3
+ common: {
4
+ confirm: string;
5
+ cancel: string;
6
+ loading: string;
7
+ };
8
+ Calendar: {
9
+ markItems: string[];
10
+ renderYearAndMonth: (year: number, month: number) => string;
11
+ };
12
+ Cascader: {
13
+ placeholder: string;
14
+ };
15
+ Dialog: {
16
+ ok: string;
17
+ };
18
+ ErrorBlock: {
19
+ default: {
20
+ title: string;
21
+ description: string;
22
+ };
23
+ busy: {
24
+ title: string;
25
+ description: string;
26
+ };
27
+ disconnected: {
28
+ title: string;
29
+ description: string;
30
+ };
31
+ empty: {
32
+ title: string;
33
+ description: string;
34
+ };
35
+ };
36
+ Form: {
37
+ required: string;
38
+ optional: string;
39
+ defaultValidateMessages: {
40
+ default: string;
41
+ required: string;
42
+ enum: string;
43
+ whitespace: string;
44
+ date: {
45
+ format: string;
46
+ parse: string;
47
+ invalid: string;
48
+ };
49
+ types: {
50
+ string: string;
51
+ method: string;
52
+ array: string;
53
+ object: string;
54
+ number: string;
55
+ date: string;
56
+ boolean: string;
57
+ integer: string;
58
+ float: string;
59
+ regexp: string;
60
+ email: string;
61
+ url: string;
62
+ hex: string;
63
+ };
64
+ string: {
65
+ len: string;
66
+ min: string;
67
+ max: string;
68
+ range: string;
69
+ };
70
+ number: {
71
+ len: string;
72
+ min: string;
73
+ max: string;
74
+ range: string;
75
+ };
76
+ array: {
77
+ len: string;
78
+ min: string;
79
+ max: string;
80
+ range: string;
81
+ };
82
+ pattern: {
83
+ mismatch: string;
84
+ };
85
+ };
86
+ };
87
+ ImageUploader: {
88
+ uploading: string;
89
+ };
90
+ Mask: {
91
+ name: string;
92
+ };
93
+ Modal: {
94
+ ok: string;
95
+ };
96
+ PullToRefresh: {
97
+ pulling: string;
98
+ canRelease: string;
99
+ complete: string;
100
+ };
101
+ };
102
+ export default faIR;
@@ -0,0 +1,99 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const typeTemplate = '${label} یک ${type} معتبر نیست';
4
+ const faIR = mergeLocale(base, {
5
+ locale: 'fa-IR',
6
+ common: {
7
+ confirm: 'تایید',
8
+ cancel: 'لغو'
9
+ },
10
+ Calendar: {
11
+ markItems: ['شنبه', 'یک‌شنبه', 'دو‌شنبه', 'سه‌شنبه', 'چهار‌شنبه', 'پنج‌نشبه', 'جمعه'],
12
+ renderYearAndMonth: (year, month) => `${year}/${month}`
13
+ },
14
+ Cascader: {
15
+ placeholder: 'انتخاب کنید'
16
+ },
17
+ Dialog: {
18
+ ok: 'باشه'
19
+ },
20
+ ErrorBlock: {
21
+ default: {
22
+ title: 'اوه، مشکلی پیش آمد',
23
+ description: 'لطفاً یک دقیقه صبر کنید و دوباره امتحان کنید'
24
+ },
25
+ busy: {
26
+ title: 'اوه، بارگیری نمی شود',
27
+ description: 'سعی کنید صفحه را به روز کنید'
28
+ },
29
+ disconnected: {
30
+ title: 'شبکه مشغول است',
31
+ description: 'سعی کنید صفحه را به روز کنید'
32
+ },
33
+ empty: {
34
+ title: 'هوم، نتونستم پیداش کنم...',
35
+ description: 'آیا می خواهید یک جستجوی جدید را امتحان کنید؟'
36
+ }
37
+ },
38
+ Form: {
39
+ required: 'اجباری',
40
+ optional: 'اختیاری',
41
+ defaultValidateMessages: {
42
+ default: 'خطای اعتبارسنجی فیلد برای ${label}',
43
+ required: 'لطفا وارد کنید ${label}',
44
+ enum: '${label} باید یکی از [${enum}]',
45
+ whitespace: '${label} نمی تواند یک کاراکتر خالی باشد',
46
+ date: {
47
+ format: '${label} قالب تاریخ نامعتبر است',
48
+ parse: '${label} نمی توان به تاریخ تبدیل کرد',
49
+ invalid: '${label} تاریخ نامعتبر است'
50
+ },
51
+ types: {
52
+ string: typeTemplate,
53
+ method: typeTemplate,
54
+ array: typeTemplate,
55
+ object: typeTemplate,
56
+ number: typeTemplate,
57
+ date: typeTemplate,
58
+ boolean: typeTemplate,
59
+ integer: typeTemplate,
60
+ float: typeTemplate,
61
+ regexp: typeTemplate,
62
+ email: typeTemplate,
63
+ url: typeTemplate,
64
+ hex: typeTemplate
65
+ },
66
+ string: {
67
+ len: 'تعداد کاراکترهای ${label} باید ${len} کاراکتر باشد',
68
+ min: 'حداقل کاراکترهای ${label} باید ${min} کاراکتر باشد',
69
+ max: 'حداکثر کاراکترهای ${label} باید ${max} کاراکتر باشد',
70
+ range: 'تعداد کاراکترهای ${label} باید بین ${min}-${max} کاراکتر باشد'
71
+ },
72
+ number: {
73
+ len: 'تعداد اعداد ${label} باید برابر با ${len} باشد',
74
+ min: 'تعداد اعداد ${label} باید حداقل ${min} باشد',
75
+ max: 'تعداد اعداد ${label} باید حداکثر ${max} باشد',
76
+ range: 'تعداد اعداد ${label} باید بین ${min}-${max} باشد'
77
+ },
78
+ array: {
79
+ len: 'طول آیتم‌های ${label} باید برابر با ${len} باشد',
80
+ min: 'آیتم‌های ${label} باید حداقل ${min} باشد',
81
+ max: 'آیتم‌های ${label} باید حداکثر ${max} باشد',
82
+ range: 'آیتم‌های ${label} باید بین ${min}-${max} باشد'
83
+ },
84
+ pattern: {
85
+ mismatch: '${label} با الگوی ${pattern} مطابقت ندارد'
86
+ }
87
+ }
88
+ },
89
+ ImageUploader: {
90
+ uploading: 'در حال آپلود...'
91
+ },
92
+ Mask: {
93
+ name: 'ماسک'
94
+ },
95
+ Modal: {
96
+ ok: 'باشه'
97
+ }
98
+ });
99
+ export default faIR;
@@ -1,7 +1,9 @@
1
1
  declare const zhCN: {
2
+ locale: string;
2
3
  common: {
3
4
  confirm: string;
4
5
  cancel: string;
6
+ loading: string;
5
7
  };
6
8
  Calendar: {
7
9
  markItems: string[];
@@ -91,5 +93,10 @@ declare const zhCN: {
91
93
  Modal: {
92
94
  ok: string;
93
95
  };
96
+ PullToRefresh: {
97
+ pulling: string;
98
+ canRelease: string;
99
+ complete: string;
100
+ };
94
101
  };
95
102
  export default zhCN;
@@ -2,9 +2,11 @@ import { mergeLocale } from '../utils/merge-locale';
2
2
  import { base } from './base';
3
3
  const typeTemplate = '${label}不是一个有效的${type}';
4
4
  const zhCN = mergeLocale(base, {
5
+ locale: 'zh-CH',
5
6
  common: {
6
7
  confirm: '确定',
7
- cancel: '取消'
8
+ cancel: '取消',
9
+ loading: '加载中……'
8
10
  },
9
11
  Calendar: {
10
12
  markItems: ['一', '二', '三', '四', '五', '六', '日'],
@@ -93,6 +95,11 @@ const zhCN = mergeLocale(base, {
93
95
  },
94
96
  Modal: {
95
97
  ok: '我知道了'
98
+ },
99
+ PullToRefresh: {
100
+ pulling: '下拉刷新',
101
+ canRelease: '释放立即刷新',
102
+ complete: '刷新成功'
96
103
  }
97
104
  });
98
105
  export default zhCN;
@@ -0,0 +1,102 @@
1
+ declare const zhHK: {
2
+ locale: string;
3
+ common: {
4
+ confirm: string;
5
+ cancel: string;
6
+ loading: string;
7
+ };
8
+ Calendar: {
9
+ markItems: string[];
10
+ renderYearAndMonth: (year: number, month: number) => string;
11
+ };
12
+ Cascader: {
13
+ placeholder: string;
14
+ };
15
+ Dialog: {
16
+ ok: string;
17
+ };
18
+ ErrorBlock: {
19
+ default: {
20
+ title: string;
21
+ description: string;
22
+ };
23
+ busy: {
24
+ title: string;
25
+ description: string;
26
+ };
27
+ disconnected: {
28
+ title: string;
29
+ description: string;
30
+ };
31
+ empty: {
32
+ title: string;
33
+ description: string;
34
+ };
35
+ };
36
+ Form: {
37
+ required: string;
38
+ optional: string;
39
+ defaultValidateMessages: {
40
+ default: string;
41
+ required: string;
42
+ enum: string;
43
+ whitespace: string;
44
+ date: {
45
+ format: string;
46
+ parse: string;
47
+ invalid: string;
48
+ };
49
+ types: {
50
+ string: string;
51
+ method: string;
52
+ array: string;
53
+ object: string;
54
+ number: string;
55
+ date: string;
56
+ boolean: string;
57
+ integer: string;
58
+ float: string;
59
+ regexp: string;
60
+ email: string;
61
+ url: string;
62
+ hex: string;
63
+ };
64
+ string: {
65
+ len: string;
66
+ min: string;
67
+ max: string;
68
+ range: string;
69
+ };
70
+ number: {
71
+ len: string;
72
+ min: string;
73
+ max: string;
74
+ range: string;
75
+ };
76
+ array: {
77
+ len: string;
78
+ min: string;
79
+ max: string;
80
+ range: string;
81
+ };
82
+ pattern: {
83
+ mismatch: string;
84
+ };
85
+ };
86
+ };
87
+ ImageUploader: {
88
+ uploading: string;
89
+ };
90
+ Mask: {
91
+ name: string;
92
+ };
93
+ Modal: {
94
+ ok: string;
95
+ };
96
+ PullToRefresh: {
97
+ pulling: string;
98
+ canRelease: string;
99
+ complete: string;
100
+ };
101
+ };
102
+ export default zhHK;
@@ -0,0 +1,49 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const zhHK = mergeLocale(base, {
4
+ locale: 'zh-HK',
5
+ common: {
6
+ confirm: '確定',
7
+ cancel: '取消',
8
+ loading: '加載中……'
9
+ },
10
+ Cascader: {
11
+ placeholder: '請選擇'
12
+ },
13
+ Dialog: {
14
+ ok: '我知道了'
15
+ },
16
+ ErrorBlock: {
17
+ default: {
18
+ title: '頁面遇到一些小問題',
19
+ description: '待會來試試'
20
+ },
21
+ busy: {
22
+ title: '前方擁堵',
23
+ description: '刷新試試'
24
+ },
25
+ disconnected: {
26
+ title: '網絡有點忙',
27
+ description: '動動手指幫忙修復'
28
+ },
29
+ empty: {
30
+ title: '沒有找到您需要的東西',
31
+ description: '找找其他的吧'
32
+ }
33
+ },
34
+ ImageUploader: {
35
+ uploading: '上傳中...'
36
+ },
37
+ Mask: {
38
+ name: '遮罩層'
39
+ },
40
+ Modal: {
41
+ ok: '我知道了'
42
+ },
43
+ PullToRefresh: {
44
+ pulling: '下拉刷新',
45
+ canRelease: '釋放立即刷新',
46
+ complete: '刷新成功'
47
+ }
48
+ });
49
+ export default zhHK;
@@ -0,0 +1,102 @@
1
+ declare const zhTW: {
2
+ locale: string;
3
+ common: {
4
+ confirm: string;
5
+ cancel: string;
6
+ loading: string;
7
+ };
8
+ Calendar: {
9
+ markItems: string[];
10
+ renderYearAndMonth: (year: number, month: number) => string;
11
+ };
12
+ Cascader: {
13
+ placeholder: string;
14
+ };
15
+ Dialog: {
16
+ ok: string;
17
+ };
18
+ ErrorBlock: {
19
+ default: {
20
+ title: string;
21
+ description: string;
22
+ };
23
+ busy: {
24
+ title: string;
25
+ description: string;
26
+ };
27
+ disconnected: {
28
+ title: string;
29
+ description: string;
30
+ };
31
+ empty: {
32
+ title: string;
33
+ description: string;
34
+ };
35
+ };
36
+ Form: {
37
+ required: string;
38
+ optional: string;
39
+ defaultValidateMessages: {
40
+ default: string;
41
+ required: string;
42
+ enum: string;
43
+ whitespace: string;
44
+ date: {
45
+ format: string;
46
+ parse: string;
47
+ invalid: string;
48
+ };
49
+ types: {
50
+ string: string;
51
+ method: string;
52
+ array: string;
53
+ object: string;
54
+ number: string;
55
+ date: string;
56
+ boolean: string;
57
+ integer: string;
58
+ float: string;
59
+ regexp: string;
60
+ email: string;
61
+ url: string;
62
+ hex: string;
63
+ };
64
+ string: {
65
+ len: string;
66
+ min: string;
67
+ max: string;
68
+ range: string;
69
+ };
70
+ number: {
71
+ len: string;
72
+ min: string;
73
+ max: string;
74
+ range: string;
75
+ };
76
+ array: {
77
+ len: string;
78
+ min: string;
79
+ max: string;
80
+ range: string;
81
+ };
82
+ pattern: {
83
+ mismatch: string;
84
+ };
85
+ };
86
+ };
87
+ ImageUploader: {
88
+ uploading: string;
89
+ };
90
+ Mask: {
91
+ name: string;
92
+ };
93
+ Modal: {
94
+ ok: string;
95
+ };
96
+ PullToRefresh: {
97
+ pulling: string;
98
+ canRelease: string;
99
+ complete: string;
100
+ };
101
+ };
102
+ export default zhTW;
@@ -0,0 +1,49 @@
1
+ import { mergeLocale } from '../utils/merge-locale';
2
+ import { base } from './base';
3
+ const zhTW = mergeLocale(base, {
4
+ locale: 'zh-TW',
5
+ common: {
6
+ confirm: '確定',
7
+ cancel: '取消',
8
+ loading: '加載中……'
9
+ },
10
+ Cascader: {
11
+ placeholder: '請選擇'
12
+ },
13
+ Dialog: {
14
+ ok: '我知道了'
15
+ },
16
+ ErrorBlock: {
17
+ default: {
18
+ title: '頁面遇到一些小問題',
19
+ description: '待會來試試'
20
+ },
21
+ busy: {
22
+ title: '前方擁堵',
23
+ description: '刷新試試'
24
+ },
25
+ disconnected: {
26
+ title: '網路有點忙',
27
+ description: '動動手指幫忙修復'
28
+ },
29
+ empty: {
30
+ title: '沒有找到您需要的東西',
31
+ description: '找找其他的吧'
32
+ }
33
+ },
34
+ ImageUploader: {
35
+ uploading: '上傳中...'
36
+ },
37
+ Mask: {
38
+ name: '遮罩層'
39
+ },
40
+ Modal: {
41
+ ok: '我知道了'
42
+ },
43
+ PullToRefresh: {
44
+ pulling: '下拉刷新',
45
+ canRelease: '釋放立即刷新',
46
+ complete: '刷新成功'
47
+ }
48
+ });
49
+ export default zhTW;
package/2x/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.7.1",
3
+ "version": "5.8.1",
4
4
  "dependencies": {
5
- "@floating-ui/dom": "^0.3.1",
6
- "@react-spring/web": "^9.4.3",
5
+ "@floating-ui/dom": "^0.4.1",
6
+ "@react-spring/web": "^9.4.4",
7
7
  "@types/resize-observer-browser": "^0.1.7",
8
- "@use-gesture/react": "^10.2.7",
9
- "ahooks": "^3.1.10",
8
+ "@use-gesture/react": "^10.2.10",
9
+ "ahooks": "^3.1.14",
10
10
  "antd-mobile-icons": "^0.2.2",
11
11
  "antd-mobile-v5-count": "^1.0.1",
12
12
  "classnames": "^2.3.1",
13
- "dayjs": "^1.10.8",
13
+ "dayjs": "^1.11.0",
14
14
  "lodash": "^4.17.21",
15
- "rc-field-form": "^1.23.1",
15
+ "rc-field-form": "^1.24.0",
16
16
  "staged-components": "^1.1.2",
17
17
  "tslib": "^2.3.1"
18
18
  },
@@ -39,5 +39,5 @@
39
39
  "branch": "master",
40
40
  "platform": "github"
41
41
  },
42
- "packageManager": "yarn@3.1.1"
42
+ "packageManager": "yarn@3.2.0"
43
43
  }
@@ -11,13 +11,21 @@ var _show = require("./show");
11
11
 
12
12
  var _withDefaultProps = require("../../utils/with-default-props");
13
13
 
14
+ var _configProvider = require("../config-provider");
15
+
14
16
  const defaultProps = {
15
17
  confirmText: '确认',
16
18
  cancelText: '取消'
17
19
  };
18
20
 
19
21
  function confirm(p) {
20
- const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
22
+ const {
23
+ locale
24
+ } = (0, _configProvider.getDefaultConfig)();
25
+ const props = (0, _withDefaultProps.mergeProps)(defaultProps, {
26
+ confirmText: locale.common.confirm,
27
+ cancelText: locale.common.cancel
28
+ }, p);
21
29
  return new Promise(resolve => {
22
30
  (0, _show.show)(Object.assign(Object.assign({}, props), {
23
31
  closeOnAction: true,
@@ -53,9 +53,9 @@ const Dialog = p => {
53
53
  scale: props.visible ? 1 : 0.8,
54
54
  opacity: props.visible ? 1 : 0,
55
55
  config: {
56
- mass: 1,
56
+ mass: 1.2,
57
57
  tension: 200,
58
- friction: 30,
58
+ friction: 25,
59
59
  clamp: true
60
60
  },
61
61
  onStart: () => {
@@ -13,6 +13,7 @@ export interface FormArrayProps {
13
13
  name: string | number | (string | number)[];
14
14
  initialValue?: any[];
15
15
  renderHeader?: (field: FormArrayField, operation: FormArrayOperation) => ReactNode;
16
+ onAdd?: (operation: FormArrayOperation) => void;
16
17
  renderAdd?: () => ReactNode;
17
18
  children: (fields: FormArrayField[], operation: FormArrayOperation) => ReactElement[];
18
19
  }