@alipay/ams-checkout 0.0.1743078169-dev.3 → 0.0.1743078169-dev.4
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/umd/ams-checkout.min.js +1 -1
- package/esm/core/component/element/elementContainerService/containerService.d.ts +1 -0
- package/esm/core/component/element/elementContainerService/containerService.js +5 -0
- package/esm/core/component/element/elementController/index.js +2 -1
- package/esm/core/component/element/util.d.ts +2 -1
- package/esm/core/component/element/util.js +2 -1
- package/package.json +1 -1
@@ -24,6 +24,7 @@ export declare class ContainerController {
|
|
24
24
|
private addEventListener;
|
25
25
|
createWebLaunchPromise(): Promise<unknown>;
|
26
26
|
switchContainerStatus(status: IContainerStatus): void;
|
27
|
+
getContainerStatus(): IContainerStatus;
|
27
28
|
getEventService(): EventCenter;
|
28
29
|
getContainerService(): ContainerService;
|
29
30
|
}
|
@@ -86,6 +86,11 @@ export var ContainerController = /*#__PURE__*/function () {
|
|
86
86
|
value: function switchContainerStatus(status) {
|
87
87
|
this.containerStatus = status;
|
88
88
|
}
|
89
|
+
}, {
|
90
|
+
key: "getContainerStatus",
|
91
|
+
value: function getContainerStatus() {
|
92
|
+
return this.containerStatus;
|
93
|
+
}
|
89
94
|
}, {
|
90
95
|
key: "getEventService",
|
91
96
|
value: function getEventService() {
|
@@ -97,7 +97,8 @@ var ElementController = /*#__PURE__*/function () {
|
|
97
97
|
var _this = this;
|
98
98
|
var _checkCanMount = checkCanMount({
|
99
99
|
sdkSelector: sdkSelector,
|
100
|
-
status: this.elementContainer.getStatus()
|
100
|
+
status: this.elementContainer.getStatus(),
|
101
|
+
containerService: this.elementContainerService.getContainerService(renderOptions.type)
|
101
102
|
}),
|
102
103
|
success = _checkCanMount.success,
|
103
104
|
errorMsg = _checkCanMount.errorMsg;
|
@@ -24,8 +24,9 @@ declare const formatElementOption: (options: IElementOptions) => {
|
|
24
24
|
* 校验渲染条件
|
25
25
|
* 校验当前sdkSelector结点是否存在
|
26
26
|
*/
|
27
|
-
export declare function checkCanMount({ sdkSelector, status }: {
|
27
|
+
export declare function checkCanMount({ sdkSelector, containerService, status, }: {
|
28
28
|
sdkSelector: string;
|
29
|
+
containerService: ContainerController;
|
29
30
|
status: IElementStatus;
|
30
31
|
}): {
|
31
32
|
success: boolean;
|
@@ -31,6 +31,7 @@ var formatElementOption = function formatElementOption(options) {
|
|
31
31
|
*/
|
32
32
|
export function checkCanMount(_ref) {
|
33
33
|
var sdkSelector = _ref.sdkSelector,
|
34
|
+
containerService = _ref.containerService,
|
34
35
|
status = _ref.status;
|
35
36
|
// 校验当前 sdkSelector 结点是否存在
|
36
37
|
var element = document.querySelector(sdkSelector);
|
@@ -47,7 +48,7 @@ export function checkCanMount(_ref) {
|
|
47
48
|
errorMsg: "Creating components in the destroyed state is forbidden."
|
48
49
|
};
|
49
50
|
}
|
50
|
-
if (
|
51
|
+
if (containerService) {
|
51
52
|
return {
|
52
53
|
success: false,
|
53
54
|
errorMsg: "SDK status error."
|