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/dist/components/Table/Table.vue.d.ts +9 -3
- package/dist/components/Table/components/TableSlotBody.vue.d.ts +2 -1
- package/dist/components/Table/components/TableSlotGrid.vue.d.ts +2 -1
- package/dist/layouts/PdaLayout.vue.d.ts +9 -3
- package/dist/pages/TablePage.vue.d.ts +9 -3
- package/dist/quasar-factory-lib.js +20 -13
- package/dist/quasar-factory-lib.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +12 -2
- package/src/components/Table/components/CustomizedBadge.vue +1 -1
- package/src/components/Table/components/TableSlotBody.vue +2 -1
- package/src/components/Table/components/TableSlotGrid.vue +2 -1
- package/src/layouts/PdaLayout.vue +10 -0
package/package.json
CHANGED
|
@@ -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
|
}
|
|
@@ -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
|
},
|