quasar-factory-lib 0.0.88 → 0.0.90

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
@@ -98,6 +98,6 @@
98
98
  "release": "standard-version"
99
99
  },
100
100
  "type": "module",
101
- "version": "0.0.88",
101
+ "version": "0.0.90",
102
102
  "author": ""
103
103
  }
@@ -231,7 +231,11 @@ export default defineComponent({
231
231
  'setLineRemainingQty',
232
232
  'setLineNoStock',
233
233
  'onDoneLineMaintenanceTasks',
234
- 'reprintSULabel'
234
+ 'reprintSULabel',
235
+ 'onDragStart',
236
+ 'onDragUpdate',
237
+ 'onDragEnd',
238
+ 'modifyPriorityOrder"'
235
239
  ],
236
240
  data () {
237
241
  return {
@@ -317,22 +321,28 @@ export default defineComponent({
317
321
  this.tableRef = document.querySelector('.q-table tbody')
318
322
  }
319
323
  const self = this
324
+ if (this.draggableInstance?.destroy) {
325
+ this.draggableInstance.destroy()
326
+ }
320
327
  if (this.tableRef) {
321
328
  this.draggableInstance = useDraggable(this.tableRef, this.rows, {
322
329
  animation: 100,
323
330
  delay: self.dragAndDropDelay,
324
331
 
325
- onStart () {
332
+ onStart (e) {
326
333
  console.log('start')
334
+ self.$emit('onDragStart', e)
327
335
  },
328
336
  onUpdate (e) {
329
337
  console.log(e, 'onUpdate')
330
338
  const {oldIndex, newIndex} = e
331
339
  console.log(oldIndex, newIndex, self.rows)
332
340
  self.rowsData = [...self.rows]
341
+ self.$emit('onDragUpdate', e)
333
342
  },
334
343
  onEnd(e) {
335
344
  console.log(e, 'end drag')
345
+ self.$emit('onDragEnd', e)
336
346
  }
337
347
  })
338
348
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <q-badge
3
- class="cursor-pointer q-pt-sm q-pb-sm"
3
+ class="cursor-pointer q-pt-xs q-pb-xs"
4
4
  :data-cy="'badge' + dataCy"
5
5
  :class="badgeColor"
6
6
  :text-color="badgeTextColor"
@@ -166,7 +166,8 @@ export default {
166
166
  'onUpdateBasicCheckboxValue',
167
167
  'onClickButton',
168
168
  'onUpdateCustomizedCheckboxValue',
169
- 'onClickIconToolTip'
169
+ 'onClickIconToolTip',
170
+ 'modifyPriorityOrder'
170
171
  ],
171
172
  data () {
172
173
  return {
@@ -203,7 +203,8 @@ export default {
203
203
  'onClickButton',
204
204
  'onUpdateCustomizedCheckboxValue',
205
205
  'onClickIcon',
206
- 'onClickIconToolTip'
206
+ 'onClickIconToolTip',
207
+ 'modifyPriorityOrder'
207
208
  ],
208
209
  data () {
209
210
  return {
@@ -50,6 +50,15 @@
50
50
  @on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
51
51
  @on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
52
52
  @on-click-button="setItemNotFound"
53
+ @on-drag-start="(args) => {
54
+ console.log(args, 'start')
55
+ }"
56
+ @on-drag-update="(args) => {
57
+ console.log(args, 'update')
58
+ }"
59
+ @on-drag-end="(args) => {
60
+ console.log(args, 'end')
61
+ }"
53
62
  />
54
63
  <q-page-sticky
55
64
  v-if="smallDevice"
@@ -571,6 +580,7 @@ export default {
571
580
  this.rows = this.rowsData
572
581
  this.$nextTick(() =>{
573
582
  this.$refs.table.enableDragAndDrop = true
583
+
574
584
  })
575
585
  }, 1000)
576
586
  },