@gm-mobile/c-react 3.9.3-beta.18 → 3.9.3-beta.19
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.19",
|
|
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.19",
|
|
25
|
+
"@gm-mobile/c-tool": "^3.9.3-beta.19",
|
|
26
|
+
"@gm-mobile/locales": "^3.9.3-beta.19"
|
|
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": "5ceb6f25a2e57298e0d8f39e58e3a997ece3a568"
|
|
37
37
|
}
|
|
@@ -68,7 +68,6 @@ export function showDialog<T>({
|
|
|
68
68
|
<Button
|
|
69
69
|
mini
|
|
70
70
|
plain
|
|
71
|
-
noRound
|
|
72
71
|
type='link'
|
|
73
72
|
className='m-text-desc m-margin-lr-0'
|
|
74
73
|
onClick={cancel}
|
|
@@ -81,7 +80,7 @@ export function showDialog<T>({
|
|
|
81
80
|
{children}
|
|
82
81
|
{bottom || (
|
|
83
82
|
<Flex className='m-padding-lr-10'>
|
|
84
|
-
<Button block
|
|
83
|
+
<Button block type='primary' onClick={() => ok()}>
|
|
85
84
|
{okText}
|
|
86
85
|
</Button>
|
|
87
86
|
</Flex>
|
|
@@ -94,7 +93,7 @@ export function showDialog<T>({
|
|
|
94
93
|
disabledHeader: true,
|
|
95
94
|
[direction]: true,
|
|
96
95
|
disabledAnimate: false,
|
|
97
|
-
onHide:
|
|
96
|
+
onHide: cancel,
|
|
98
97
|
children: <Template />,
|
|
99
98
|
})
|
|
100
99
|
})
|
|
@@ -24,6 +24,7 @@ export interface ChooseProps {
|
|
|
24
24
|
/** 搜索功能 */
|
|
25
25
|
// search?: boolean
|
|
26
26
|
maxHeight?: string
|
|
27
|
+
onCancel?: () => void
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
/** 底部弹出的选择界面 */
|
|
@@ -34,6 +35,7 @@ export default function ({
|
|
|
34
35
|
multiSelect = false,
|
|
35
36
|
defaultSelected = [],
|
|
36
37
|
maxHeight = '50vh',
|
|
38
|
+
onCancel,
|
|
37
39
|
}: ChooseProps) {
|
|
38
40
|
if (multiSelect) needConfirm = true
|
|
39
41
|
const selected = [...defaultSelected] as Item[]
|
|
@@ -93,6 +95,7 @@ export default function ({
|
|
|
93
95
|
title,
|
|
94
96
|
children: <Children />,
|
|
95
97
|
onOk: () => selected,
|
|
98
|
+
onCancel: onCancel,
|
|
96
99
|
bottom: needConfirm ? undefined : <View />,
|
|
97
100
|
})
|
|
98
101
|
return promise
|