@gm-mobile/c-react 3.9.6-beta.2 → 3.9.6
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.6
|
|
3
|
+
"version": "3.9.6",
|
|
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.6
|
|
25
|
-
"@gm-mobile/c-tool": "^3.9.6
|
|
26
|
-
"@gm-mobile/locales": "^3.9.6
|
|
24
|
+
"@gm-mobile/c-font": "^3.9.6",
|
|
25
|
+
"@gm-mobile/c-tool": "^3.9.6",
|
|
26
|
+
"@gm-mobile/locales": "^3.9.6"
|
|
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": "695c72ec31adad0a9a4f6d1253394491cc2fae83"
|
|
37
37
|
}
|
|
@@ -11,10 +11,9 @@ import { Flex } from '../flex'
|
|
|
11
11
|
|
|
12
12
|
/** 数字按钮 */
|
|
13
13
|
export const defaultDigitalKeys = [
|
|
14
|
-
...['7', '8', '9'].map((v, _) => new DKBtn({ label: v })),
|
|
15
|
-
...['4', '5', '6'].map((v, _) => new DKBtn({ label: v })),
|
|
16
14
|
...['1', '2', '3'].map((v, _) => new DKBtn({ label: v })),
|
|
17
|
-
new DKBtn({ label:
|
|
15
|
+
...['4', '5', '6'].map((v, _) => new DKBtn({ label: v })),
|
|
16
|
+
...['7', '8', '9'].map((v, _) => new DKBtn({ label: v })),
|
|
18
17
|
new DKBtn({
|
|
19
18
|
label: '.',
|
|
20
19
|
fn: (value = '') => {
|
|
@@ -28,13 +27,8 @@ export const defaultDigitalKeys = [
|
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
29
|
}),
|
|
31
|
-
new DKBtn({
|
|
32
|
-
|
|
33
|
-
fn: (value) => {
|
|
34
|
-
if (value.length === 0) return value
|
|
35
|
-
return value.slice(0, value.length - 1)
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
30
|
+
new DKBtn({ label: '0' }),
|
|
31
|
+
new DKBtn({ label: '清零', className: 'btn-clear', fn: (_) => '' }),
|
|
38
32
|
]
|
|
39
33
|
|
|
40
34
|
/** 右侧功能按钮 */
|
|
@@ -121,7 +115,7 @@ export const Keyboard: FC<KeyboardProps> = ({
|
|
|
121
115
|
>
|
|
122
116
|
<View
|
|
123
117
|
className={classNames(
|
|
124
|
-
'keyboard-button digital m-text-
|
|
118
|
+
'keyboard-button digital m-text-22',
|
|
125
119
|
btn.className
|
|
126
120
|
)}
|
|
127
121
|
onClick={() => handleInput(btn)}
|
|
@@ -150,7 +144,20 @@ export const Keyboard: FC<KeyboardProps> = ({
|
|
|
150
144
|
)}
|
|
151
145
|
onClick={() => handleInput(btn)}
|
|
152
146
|
>
|
|
153
|
-
{btn.label
|
|
147
|
+
{btn.label ? (
|
|
148
|
+
btn.label
|
|
149
|
+
) : (
|
|
150
|
+
<Flex alignCenter justifyCenter className='bt-delete'>
|
|
151
|
+
<View className='triangle' />
|
|
152
|
+
<Flex
|
|
153
|
+
alignCenter
|
|
154
|
+
justifyCenter
|
|
155
|
+
className='m-text-14 m-text-white square'
|
|
156
|
+
>
|
|
157
|
+
x
|
|
158
|
+
</Flex>
|
|
159
|
+
</Flex>
|
|
160
|
+
)}
|
|
154
161
|
</View>
|
|
155
162
|
</Flex>
|
|
156
163
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.keyboard {
|
|
2
|
-
@background: darken(white,
|
|
2
|
+
@background: darken(white, 8);
|
|
3
3
|
@btn: white;
|
|
4
4
|
@text: black;
|
|
5
5
|
background-color: @background;
|
|
@@ -13,17 +13,18 @@
|
|
|
13
13
|
top: 0;
|
|
14
14
|
}
|
|
15
15
|
.keyboard-item {
|
|
16
|
-
padding:
|
|
17
|
-
height:
|
|
16
|
+
padding: 3.5px;
|
|
17
|
+
height: 44px;
|
|
18
18
|
.keyboard-button {
|
|
19
19
|
display: flex;
|
|
20
|
+
font-family: DINPro-Medium, DINPro;
|
|
20
21
|
justify-content: center;
|
|
21
22
|
align-items: center;
|
|
22
23
|
width: 100%;
|
|
23
24
|
height: 100%;
|
|
24
25
|
color: @text;
|
|
25
|
-
|
|
26
|
-
border-radius:
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
border-radius: 4px;
|
|
27
28
|
background-color: @btn;
|
|
28
29
|
overflow: hidden;
|
|
29
30
|
cursor: pointer;
|
|
@@ -45,5 +46,35 @@
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
}
|
|
49
|
+
|
|
50
|
+
.btn-ok {
|
|
51
|
+
background-color: #06C160;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.btn-clear {
|
|
55
|
+
font-size: 15px !important;
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bt-delete {
|
|
60
|
+
padding-right: 10px;
|
|
61
|
+
.square {
|
|
62
|
+
width: 18px;
|
|
63
|
+
height: 18px;
|
|
64
|
+
background: #000000;
|
|
65
|
+
border-bottom-right-radius: 2px;
|
|
66
|
+
border-top-right-radius: 2px;
|
|
67
|
+
border-top-left-radius: 3px;
|
|
68
|
+
border-bottom-left-radius: 3px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.triangle {
|
|
72
|
+
width: 0;
|
|
73
|
+
height: 0;
|
|
74
|
+
border: 9px solid;
|
|
75
|
+
border-color: transparent #000000 transparent transparent;
|
|
76
|
+
margin-right: -2px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
48
79
|
}
|
|
49
80
|
}
|
|
@@ -165,19 +165,26 @@ export class DigitalKeyboard {
|
|
|
165
165
|
/** 自定义功能按钮 */
|
|
166
166
|
get actionKeys() {
|
|
167
167
|
return [
|
|
168
|
-
new DKBtn({
|
|
168
|
+
new DKBtn({
|
|
169
|
+
label: '',
|
|
170
|
+
// className: 'iconfont icon-backspace m-text-26',
|
|
171
|
+
fn: (value) => {
|
|
172
|
+
if (value.length === 0) return value
|
|
173
|
+
return value.slice(0, value.length - 1)
|
|
174
|
+
},
|
|
175
|
+
}),
|
|
169
176
|
new DKBtn({
|
|
170
177
|
label: '下一个',
|
|
171
|
-
className: 'm-
|
|
178
|
+
className: 'm-text-black btn-clear',
|
|
172
179
|
fn: (value) => {
|
|
173
180
|
this.next()
|
|
174
181
|
return this.form[this.active]
|
|
175
182
|
},
|
|
176
183
|
}),
|
|
177
184
|
new DKBtn({
|
|
178
|
-
label: '
|
|
185
|
+
label: '确定',
|
|
179
186
|
flex: 2,
|
|
180
|
-
className: '
|
|
187
|
+
className: 'btn-ok m-text-white',
|
|
181
188
|
fn: (value) => {
|
|
182
189
|
return this.form[this.active]
|
|
183
190
|
},
|