@gm-mobile/c-react 3.12.7-beta.7 → 3.12.8-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.8-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.8-beta.1",
|
|
25
|
+
"@gm-mobile/c-tool": "^3.12.8-beta.1",
|
|
26
|
+
"@gm-mobile/locales": "^3.12.8-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": "60ceff9777dddf514fc1534f900133297b718d41"
|
|
38
38
|
}
|
|
@@ -14,6 +14,7 @@ interface Option<T> {
|
|
|
14
14
|
children: ReactNode
|
|
15
15
|
/** 将取代保存(onOk)按钮 */
|
|
16
16
|
bottom?: ReactNode
|
|
17
|
+
zIndex?: number
|
|
17
18
|
/** 入场方向 */
|
|
18
19
|
direction?: 'left' | 'right' | 'bottom' | 'top'
|
|
19
20
|
/** 点击确定按钮后的事件,返回值将作为showDialog的返回值 */
|
|
@@ -23,6 +24,7 @@ interface Option<T> {
|
|
|
23
24
|
|
|
24
25
|
export function showDialog<T>({
|
|
25
26
|
title,
|
|
27
|
+
zIndex,
|
|
26
28
|
okText = '确定',
|
|
27
29
|
cancelText = '取消',
|
|
28
30
|
left,
|
|
@@ -95,6 +97,7 @@ export function showDialog<T>({
|
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
Popup.render({
|
|
100
|
+
zIndex,
|
|
98
101
|
disabledHeader: true,
|
|
99
102
|
[direction]: true,
|
|
100
103
|
disabledAnimate: false,
|
|
@@ -27,6 +27,8 @@ export interface ChooseProps {
|
|
|
27
27
|
/** 高度 */
|
|
28
28
|
height?: string
|
|
29
29
|
onCancel?: () => void
|
|
30
|
+
/** 自定义z-index */
|
|
31
|
+
zIndex?: number
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
/** 底部弹出的选择界面 */
|
|
@@ -39,6 +41,7 @@ export default function ({
|
|
|
39
41
|
maxHeight = '50vh',
|
|
40
42
|
height,
|
|
41
43
|
onCancel,
|
|
44
|
+
zIndex,
|
|
42
45
|
}: ChooseProps) {
|
|
43
46
|
if (multiSelect) needConfirm = true
|
|
44
47
|
const selected = [...defaultSelected] as Item[]
|
|
@@ -97,6 +100,7 @@ export default function ({
|
|
|
97
100
|
})
|
|
98
101
|
const promise = showDialog<Item[]>({
|
|
99
102
|
title,
|
|
103
|
+
zIndex,
|
|
100
104
|
children: <Children />,
|
|
101
105
|
onOk: () => selected,
|
|
102
106
|
onCancel: onCancel,
|
|
@@ -35,6 +35,7 @@ const PopupBase: FC<PopupProps> = ({
|
|
|
35
35
|
isPickPopup,
|
|
36
36
|
disabledHeader,
|
|
37
37
|
disabledMask,
|
|
38
|
+
zIndex,
|
|
38
39
|
/** 动画有卡顿现象,先禁用 */
|
|
39
40
|
disabledAnimate = true,
|
|
40
41
|
children,
|
|
@@ -77,8 +78,13 @@ const PopupBase: FC<PopupProps> = ({
|
|
|
77
78
|
'm-popup-picker-container': isPickPopup,
|
|
78
79
|
})}
|
|
79
80
|
>
|
|
80
|
-
{!disabledMask && <Mask opacity={opacity} onClick={onHide}
|
|
81
|
-
|
|
81
|
+
{!disabledMask && <Mask opacity={opacity} onClick={onHide} style={{
|
|
82
|
+
zIndex: zIndex,
|
|
83
|
+
}} />}
|
|
84
|
+
<View {...rest} className={cn} style={{
|
|
85
|
+
...s,
|
|
86
|
+
zIndex: zIndex ? zIndex + 1 : undefined,
|
|
87
|
+
}}>
|
|
82
88
|
{!disabledHeader && (
|
|
83
89
|
<Flex justifyBetween alignCenter className='m-popup-top'>
|
|
84
90
|
<Flex flex column className='m-padding-left-15 m-text-16'>
|