@xuda.io/xuda-widget-plugin-xuda-drive 1.0.39 → 1.0.40

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/runtime.mjs +8 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-widget-plugin-xuda-drive",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Xuda Drive widget plugin",
5
5
  "scripts": {
6
6
  "pub": "npm version patch --force && npm publish --access public"
package/runtime.mjs CHANGED
@@ -593,7 +593,7 @@ export async function viewer(fields, e) {
593
593
  </div>
594
594
 
595
595
  <!-- Tabs -->
596
- <div ref="dropZoneRef" class="flex-1 overflow-auto size-full relative">
596
+ <div ref="dropZoneRef" class="flex-1 overflow-auto size-full relative">
597
597
  <div v-if="isOverDropZone" class="absolute inset-0 z-10 px-2 py-2 animate">
598
598
  <div class="size-full flex flex-col justify-between items-center !border-black border-2 rounded-2xl bg-black/20">
599
599
  <div></div>
@@ -943,7 +943,7 @@ export async function viewer(fields, e) {
943
943
  search_string: "",
944
944
  sort_by: fields.sort_by || "date",
945
945
  sort_dir: fields.sort_dir || "desc",
946
- ...(fields.filter_tags.length ? { tags: fields.filter_tags } : {})
946
+ ...(fields.filter_tags?.length ? { tags: fields.filter_tags } : {})
947
947
  // ...filter_tags
948
948
  },
949
949
  limit: 10,
@@ -1099,9 +1099,9 @@ export async function viewer(fields, e) {
1099
1099
  },
1100
1100
  mounted() {
1101
1101
  var onDrop = (files) => {
1102
+ if (this.view === "swiper") return;
1102
1103
  this.uploadModal = true;
1103
- this.addFiles(files);
1104
- // params.$refs.ImageUploader?.$refs?.pond?.addFiles(files);
1104
+ this.pond.addFiles(files);
1105
1105
  };
1106
1106
 
1107
1107
  const { isOverDropZone } = VueUse.useDropZone(this.$refs.dropZoneRef, {
@@ -1159,7 +1159,10 @@ export async function viewer(fields, e) {
1159
1159
  this.swiper = new Swiper(this.$refs["swiper-container"], {
1160
1160
  loop: true,
1161
1161
  slidesPerView: 1,
1162
- spaceBetween: 20
1162
+ spaceBetween: 20,
1163
+ observer: true,
1164
+ observeParents: true,
1165
+ paginationClickable: true
1163
1166
  });
1164
1167
 
1165
1168
  this.swiper.on("slideChange", (event) => {
@@ -1181,14 +1184,6 @@ export async function viewer(fields, e) {
1181
1184
  this.$nextTick(() => {
1182
1185
  refreshFsLightbox();
1183
1186
  this.swiper?.update?.();
1184
-
1185
- // this.swiper;
1186
- // debugger;
1187
- // this.swiper = new Swiper(this.$refs["swiper-container"], {
1188
- // loop: true,
1189
- // slidesPerView: 1,
1190
- // spaceBetween: 20
1191
- // });
1192
1187
  });
1193
1188
  }
1194
1189
  },