@gm-mobile/c-react 3.9.3-beta.13 → 3.9.3-beta.17
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-mobile/c-react",
|
|
3
|
-
"version": "3.9.3-beta.
|
|
3
|
+
"version": "3.9.3-beta.17",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-mobile#readme",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"url": "https://github.com/gmfe/gm-mobile/issues"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@gm-mobile/c-font": "^3.9.3-beta.
|
|
25
|
-
"@gm-mobile/c-tool": "^3.9.3-beta.
|
|
26
|
-
"@gm-mobile/locales": "^3.9.3-beta.
|
|
24
|
+
"@gm-mobile/c-font": "^3.9.3-beta.17",
|
|
25
|
+
"@gm-mobile/c-tool": "^3.9.3-beta.17",
|
|
26
|
+
"@gm-mobile/locales": "^3.9.3-beta.17"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@tarojs/components": "3.0.18",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"prop-types": "^15.7.2",
|
|
34
34
|
"react": "^16.13.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "e78a422ee30327fbfd97136029423ba39c42c613"
|
|
37
37
|
}
|
|
@@ -94,9 +94,15 @@ export class TextField extends Component<TextFieldProps, TextFieldState> {
|
|
|
94
94
|
!value.endsWith('.') &&
|
|
95
95
|
['digit', 'number'].includes(this.props.type || '')
|
|
96
96
|
) {
|
|
97
|
+
console.log(value)
|
|
97
98
|
const float = parseFloat(value.replace(/\D\./g, ''))
|
|
98
99
|
if (isNaN(float)) {
|
|
99
100
|
value = ''
|
|
101
|
+
} else if (value.endsWith('.0')) {
|
|
102
|
+
// 处理特殊情况
|
|
103
|
+
if (this.props.fractionDigits === 0) {
|
|
104
|
+
value = value.replace(/\.0$/, '')
|
|
105
|
+
}
|
|
100
106
|
} else {
|
|
101
107
|
value = clamp(
|
|
102
108
|
float,
|
|
@@ -226,6 +232,7 @@ export class TextField extends Component<TextFieldProps, TextFieldState> {
|
|
|
226
232
|
active: highlight || active,
|
|
227
233
|
highlight,
|
|
228
234
|
disabled,
|
|
235
|
+
block,
|
|
229
236
|
})}
|
|
230
237
|
width={width}
|
|
231
238
|
style={style}
|
package/src/less/border.less
CHANGED
|
@@ -98,13 +98,22 @@
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.m-border-radius-circle {
|
|
101
|
-
border-radius: 50
|
|
101
|
+
border-radius: 50% !important;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.m-border-radius-chip {
|
|
105
|
-
border-radius: 100px!important;
|
|
105
|
+
border-radius: 100px !important;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.m-border-radius-5 {
|
|
109
|
-
border-radius: 5px!important;
|
|
109
|
+
border-radius: 5px !important;
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
// 生成圆角, .m-border-radius-{1-10}
|
|
113
|
+
.generate-size(@size) when (@size<=10) {
|
|
114
|
+
.m-border-radius-@{size} {
|
|
115
|
+
border-radius: @size * 1px;
|
|
116
|
+
}
|
|
117
|
+
.generate-size(@size + 1);
|
|
118
|
+
}
|
|
119
|
+
.generate-size(0);
|