classcard-ui 0.2.335 → 0.2.338

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.335",
3
+ "version": "0.2.338",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -229,13 +229,19 @@ export default {
229
229
  this.$emit("onSelectOptions", params);
230
230
  },
231
231
  async onOpen() {
232
- if (this.hasNextPage && this.$refs.load) {
232
+ if (this.hasNextPage) {
233
233
  await this.$nextTick();
234
- this.observer?.observe(this.$refs.load);
234
+ if (this.$refs?.load && this.observer) {
235
+ this.observer.observe(this.$refs.load);
236
+ } else {
237
+ setTimeout(() => {
238
+ this.onOpen();
239
+ }, 500);
240
+ }
235
241
  }
236
242
  },
237
243
  onClose() {
238
- this.observer?.disconnect();
244
+ this.observer.disconnect();
239
245
  },
240
246
  async infiniteScroll([{ isIntersecting, target }]) {
241
247
  if (isIntersecting) {