@thinkpixellab-public/px-vue 3.0.90 → 3.0.92

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.
@@ -344,7 +344,7 @@ export default {
344
344
  return this.getItemCountFn();
345
345
  }
346
346
 
347
- return this.items.length;
347
+ return this.items?.length || 0;
348
348
  },
349
349
 
350
350
  getItemForSpace(space) {
@@ -63,6 +63,10 @@ export default {
63
63
  type: String,
64
64
  default: null,
65
65
  },
66
+ fixedLeave: {
67
+ type: Boolean,
68
+ default: false,
69
+ },
66
70
  },
67
71
  // data() { return { b: 0 }; },f
68
72
  computed: {
@@ -181,7 +185,28 @@ export default {
181
185
  ...params.to,
182
186
  duration: this.hideDur,
183
187
  ease: this.hideEase,
184
- onComplete: done,
188
+ onStart: () => {
189
+ if (this.fixedLeave && element) {
190
+ const rect = element.getBoundingClientRect();
191
+ element.style.width = `${rect.width}px`;
192
+ element.style.height = `${rect.height}px`;
193
+ element.style.top = `${rect.top}px`;
194
+ element.style.left = `${rect.left}px`;
195
+ element.style.position = 'fixed';
196
+ }
197
+ },
198
+ onComplete: () => {
199
+ if (this.fixedLeave && element) {
200
+ if (element) {
201
+ element.style.width = '';
202
+ element.style.height = '';
203
+ element.style.position = '';
204
+ element.style.top = '';
205
+ element.style.left = '';
206
+ }
207
+ }
208
+ done();
209
+ },
185
210
  });
186
211
  }
187
212
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkpixellab-public/px-vue",
3
- "version": "3.0.90",
3
+ "version": "3.0.92",
4
4
  "description": "General purpose Vue components and helpers that can be used across projects.",
5
5
  "author": "Pixel Lab",
6
6
  "license": "MIT",