Skip to content

Commit 5d15b45

Browse files
committed
fix: 修复tset.number数值可能不准确,折叠面板可能多次添加子组件实例的问题
docs: 更新群号
1 parent 566a7b1 commit 5d15b45

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.hbuilderx/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
2+
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
3+
"version": "0.0",
4+
"configurations": [{
5+
"type": "uniCloud",
6+
"default": {
7+
"launchtype": "remote"
8+
}
9+
}
10+
]
11+
}

uview-ui/components/u-collapse-item/u-collapse-item.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
this.parent = this.$u.$parent.call(this, 'u-collapse');
111111
if(this.parent) {
112112
this.nameSync = this.name ? this.name : this.parent.childrens.length;
113-
this.parent.childrens.push(this);
113+
// 不存在时才添加本实例
114+
!this.parent.childrens.includes(this) && this.parent.childrens.push(this);
114115
this.headStyle = this.parent.headStyle;
115116
this.bodyStyle = this.parent.bodyStyle;
116117
this.arrowColor = this.parent.arrowColor;

uview-ui/libs/function/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function dateISO(value) {
3737
* 验证十进制数字
3838
*/
3939
function number(value) {
40-
return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value)
40+
return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value)
4141
}
4242

4343
/**

0 commit comments

Comments
 (0)