@kizmann/nano-ui 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/nano-ui",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -27,6 +27,14 @@ export default {
27
27
  }
28
28
  },
29
29
 
30
+ draggable: {
31
+ default()
32
+ {
33
+ return true;
34
+ },
35
+ type: [Boolean]
36
+ },
37
+
30
38
  size: {
31
39
  default()
32
40
  {
@@ -72,12 +72,14 @@ export default {
72
72
  {
73
73
  this.timer = setTimeout(() => {
74
74
 
75
- this.timer = setTimeout(() => {
76
- this.NDraggable.drag.bindNode(this);
77
- }, 50);
75
+ if ( this.NDraggable.draggable ) {
76
+ this.timer = setTimeout(() => {
77
+ this.NDraggable.drag.bindNode(this);
78
+ }, 50);
79
+ }
78
80
 
79
81
  this.init = true;
80
- }, 10);
82
+ }, 1);
81
83
  },
82
84
 
83
85
  beforeUnmount()
@@ -189,7 +191,7 @@ export default {
189
191
 
190
192
  let props = {};
191
193
 
192
- if ( this.isDraggable() ) {
194
+ if ( this.NDraggable.draggable && this.isDraggable() ) {
193
195
  props.draggable = true;
194
196
  }
195
197
 
@@ -248,7 +250,7 @@ export default {
248
250
  onDblclick: this.onDblclick,
249
251
  };
250
252
 
251
- if ( ! this.NDraggable.handle && this.isDraggable() ) {
253
+ if ( this.NDraggable.draggable && ! this.NDraggable.handle && this.isDraggable() ) {
252
254
  props.draggable = true;
253
255
  }
254
256
 
@@ -27,6 +27,14 @@ export default {
27
27
  }
28
28
  },
29
29
 
30
+ draggable: {
31
+ default()
32
+ {
33
+ return true;
34
+ },
35
+ type: [Boolean]
36
+ },
37
+
30
38
  size: {
31
39
  default()
32
40
  {
@@ -72,12 +72,14 @@ export default {
72
72
  {
73
73
  this.timer = setTimeout(() => {
74
74
 
75
- this.timer = setTimeout(() => {
76
- this.NDraggable.drag.bindNode(this);
77
- }, 50);
75
+ if ( this.NDraggable.draggable ) {
76
+ this.timer = setTimeout(() => {
77
+ this.NDraggable.drag.bindNode(this);
78
+ }, 50);
79
+ }
78
80
 
79
81
  this.init = true;
80
- }, 10);
82
+ }, 1);
81
83
  },
82
84
 
83
85
  beforeUnmount()
@@ -231,7 +233,7 @@ export default {
231
233
 
232
234
  let props = {};
233
235
 
234
- if ( this.isDraggable() ) {
236
+ if ( this.NDraggable.draggable && this.isDraggable() ) {
235
237
  props.draggable = true;
236
238
  }
237
239
 
@@ -317,7 +319,7 @@ export default {
317
319
  onDblclick: this.onDblclick,
318
320
  };
319
321
 
320
- if ( ! this.NDraggable.handle && this.isDraggable() ) {
322
+ if ( this.NDraggable.draggable && ! this.NDraggable.handle && this.isDraggable() ) {
321
323
  props.draggable = true;
322
324
  }
323
325
 
@@ -22,6 +22,14 @@ export default {
22
22
  type: [Array]
23
23
  },
24
24
 
25
+ draggable: {
26
+ default()
27
+ {
28
+ return true;
29
+ },
30
+ type: [Boolean]
31
+ },
32
+
25
33
  visible: {
26
34
  default()
27
35
  {
@@ -297,15 +305,15 @@ export default {
297
305
  data()
298
306
  {
299
307
  return {
300
- uid: UUID(),
301
- elements: [],
302
- tempVisible: this.visible,
308
+ uid: UUID(),
309
+ elements: [],
310
+ tempVisible: this.visible,
303
311
  tempVisibleProps: [],
304
- tempSelected: this.selected,
305
- tempSortProp: this.sortProp,
306
- tempSortDir: this.sortDir,
307
- tempFilter: this.filter,
308
- tempFilterProps: [],
312
+ tempSelected: this.selected,
313
+ tempSortProp: this.sortProp,
314
+ tempSortDir: this.sortDir,
315
+ tempFilter: this.filter,
316
+ tempFilterProps: [],
309
317
  }
310
318
  },
311
319
 
@@ -540,10 +548,10 @@ export default {
540
548
  }
541
549
 
542
550
  let props = {
543
- modelValue: this.checked,
551
+ modelValue: this.checked,
544
552
  intermediate: this.intermediate,
545
- disabled: !this.items.length,
546
- onClick: this.selectAll
553
+ disabled: !this.items.length,
554
+ onClick: this.selectAll
547
555
  };
548
556
 
549
557
  return (
@@ -609,10 +617,10 @@ export default {
609
617
  ];
610
618
 
611
619
  let props = Obj.except(this.$props, except, {
612
- items: this.items,
613
- selected: this.tempSelected,
620
+ items: this.items,
621
+ selected: this.tempSelected,
614
622
  overflowX: false,
615
- useKeys: this.useKeys,
623
+ useKeys: this.useKeys,
616
624
  // renderNode: this.ctor('renderBody')
617
625
  });
618
626