@authing/vue-ui-components 3.1.5-rc.3 → 3.1.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.
@@ -68,7 +68,7 @@ export default {
68
68
  data() {
69
69
  return {
70
70
  localVisible: false,
71
- $guard: null,
71
+ guardInstance: null,
72
72
  guarConfig: {},
73
73
  };
74
74
  },
@@ -84,7 +84,7 @@ export default {
84
84
  localVisible: {
85
85
  handler(val) {
86
86
  if (val !== this.visible) {
87
- this.$emit("update:visible", val);
87
+ this.$emit("visible", val);
88
88
  }
89
89
 
90
90
  if (val) {
@@ -109,14 +109,7 @@ export default {
109
109
  },
110
110
  },
111
111
  mounted() {
112
- // this.guarConfig = this.config || {};
113
- // this.guarConfig.mode = this.mode ? this.mode : this.config.mode;
114
- // this.guarConfig.autoRegister = this.autoRegister ? this.autoRegister : this.config.autoRegister;
115
- // this.guarConfig.isSSO = this.isSSO ? this.isSSO : this.config.isSSO;
116
- // this.guarConfig.clickCloseable = this.clickCloseable ? this.clickCloseable : this.config.clickCloseable;
117
- // this.guarConfig.escCloseable = this.escCloseable ? this.escCloseable : this.config.escCloseable;
118
-
119
- const guard = new NativeGuard(this.appId, this.mergeConfig);
112
+ this.guardInstance = new NativeGuard(this.appId, this.mergeConfig);
120
113
 
121
114
  const evts = Object.values(GuardEventsCamelToKebabMap);
122
115
  const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMap).reduce((acc, [camel, kebab]) => {
@@ -145,19 +138,18 @@ export default {
145
138
  });
146
139
  }, {});
147
140
 
148
- evts.forEach((evtName) => guard.on(evtName, listeners[evtName]));
141
+ evts.forEach((evtName) => this.guardInstance.on(evtName, listeners[evtName]));
149
142
 
150
143
  if (this.localVisible) {
151
- guard.show();
144
+ this.guardInstance.show();
152
145
  }
153
- this.$guard = guard;
154
146
  },
155
147
  methods: {
156
148
  show() {
157
- this.$guard.show();
149
+ this.guardInstance.show();
158
150
  },
159
151
  hide() {
160
- this.$guard.hide();
152
+ this.guardInstance.hide();
161
153
  },
162
154
  },
163
155
  };