Skip to content

Commit 15b3c0e

Browse files
author
dennis.zpf
committed
feat: 合并master
2 parents 64a10d8 + cf6c7bf commit 15b3c0e

Some content is hidden

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

66 files changed

+467
-161
lines changed

CHANGELOG.md

+58-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [3.0.7](https://github.com/ant-design/ant-design-mini/compare/3.0.6...3.0.7)
8+
9+
- fix: display range problem [`#1383`](https://github.com/ant-design/ant-design-mini/pull/1383)
10+
- Fix card divier [`#1378`](https://github.com/ant-design/ant-design-mini/pull/1378)
11+
- fix: card divider [`#1377`](https://github.com/ant-design/ant-design-mini/pull/1377)
12+
13+
#### [3.0.6](https://github.com/ant-design/ant-design-mini/compare/3.0.6-beta.1...3.0.6)
14+
15+
> 9 January 2025
16+
17+
- fix: form onValueChange validate time series problem [`#1372`](https://github.com/ant-design/ant-design-mini/pull/1372)
18+
- Feat/table ellipse [`#1365`](https://github.com/ant-design/ant-design-mini/pull/1365)
19+
- Add wx:key [`#1370`](https://github.com/ant-design/ant-design-mini/pull/1370)
20+
- Wx problem fix [`#1364`](https://github.com/ant-design/ant-design-mini/pull/1364)
21+
22+
#### [3.0.6-beta.1](https://github.com/ant-design/ant-design-mini/compare/3.0.5...3.0.6-beta.1)
23+
24+
> 8 January 2025
25+
26+
- feat: 表头也支持换行 [`8372463`](https://github.com/ant-design/ant-design-mini/commit/8372463e104f4b05b557ccfb5b4550a35a837ee6)
27+
- fix: 去掉注释 [`ec936a0`](https://github.com/ant-design/ant-design-mini/commit/ec936a03d87dcc978490a5d078679c385f8ec75e)
28+
- fix: merge master [`5edad2b`](https://github.com/ant-design/ant-design-mini/commit/5edad2bf8cbe585199b545ba577d7499f4f4e4d1)
29+
30+
#### [3.0.5](https://github.com/ant-design/ant-design-mini/compare/3.0.4...3.0.5)
31+
32+
> 7 January 2025
33+
34+
- Feat/table ellipse [`#1359`](https://github.com/ant-design/ant-design-mini/pull/1359)
35+
- Update the link to the correct migration documentation [`#1325`](https://github.com/ant-design/ant-design-mini/pull/1325)
36+
- fix-some-demo-op [`#1341`](https://github.com/ant-design/ant-design-mini/pull/1341)
37+
- fix: popup title cant display in wechat platform [`#1358`](https://github.com/ant-design/ant-design-mini/pull/1358)
38+
- CascaderPicker引用路径错误修正 [`#1343`](https://github.com/ant-design/ant-design-mini/pull/1343)
39+
- Optimize docs [`#1354`](https://github.com/ant-design/ant-design-mini/pull/1354)
40+
- docs: update doc [`6832e64`](https://github.com/ant-design/ant-design-mini/commit/6832e64d97eff3d6bf951033e48ff2c18fe19bd7)
41+
742
#### [3.0.4](https://github.com/ant-design/ant-design-mini/compare/3.0.3...3.0.4)
843

944
> 30 December 2024
@@ -628,14 +663,36 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
628663
- feat: 增加函数式组件的说明 [`#828`](https://github.com/ant-design/ant-design-mini/pull/828)
629664
- fix: 修改 demo 的 appid [`#830`](https://github.com/ant-design/ant-design-mini/pull/830)
630665

631-
### [2.11.0](https://github.com/ant-design/ant-design-mini/compare/1.10.8...2.11.0)
666+
### [2.11.0](https://github.com/ant-design/ant-design-mini/compare/1.10.9...2.11.0)
632667

633668
> 12 September 2023
634669
635670
- feat: 升级到 2.0 [`#826`](https://github.com/ant-design/ant-design-mini/pull/826)
636671
- fix: should not use element selector [`#808`](https://github.com/ant-design/ant-design-mini/pull/808)
637672
- feat: 使用 vm 进行测试 [`#817`](https://github.com/ant-design/ant-design-mini/pull/817)
638673

674+
#### [1.10.9](https://github.com/ant-design/ant-design-mini/compare/1.10.9-alpha.2...1.10.9)
675+
676+
> 9 January 2025
677+
678+
- chore: update version [`f7ceaa5`](https://github.com/ant-design/ant-design-mini/commit/f7ceaa51f428162444609463323e9775c3c64a27)
679+
680+
#### [1.10.9-alpha.2](https://github.com/ant-design/ant-design-mini/compare/1.10.9-alpha.1...1.10.9-alpha.2)
681+
682+
> 8 January 2025
683+
684+
- fix: form onValueChange validate time series problem [`0d8ea96`](https://github.com/ant-design/ant-design-mini/commit/0d8ea966341de9e9707ecf8b168483b31019ca2f)
685+
- fix: picker view render [`be21b03`](https://github.com/ant-design/ant-design-mini/commit/be21b036622f05b747fe1c7dcac88fa2a5fe7f06)
686+
- chore: update version [`4bd2c5a`](https://github.com/ant-design/ant-design-mini/commit/4bd2c5a4e6b1d0d4a26714ef49d6055c199cf8b2)
687+
688+
#### [1.10.9-alpha.1](https://github.com/ant-design/ant-design-mini/compare/1.10.8...1.10.9-alpha.1)
689+
690+
> 8 January 2025
691+
692+
- fix: form onValueChange validate time series problem [`d33653b`](https://github.com/ant-design/ant-design-mini/commit/d33653bdebf6b5da6e21da2713b117c3fdffc8dc)
693+
- fix: form onValueChange validate time series problem [`eb5faed`](https://github.com/ant-design/ant-design-mini/commit/eb5faedd487c605679bd5591b5f477f32b0a7364)
694+
- fix: form onValueChange validate time series problem [`8613b1e`](https://github.com/ant-design/ant-design-mini/commit/8613b1ee116ec23f4ce3bd919dc10f10cd0f23b0)
695+
639696
#### [1.10.8](https://github.com/ant-design/ant-design-mini/compare/1.10.7...1.10.8)
640697

641698
> 30 December 2024

demo/pages/Checkbox/index.axml

+4-2
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@
107107
<block
108108
a:for="{{ customOptions }}"
109109
a:for-index="index"
110-
a:for-item="option">
110+
a:for-item="option"
111+
a:key="title">
111112
<ant-list header="{{ option.title }}">
112113
<block
113114
a:for="{{ option.list }}"
114115
a:for-index="index"
115-
a:for-item="item">
116+
a:for-item="item"
117+
a:key="value">
116118
<ant-list-item>
117119
<ant-checkbox
118120
data-value="{{ item.value }}"

demo/pages/Dialog/index.axml

+5-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,11 @@
145145
三个按钮 竖排
146146
</ant-button>
147147
</ant-container>
148+
149+
<!-- #if ALIPAY -->
148150
<ant-container
149151
title="局部插槽"
150152
className="list">
151-
<!-- #if ALIPAY -->
152153
<ant-button
153154
data-field="slotWeakVisible"
154155
onTap="handleOpen">
@@ -159,17 +160,17 @@
159160
onTap="handleOpen">
160161
强活动氛围弹框
161162
</ant-button>
162-
<!-- #endif -->
163163
</ant-container>
164+
<!-- #endif -->
164165

166+
<!-- #if ALIPAY -->
165167
<ant-container
166168
title="自定义"
167169
className="list">
168-
<!-- #if ALIPAY -->
169170
<ant-button
170171
data-field="customBodyVisible"
171172
onTap="handleOpen">
172173
完全自定义内容区
173174
</ant-button>
174-
<!-- #endif -->
175175
</ant-container>
176+
<!-- #endif -->

demo/pages/Empty/index.ts

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
const BUTTON_LISt = [
22
{
33
type: 'primary',
4-
text: '刷新重试'
4+
text: '刷新重试',
55
},
66
{
77
type: 'default',
8-
text: '网络诊断'
8+
text: '网络诊断',
99
},
1010
];
1111
Page({
1212
data: {
13-
imageUrl: 'https://mdn.alipayobjects.com/huamei_mnxlps/afts/img/A*oV92T4FXR64AAAAAAAAAAAAADkqGAQ/original',
13+
imageUrl:
14+
'https://mdn.alipayobjects.com/huamei_mnxlps/afts/img/A*oV92T4FXR64AAAAAAAAAAAAADkqGAQ/original',
1415
mode: 'page',
15-
modeList: [{
16-
label: '全页空状态',
17-
value: 'page',
18-
}, {
19-
label: '局部空状态',
20-
value: 'section',
21-
}],
16+
modeList: [
17+
{
18+
label: '全页空状态',
19+
value: 'page',
20+
},
21+
{
22+
label: '局部空状态',
23+
value: 'section',
24+
},
25+
],
2226
horizontalButtonInfo: {
2327
layout: 'horizontal',
2428
list: BUTTON_LISt,
@@ -30,6 +34,12 @@ Page({
3034
},
3135
onClickButton(buttonInfo) {
3236
console.log('onClickButton buttonInfo: ', buttonInfo);
37+
/// #if ALIPAY
3338
my.showToast({ content: `点击了按钮「${buttonInfo.text}」` });
39+
/// #endif
40+
/// #if WECHAT
41+
// @ts-ignore
42+
wx.showToast({ title: `点击了按钮「${buttonInfo.detail.text}」` });
43+
/// #endif
3444
},
3545
});

demo/pages/Form/FormBasic/index.ts

+20-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,30 @@ Page({
3636
onLoad() {
3737
this.form = new Form({
3838
initialValues: { user: { account: 'andy', phone: '10000' } },
39+
rules: {
40+
account: [
41+
{
42+
required: true,
43+
message: '请输入账号',
44+
},
45+
() => ({
46+
// 一定需要时异步函数,返回Promise对象
47+
validator: async (_, value) => {
48+
if (value.length !== 11) {
49+
throw new Error('请输入正确的账号');
50+
}
51+
},
52+
}),
53+
],
54+
},
3955
});
4056
this.form.onValueChange('user.account', (value, allValues) => {
41-
console.log('onValueChange:', value, allValues);
57+
const validates = this.form.getFieldsValidatorStatus();
58+
console.log('onValueChange:', value, allValues, validates);
4259
});
4360
this.form.onValuesChange((value, allValues) => {
44-
console.log('onValuesChange:', value, allValues);
61+
const validates = this.form.getFieldsValidatorStatus();
62+
console.log('onValuesChange:', value, allValues, validates);
4563
});
4664
/// #if WECHAT
4765
if (this.formRefList) {

demo/pages/SelectContact/index.axml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<ant-container title="基础用法">
44
<ant-select-contact
5-
height="1000rpx"
5+
height="1280rpx"
66
onSelect="onSelect"
77
recommendContactsList="{{recommendContactsList}}"
88
allContactsList="{{allContactsList}}"

demo/pages/Table/index.axml

+7
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,10 @@
5656
>
5757
<ant-table dataSource="{{dataSource}}" columns="{{fullColumns}}" displayType="FULL" className='full-table-table' />
5858
</ant-container>
59+
60+
<ant-container
61+
title="超出行数省略展示"
62+
className="list"
63+
>
64+
<ant-table dataSource="{{[{key: '0', name: '这是一行很长的数据,需要换行展示blablablabla', age: 18, sex: '男', address: '成都'}]}}" columns="{{fullColumns}}" className='full-table-table' />
65+
</ant-container>

demo/pages/Table/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const nameArr = [
2-
'小明',
2+
'小红',
33
'小何',
44
'小花',
55
'小美',
@@ -43,6 +43,7 @@ Page({
4343
key: 'name',
4444
width: 150,
4545
fixed: true,
46+
ellipsisRow: 2,
4647
},
4748
{
4849
title: '年龄',
@@ -84,9 +85,11 @@ Page({
8485
],
8586
fullColumns: [
8687
{
87-
title: '姓名',
88+
title: '这是一段很长的表头这是一段很长的表头这是一段很长的表头',
8889
dataIndex: 'name',
8990
key: 'name',
91+
ellipsisRow: 2,
92+
width: 400,
9093
},
9194
{
9295
title: '年龄',

docs/guide/faq.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: true
77

88
### 3. Can x be used with 2.x, 1.x, 0.x
99

10-
Because there is no migration cost to upgrade from 2.x, 1.x to 3.x, you can do it directly from 2.x, 1.x. upgrade to 3.x, under reference[Upgrade Guide](http://localhost:8000/guide/migration)
10+
Because there is no migration cost to upgrade from 2.x, 1.x to 3.x, you can do it directly from 2.x, 1.x. upgrade to 3.x, under reference[Upgrade Guide](https://mini.ant.design/guide/migration)
1111

1212
For 0.x, you can use the npm alias to install.
1313

docs/guide/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toc: true
77

88
### 3.x 能否和 2.x, 1.x, 0.x 一起使用
99

10-
因为 2.x, 1.x 升级到 3.x 没有迁移成本,所以你可以直接从 2.x, 1.x 升级到 3.x,参考下[升级指南](http://localhost:8000/guide/migration)
10+
因为 2.x, 1.x 升级到 3.x 没有迁移成本,所以你可以直接从 2.x, 1.x 升级到 3.x,参考下[升级指南](https://mini.ant.design/guide/migration)
1111

1212
对于 0.x, 你可以使用 npm 别名来安装。
1313

docs/guide/using-wechat.en.md

+24
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ Page({
5454
});
5555
```
5656

57+
## FAQ
58+
59+
1. The WeChat applet does not support setting default values and scope slots for slots, so the slot capability of components in the WeChat version is limited. Reference:[Slot Default Value Related Discussions](https://developers.weixin.qq.com/community/develop/doc/000a0e58acc32809d04cc948856c00)[Scope Slot Related Discussions](https://developers.weixin.qq.com/community/develop/doc/00008c24ad42083cea899887851800)
60+
61+
```axml
62+
<!-- 微信小程序本身不支持下面例子中这样的 给插槽设置默认值 -->
63+
<slot>默认值</slot>
64+
65+
<!-- 微信小程序本身不支持下面例子中这样的 作用域插槽 -->
66+
<slot item="{{item}}" index="{{index}}"></slot>
67+
```
68+
69+
2. After introducing the component, encounter `[WXML file compile error] undefined?``[WXML file compile error] WXML file not found: ./xxx` Relevant report error. Remove the following configuration from app.json and try it.
70+
71+
```diff
72+
{
73+
"pages": [
74+
"pages/index/index"
75+
],
76+
- "componentFramework": "glass-easel",
77+
- "lazyCodeLoading": "requiredComponents
78+
}
79+
```
80+
5781
## List of adapted components
5882

5983
The following is a list of components that have been adapted to WeChat applets in the antd-mini. You can use these components directly in the project.

docs/guide/using-wechat.md

+24
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ Page({
5454
});
5555
```
5656

57+
## 常见问题
58+
59+
1. 微信小程序不支持给插槽设置默认值和作用域插槽,所以微信版本中组件的插槽能力受限。参考:[插槽默认值相关讨论](https://developers.weixin.qq.com/community/develop/doc/000a0e58acc32809d04cc948856c00)[作用域插槽相关讨论](https://developers.weixin.qq.com/community/develop/doc/00008c24ad42083cea899887851800)
60+
61+
```axml
62+
<!-- 微信小程序本身不支持下面例子中这样的 给插槽设置默认值 -->
63+
<slot>默认值</slot>
64+
65+
<!-- 微信小程序本身不支持下面例子中这样的 作用域插槽 -->
66+
<slot item="{{item}}" index="{{index}}"></slot>
67+
```
68+
69+
2. 引入组件后,遇到 `[ WXML 文件编译错误] undefined?``[ WXML 文件编译错误] WXML file not found: ./xxx` 相关报错。去掉 app.json 以下配置,试试。
70+
71+
```diff
72+
{
73+
"pages": [
74+
"pages/index/index"
75+
],
76+
- "componentFramework": "glass-easel",
77+
- "lazyCodeLoading": "requiredComponents
78+
}
79+
```
80+
5781
## 已适配的组件列表
5882

5983
以下是 antd-mini 中已经适配微信小程序的组件列表,您可以直接在项目中使用这些组件。

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "antd-mini",
3-
"version": "3.0.4",
3+
"version": "3.0.7",
44
"description": "antd-mini 是支付宝小程序 UI 组件库,遵循 Ant Design 规范。",
55
"miniprogram": "compiled/wechat/src",
66
"scripts": {

scripts/axml/mapping.ts

+3
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,7 @@ export const wechatCustomMapping = {
198198
'ant-suggestion': {
199199
onSelect: 'bindselect',
200200
},
201+
'ant-empty': {
202+
onClickButton: 'bindclickbutton',
203+
},
201204
};

src/ActionSheet/index.axml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
a:for="{{ actions }}"
2929
a:for-index="index"
3030
a:for-item="item"
31-
key="{{ index }}">
31+
a:key="text">
3232
<view
3333
class="ant-actionsheet-list-item {{ item.disabled ? 'ant-actionsheet-list-item-disabled' : '' }}"
3434
hover-class="{{ item.disabled ? '' : 'ant-actionsheet-list-item-active' }}"

src/Alphabet/index.axml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<view class="alphabet-container">
22
<view
33
a:for="{{alphabet}}"
4+
a:key="*this"
45
class="alphabet-container-item {{item === touchKey ? 'alphabet-container-active' : ''}}"
56
catchTouchStart="onTouchStart"
67
catchTouchMove="onTouchMove"
@@ -14,4 +15,4 @@
1415
</view>
1516
<view class="alphabet-container-item-triangle" a:if="{{ item === touchKey }}" />
1617
</view>
17-
</view>
18+
</view>

0 commit comments

Comments
 (0)