@gm-mobile/c-react 3.12.11-beta.0 → 3.12.12-beta.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-mobile/c-react",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.12-beta.1",
|
|
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.12.
|
|
25
|
-
"@gm-mobile/c-tool": "^3.12.
|
|
26
|
-
"@gm-mobile/locales": "^3.12.
|
|
24
|
+
"@gm-mobile/c-font": "^3.12.12-beta.1",
|
|
25
|
+
"@gm-mobile/c-tool": "^3.12.12-beta.1",
|
|
26
|
+
"@gm-mobile/locales": "^3.12.12-beta.1",
|
|
27
27
|
"dayjs": "^1.11.6"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"prop-types": "^15.7.2",
|
|
35
35
|
"react": "^16.13.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "8241f847ca2e7cfbbb67076d8d89f00e20c3977b"
|
|
38
38
|
}
|
|
@@ -93,7 +93,15 @@ export class TextField extends Component<TextFieldProps, TextFieldState> {
|
|
|
93
93
|
if (!mp) e.persist()
|
|
94
94
|
let value = mp ? e.detail.value : e.target.value
|
|
95
95
|
if (this.state.needClear) {
|
|
96
|
-
|
|
96
|
+
const oldValue = String(this.props.value || '')
|
|
97
|
+
const newValue = String(value || '')
|
|
98
|
+
|
|
99
|
+
// 找出新增的字符
|
|
100
|
+
const inputChar = newValue.split('').find((char, index) => {
|
|
101
|
+
return oldValue[index] !== char
|
|
102
|
+
})
|
|
103
|
+
// 这里需要用this.props.value 与当前value对比, 找到不同的值
|
|
104
|
+
value = inputChar
|
|
97
105
|
this.setState({ ...this.state, needClear: false })
|
|
98
106
|
}
|
|
99
107
|
const { min, max } = this.props
|