mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(Area): reset method add code param (#1949)
This commit is contained in:
parent
22ad214714
commit
d7c5d02d32
@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#### 新特性
|
#### 新特性
|
||||||
|
|
||||||
|
##### Area
|
||||||
|
|
||||||
|
- `reset`方法支持传入`code`参数
|
||||||
|
|
||||||
##### Button
|
##### Button
|
||||||
|
|
||||||
- `color`属性支持渐变色
|
- `color`属性支持渐变色
|
||||||
|
@ -65,11 +65,11 @@
|
|||||||
|
|
||||||
### 方法
|
### 方法
|
||||||
|
|
||||||
通过 selectComponent 可以获取到 area 实例并调用实例方法
|
通过 selectComponent 可以获取到 Area 实例并调用实例方法
|
||||||
|
|
||||||
| 方法名 | 参数 | 返回值 | 介绍 |
|
| 方法名 | 参数 | 返回值 | 介绍 |
|
||||||
|-----------|-----------|-----------|-------------|
|
|-----------|-----------|-----------|-------------|
|
||||||
| reset | - | - | 重置所有选项到第一项 |
|
| reset | code: string | - | 根据 code 重置所有选项,若不传 code,则重置到第一项 |
|
||||||
|
|
||||||
### 省市区列表数据格式
|
### 省市区列表数据格式
|
||||||
|
|
||||||
|
@ -205,8 +205,8 @@ VantComponent({
|
|||||||
return area;
|
return area;
|
||||||
},
|
},
|
||||||
|
|
||||||
reset() {
|
reset(code) {
|
||||||
this.code = '';
|
this.code = code || '';
|
||||||
return this.setValues();
|
return this.setValues();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user