@authing/vue-ui-components 4.0.0 → 4.0.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/components/Guard/src/index.vue +22 -23
- package/components/index.js +4 -3
- package/lib/index.min.js +34 -23
- package/package.json +3 -4
- package/LICENSE +0 -21
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div id="authing_guard_container"
|
|
2
|
+
<div id="authing_guard_container" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
|
-
import { Guard as NativeGuard } from "@authing/native-js-ui-components";
|
|
6
|
+
import { Guard as NativeGuard, GuardEventsCamelToKebabMapping } from "@authing/native-js-ui-components";
|
|
7
7
|
import "@authing/native-js-ui-components/lib/index.min.css";
|
|
8
|
-
export * from "@authing/native-js-ui-components";
|
|
9
8
|
|
|
10
9
|
const callbackEvent = ["before-login", "before-register"];
|
|
11
10
|
|
|
@@ -71,6 +70,19 @@ export default {
|
|
|
71
70
|
guarConfig: {},
|
|
72
71
|
};
|
|
73
72
|
},
|
|
73
|
+
computed: {
|
|
74
|
+
mergeConfig: function () {
|
|
75
|
+
return {
|
|
76
|
+
...this.config,
|
|
77
|
+
appId: this.appId,
|
|
78
|
+
mode: this.mode ?? this.config?.mode,
|
|
79
|
+
autoRegister: this.autoRegister ?? this.config?.autoRegister,
|
|
80
|
+
isSSO: this.isSSO ?? this.config?.isSSO,
|
|
81
|
+
clickCloseable: this.clickCloseable ?? this.config?.clickCloseable,
|
|
82
|
+
escCloseable: this.escCloseable ?? this.config?.escCloseable,
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
},
|
|
74
86
|
watch: {
|
|
75
87
|
visible: {
|
|
76
88
|
immediate: true,
|
|
@@ -94,19 +106,6 @@ export default {
|
|
|
94
106
|
},
|
|
95
107
|
},
|
|
96
108
|
},
|
|
97
|
-
computed: {
|
|
98
|
-
mergeConfig: function () {
|
|
99
|
-
return {
|
|
100
|
-
...this.config,
|
|
101
|
-
appId: this.appId,
|
|
102
|
-
mode: this.mode ?? this.config?.mode,
|
|
103
|
-
autoRegister: this.autoRegister ?? this.config?.autoRegister,
|
|
104
|
-
isSSO: this.isSSO ?? this.config?.isSSO,
|
|
105
|
-
clickCloseable: this.clickCloseable ?? this.config?.clickCloseable,
|
|
106
|
-
escCloseable: this.escCloseable ?? this.config?.escCloseable,
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
109
|
mounted() {
|
|
111
110
|
this.guardInstance = new NativeGuard({
|
|
112
111
|
appId: this.appId,
|
|
@@ -148,6 +147,13 @@ export default {
|
|
|
148
147
|
this.guardInstance.show();
|
|
149
148
|
}
|
|
150
149
|
},
|
|
150
|
+
|
|
151
|
+
beforeUnmount() {
|
|
152
|
+
this.guardInstance.unmountComponent();
|
|
153
|
+
},
|
|
154
|
+
beforeDestroy() {
|
|
155
|
+
this.guardInstance.unmountComponent();
|
|
156
|
+
},
|
|
151
157
|
methods: {
|
|
152
158
|
show() {
|
|
153
159
|
this.guardInstance.show();
|
|
@@ -156,12 +162,5 @@ export default {
|
|
|
156
162
|
this.guardInstance.hide();
|
|
157
163
|
},
|
|
158
164
|
},
|
|
159
|
-
|
|
160
|
-
beforeUnmount() {
|
|
161
|
-
this.guardInstance.unmountComponent();
|
|
162
|
-
},
|
|
163
|
-
beforeDestroy() {
|
|
164
|
-
this.guardInstance.unmountComponent();
|
|
165
|
-
},
|
|
166
165
|
};
|
|
167
166
|
</script>
|
package/components/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import '@authing/native-js-ui-components/lib/index.min.css'
|
|
|
4
4
|
|
|
5
5
|
const components = [
|
|
6
6
|
// AuthingGuard,
|
|
7
|
-
Guard
|
|
7
|
+
Guard,
|
|
8
8
|
]
|
|
9
9
|
// 全局注册
|
|
10
10
|
const install = (app) => {
|
|
@@ -19,7 +19,8 @@ export {
|
|
|
19
19
|
Guard,
|
|
20
20
|
// AuthingGuard
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
export default {
|
|
24
|
-
install
|
|
23
|
+
install,
|
|
25
24
|
}
|
|
25
|
+
|
|
26
|
+
export * from "@authing/native-js-ui-components";
|