@whitesev/pops 2.0.4 → 2.0.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/dist/index.amd.js +7 -3
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +7 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +7 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +7 -3
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +7 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/components/loading/indexType.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/loading/config.ts +1 -1
- package/src/components/loading/index.ts +6 -3
- package/src/components/loading/indexType.ts +7 -0
|
@@ -20,4 +20,11 @@ export interface PopsLoadingDetails extends Omit<PopsCommonConfig, "width" | "he
|
|
|
20
20
|
* (可选)添加主CSS,默认为true,当页面中存在anim覆盖时,可能会有一些样式问题,取消添加该CSS即可解决
|
|
21
21
|
*/
|
|
22
22
|
addIndexCSS?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 为pops-anim和pops-mask设置position: absolute(需要自行设置parent的position为relative)
|
|
25
|
+
*
|
|
26
|
+
* 它们默认的position为fixed
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
isAbsolute?: boolean;
|
|
23
30
|
}
|
package/package.json
CHANGED
|
@@ -79,9 +79,6 @@ export class PopsLoading {
|
|
|
79
79
|
maskHTML: maskHTML,
|
|
80
80
|
});
|
|
81
81
|
$mask = _handleMask_.maskElement;
|
|
82
|
-
// 遮罩层必须是跟随主内容
|
|
83
|
-
// 即设置主内容position: relative,mask:position: absolute
|
|
84
|
-
popsDOMUtils.css($mask, "position", "absolute !important");
|
|
85
82
|
elementList.push($mask);
|
|
86
83
|
}
|
|
87
84
|
let eventDetails = PopsHandler.handleLoadingEventDetails(
|
|
@@ -103,6 +100,12 @@ export class PopsLoading {
|
|
|
103
100
|
maskElement: $mask!,
|
|
104
101
|
} as any);
|
|
105
102
|
|
|
103
|
+
if (config.isAbsolute) {
|
|
104
|
+
// 遮罩层必须是跟随主内容
|
|
105
|
+
// 即设置主内容position: relative,mask:position: absolute
|
|
106
|
+
popsDOMUtils.css($anim, "position", "absolute !important");
|
|
107
|
+
$mask && popsDOMUtils.css($mask, "position", "absolute !important");
|
|
108
|
+
}
|
|
106
109
|
return PopsHandler.handleResultDetails(eventDetails);
|
|
107
110
|
}
|
|
108
111
|
}
|
|
@@ -28,4 +28,11 @@ export interface PopsLoadingDetails
|
|
|
28
28
|
* (可选)添加主CSS,默认为true,当页面中存在anim覆盖时,可能会有一些样式问题,取消添加该CSS即可解决
|
|
29
29
|
*/
|
|
30
30
|
addIndexCSS?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 为pops-anim和pops-mask设置position: absolute(需要自行设置parent的position为relative)
|
|
33
|
+
*
|
|
34
|
+
* 它们默认的position为fixed
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
isAbsolute?: boolean;
|
|
31
38
|
}
|