classcard-ui 0.2.336 → 0.2.339
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/classcard-ui.common.js +71 -90
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +71 -90
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CMultiselect/CMultiselect.vue +12 -27
package/package.json
CHANGED
|
@@ -96,27 +96,7 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
<template #list-footer>
|
|
98
98
|
<li ref="load" class="loader" v-show="hasNextPage">
|
|
99
|
-
|
|
100
|
-
class="h-5 w-5 animate-spin text-gray-400"
|
|
101
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
102
|
-
fill="none"
|
|
103
|
-
viewBox="0 0 24 24"
|
|
104
|
-
v-if="loading"
|
|
105
|
-
>
|
|
106
|
-
<circle
|
|
107
|
-
class="opacity-25"
|
|
108
|
-
cx="12"
|
|
109
|
-
cy="12"
|
|
110
|
-
r="10"
|
|
111
|
-
stroke="currentColor"
|
|
112
|
-
stroke-width="4"
|
|
113
|
-
></circle>
|
|
114
|
-
<path
|
|
115
|
-
class="opacity-75"
|
|
116
|
-
fill="currentColor"
|
|
117
|
-
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
118
|
-
></path>
|
|
119
|
-
</svg>
|
|
99
|
+
Loading more options...
|
|
120
100
|
</li>
|
|
121
101
|
</template>
|
|
122
102
|
</v-select>
|
|
@@ -231,7 +211,13 @@ export default {
|
|
|
231
211
|
async onOpen() {
|
|
232
212
|
if (this.hasNextPage) {
|
|
233
213
|
await this.$nextTick();
|
|
234
|
-
|
|
214
|
+
if (this.$refs?.load && this.observer) {
|
|
215
|
+
this.observer.observe(this.$refs.load);
|
|
216
|
+
} else {
|
|
217
|
+
setTimeout(() => {
|
|
218
|
+
this.onOpen();
|
|
219
|
+
}, 500);
|
|
220
|
+
}
|
|
235
221
|
}
|
|
236
222
|
},
|
|
237
223
|
onClose() {
|
|
@@ -241,13 +227,12 @@ export default {
|
|
|
241
227
|
if (isIntersecting) {
|
|
242
228
|
const ul = target.offsetParent;
|
|
243
229
|
const scrollTop = target.offsetParent.scrollTop;
|
|
244
|
-
this.emitLoadNextPage();
|
|
245
|
-
|
|
246
|
-
ul.scrollTop = scrollTop;
|
|
230
|
+
this.emitLoadNextPage(ul, scrollTop);
|
|
231
|
+
this.scrollTop = scrollTop;
|
|
247
232
|
}
|
|
248
233
|
},
|
|
249
|
-
emitLoadNextPage: debounce(function () {
|
|
250
|
-
this.$emit("loadNextPage");
|
|
234
|
+
emitLoadNextPage: debounce(function (ul, scrollTop) {
|
|
235
|
+
this.$emit("loadNextPage", ul, scrollTop);
|
|
251
236
|
}, 300),
|
|
252
237
|
},
|
|
253
238
|
watch: {
|