@authing/vue-ui-components 3.1.16 → 3.1.25-rc.0
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/components/Guard/src/index.vue +11 -15
- package/lib/index.min.css +1 -1
- package/lib/index.min.js +9 -3
- package/package.json +3 -4
- package/LICENSE +0 -21
|
@@ -15,14 +15,7 @@ import {
|
|
|
15
15
|
} from "@authing/native-js-ui-components";
|
|
16
16
|
import "@authing/native-js-ui-components/lib/index.min.css";
|
|
17
17
|
|
|
18
|
-
export {
|
|
19
|
-
getAuthClient,
|
|
20
|
-
initAuthClient,
|
|
21
|
-
GuardMode,
|
|
22
|
-
GuardScenes,
|
|
23
|
-
LoginMethods,
|
|
24
|
-
RegisterMethods,
|
|
25
|
-
};
|
|
18
|
+
export { getAuthClient, initAuthClient, GuardMode, GuardScenes, LoginMethods, RegisterMethods };
|
|
26
19
|
|
|
27
20
|
const callbackEvent = ["before-login", "before-register"];
|
|
28
21
|
|
|
@@ -117,7 +110,7 @@ export default {
|
|
|
117
110
|
...this.config,
|
|
118
111
|
appId: this.appId,
|
|
119
112
|
mode: this.mode ?? this.config?.mode,
|
|
120
|
-
|
|
113
|
+
target: this.config?.target ?? "#authing_guard_container",
|
|
121
114
|
isSSO: this.isSSO ?? this.config?.isSSO,
|
|
122
115
|
clickCloseable: this.clickCloseable ?? this.config?.clickCloseable,
|
|
123
116
|
escCloseable: this.escCloseable ?? this.config?.escCloseable,
|
|
@@ -133,9 +126,7 @@ export default {
|
|
|
133
126
|
});
|
|
134
127
|
|
|
135
128
|
const evts = Object.values(GuardEventsCamelToKebabMapping);
|
|
136
|
-
const kebabToCamelMap = Object.entries(
|
|
137
|
-
GuardEventsCamelToKebabMapping
|
|
138
|
-
).reduce((acc, [camel, kebab]) => {
|
|
129
|
+
const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMapping).reduce((acc, [camel, kebab]) => {
|
|
139
130
|
return Object.assign({}, acc, {
|
|
140
131
|
[kebab]: camel,
|
|
141
132
|
});
|
|
@@ -161,9 +152,7 @@ export default {
|
|
|
161
152
|
});
|
|
162
153
|
}, {});
|
|
163
154
|
|
|
164
|
-
evts.forEach((evtName) =>
|
|
165
|
-
this.guardInstance.on(evtName, listeners[evtName])
|
|
166
|
-
);
|
|
155
|
+
evts.forEach((evtName) => this.guardInstance.on(evtName, listeners[evtName]));
|
|
167
156
|
|
|
168
157
|
if (this.localVisible) {
|
|
169
158
|
this.guardInstance.show();
|
|
@@ -177,5 +166,12 @@ export default {
|
|
|
177
166
|
this.guardInstance.hide();
|
|
178
167
|
},
|
|
179
168
|
},
|
|
169
|
+
|
|
170
|
+
beforeUnmount() {
|
|
171
|
+
this.guardInstance.unmountComponent();
|
|
172
|
+
},
|
|
173
|
+
beforeDestroy() {
|
|
174
|
+
this.guardInstance.unmountComponent();
|
|
175
|
+
},
|
|
180
176
|
};
|
|
181
177
|
</script>
|