quasar-factory-lib 0.1.0 → 0.1.2
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/layouts/PdaLayoutVueCompositionApi.vue.d.ts +1681 -0
- package/dist/quasar-factory-lib.js +18 -12
- package/dist/quasar-factory-lib.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +4 -3
- package/src/components/Table/utils/infiniteScroll.ts +1 -0
- package/src/layouts/PdaLayout.vue +4 -2
- package/src/layouts/PdaLayoutVueCompositionApi.vue +639 -0
- package/src/router/routes.ts +1 -1
- package/dist/layouts/PdaLayout.vue.d.ts +0 -1945
package/package.json
CHANGED
|
@@ -308,7 +308,7 @@ export default defineComponent({
|
|
|
308
308
|
this.dragAndDropDelay = 0
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
|
-
showSkeleton (val: boolean): void {
|
|
311
|
+
/* showSkeleton (val: boolean): void {
|
|
312
312
|
if (!val) {
|
|
313
313
|
this.handleInfiniteScrollTableCompositionAPi()
|
|
314
314
|
}
|
|
@@ -317,7 +317,7 @@ export default defineComponent({
|
|
|
317
317
|
setTimeout(() => {
|
|
318
318
|
this.handleInfiniteScrollTableCompositionAPi()
|
|
319
319
|
}, 500)
|
|
320
|
-
}
|
|
320
|
+
} */
|
|
321
321
|
},
|
|
322
322
|
mounted () {
|
|
323
323
|
this.getAdvancedFilterColumns()
|
|
@@ -527,6 +527,7 @@ export default defineComponent({
|
|
|
527
527
|
}, {} as { [key: string]: string })
|
|
528
528
|
},
|
|
529
529
|
handleInfiniteScrollTableCompositionAPi () {
|
|
530
|
+
const offSet = this.showAdvancedFilter && this.smallDevice ? document.getElementsByClassName('q-table__control')[0].offsetHeight : 0
|
|
530
531
|
this.$nextTick(() => {
|
|
531
532
|
const elemClass = this.smallDevice ? 'q-table__grid-content' : 'q-table__middle scroll'
|
|
532
533
|
const tableType = this.smallDevice ? 'Grid' : 'Table'
|
|
@@ -535,7 +536,7 @@ export default defineComponent({
|
|
|
535
536
|
qtableScrollElem.length > 0 ? qtableScrollElem[0] : window
|
|
536
537
|
const fnAddScroll = (event: Event) => {
|
|
537
538
|
const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
|
|
538
|
-
if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
|
|
539
|
+
if (Math.abs(scrollHeight - clientHeight - scrollTop - offSet) < 1) {
|
|
539
540
|
console.log(`[${tableType}] You are at the bottom!`, this.totalPage)
|
|
540
541
|
this.totalPage++
|
|
541
542
|
}
|
|
@@ -31,6 +31,7 @@ const infiniteScroll = {
|
|
|
31
31
|
console.log(totalPage, 'totalPage')
|
|
32
32
|
const { scrollHeight, scrollTop, clientHeight } = event.target as HTMLElement
|
|
33
33
|
if (Math.abs(scrollHeight - clientHeight - scrollTop) < 1) {
|
|
34
|
+
debugger
|
|
34
35
|
console.log(`[${tableType}] You are at the bottom!`, totalPage)
|
|
35
36
|
totalPage++
|
|
36
37
|
}
|
|
@@ -555,6 +555,7 @@ export default {
|
|
|
555
555
|
'$q.screen.width' (): void {
|
|
556
556
|
setTimeout(() => {
|
|
557
557
|
this.tableStyle = setTableHeight.setTableHeight()
|
|
558
|
+
this.$refs.table.handleInfiniteScrollTableCompositionAPi()
|
|
558
559
|
// infiniteScroll.handleInfiniteScrollNewTable(this)
|
|
559
560
|
}, 500)
|
|
560
561
|
},
|
|
@@ -562,6 +563,7 @@ export default {
|
|
|
562
563
|
if (!val) {
|
|
563
564
|
setTimeout(() => {
|
|
564
565
|
this.tableStyle = setTableHeight.setTableHeight()
|
|
566
|
+
this.$refs.table.handleInfiniteScrollTableCompositionAPi()
|
|
565
567
|
// infiniteScroll.handleInfiniteScrollNewTable(this)
|
|
566
568
|
}, 500)
|
|
567
569
|
}
|
|
@@ -576,11 +578,11 @@ export default {
|
|
|
576
578
|
methods: {
|
|
577
579
|
getRows () {
|
|
578
580
|
setTimeout(()=> {
|
|
579
|
-
|
|
581
|
+
|
|
580
582
|
this.rows = this.rowsData
|
|
581
583
|
this.$nextTick(() =>{
|
|
582
584
|
this.$refs.table.enableDragAndDrop = true
|
|
583
|
-
|
|
585
|
+
this.showSkeleton = false
|
|
584
586
|
})
|
|
585
587
|
}, 1000)
|
|
586
588
|
},
|
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<q-layout
|
|
4
|
+
view="hHh lpR fFf"
|
|
5
|
+
>
|
|
6
|
+
<q-header
|
|
7
|
+
v-if="!showSkeleton"
|
|
8
|
+
class="bg-light-peach text-black"
|
|
9
|
+
>
|
|
10
|
+
<div class="header-container text-black">
|
|
11
|
+
<TaskNavBar
|
|
12
|
+
:logo="'src/assets/vue1.svg'"
|
|
13
|
+
:title="'Pda'"
|
|
14
|
+
:show-btn-back="false"
|
|
15
|
+
:show-btn-search="true"
|
|
16
|
+
@onClickBtnMenu="onClickBtnMenu"
|
|
17
|
+
@on-click-btn-search="toggleSearchVisibility"
|
|
18
|
+
@on-click-btn-menu="toogleColumnsSelectorVisibility">
|
|
19
|
+
</TaskNavBar>
|
|
20
|
+
<TableRowsCounter :counterJson="[
|
|
21
|
+
{ qty: rows.length, title: 'Total', dataCy: 'total', extraClasses: 'class'}
|
|
22
|
+
]"/>
|
|
23
|
+
</div>
|
|
24
|
+
</q-header>
|
|
25
|
+
<NavBarSkeleton
|
|
26
|
+
v-if="showSkeleton"
|
|
27
|
+
:small-device="smallDevice"
|
|
28
|
+
/>
|
|
29
|
+
<!--<AlertLabelsWithError
|
|
30
|
+
ref="AlertLabelsWithError"
|
|
31
|
+
@retry-read-label-axios="retryReadLabel"
|
|
32
|
+
@on-close-dialog-labels-error="onCloseDialogLabelsError"
|
|
33
|
+
/>
|
|
34
|
+
-->
|
|
35
|
+
<q-page-container>
|
|
36
|
+
<q-page>
|
|
37
|
+
<Table
|
|
38
|
+
ref="tableRef"
|
|
39
|
+
:rows="rows"
|
|
40
|
+
:columns="columns"
|
|
41
|
+
:visible-columns="tableStoreObj.visiblecolumns"
|
|
42
|
+
:small-device="smallDevice"
|
|
43
|
+
:store="tableStoreObj"
|
|
44
|
+
:table-style="tableStyle"
|
|
45
|
+
:selectionType="'multiple'"
|
|
46
|
+
:show-skeleton="showSkeleton"
|
|
47
|
+
@on-select-visible-columns="(columns) => {
|
|
48
|
+
tableStoreObj.visiblecolumns = columns
|
|
49
|
+
}"
|
|
50
|
+
:show-icon-advanced-filter="true"
|
|
51
|
+
@on-update-basic-checkbox-value="onUpdateBasicCheckboxValue"
|
|
52
|
+
@on-update-customized-checkbox-value="onUpdateCustomizedCheckboxValue"
|
|
53
|
+
@on-click-button="setItemNotFound"
|
|
54
|
+
@on-drag-start="(args) => {
|
|
55
|
+
console.log(args, 'start')
|
|
56
|
+
}"
|
|
57
|
+
@on-drag-update="(args) => {
|
|
58
|
+
console.log(args, 'update')
|
|
59
|
+
}"
|
|
60
|
+
@on-drag-end="(args) => {
|
|
61
|
+
console.log(args, 'end')
|
|
62
|
+
}"
|
|
63
|
+
/>
|
|
64
|
+
<!--<q-page-sticky
|
|
65
|
+
v-if="smallDevice"
|
|
66
|
+
position="bottom"
|
|
67
|
+
expand
|
|
68
|
+
>
|
|
69
|
+
<q-btn
|
|
70
|
+
class="full-width"
|
|
71
|
+
color="black"
|
|
72
|
+
square/>
|
|
73
|
+
</q-page-sticky>-->
|
|
74
|
+
</q-page>
|
|
75
|
+
</q-page-container>
|
|
76
|
+
</q-layout>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
<style>
|
|
80
|
+
</style>
|
|
81
|
+
<script setup lang="ts">
|
|
82
|
+
import { useQuasar } from 'quasar'
|
|
83
|
+
import TaskNavBar from '../components/TaskNavBar/TaskNavBar.vue'
|
|
84
|
+
import Table from '../components/Table/Table.vue'
|
|
85
|
+
import NavBarSkeleton from '../components/NavBarSkeleton/NavBarSkeleton.vue'
|
|
86
|
+
import TableRowsCounter from'../components/TableRowsCounter/TableRowsCounter.vue'
|
|
87
|
+
// import AlertLabelsWithError from '../components/AlertLabelsWithError/AlertLabelsWithError.vue'
|
|
88
|
+
import setTableHeight from '../components/Table/utils/setTableHeight'
|
|
89
|
+
// import infiniteScroll from '../components/Table/utils/infiniteScroll'
|
|
90
|
+
import { tableStore } from '../store/table.js'
|
|
91
|
+
import { ref, computed, onMounted, watch } from 'vue'
|
|
92
|
+
|
|
93
|
+
interface TableInterface {
|
|
94
|
+
toggleSearchVisibility: (obj: object)=> void
|
|
95
|
+
filterInputFocus: () => void
|
|
96
|
+
toogleColumnsSelectorVisibility: () => void
|
|
97
|
+
clearTableSelection: () => void
|
|
98
|
+
handleInfiniteScrollTableCompositionAPi: () => void
|
|
99
|
+
toogleLoading: (val: boolean) => void
|
|
100
|
+
selected: object[] | []
|
|
101
|
+
forceRender: boolean
|
|
102
|
+
enableDragAndDrop: boolean
|
|
103
|
+
totalPage: number
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const q = useQuasar()
|
|
107
|
+
const tableStoreObj = tableStore()
|
|
108
|
+
const tabletMaxWidth = ref<number> (1100)
|
|
109
|
+
const tableStyle = ref<string>('')
|
|
110
|
+
const columns = [
|
|
111
|
+
{
|
|
112
|
+
name: 'drag-and-drop',
|
|
113
|
+
required: true,
|
|
114
|
+
label: 'Drag and drop',
|
|
115
|
+
align: 'left',
|
|
116
|
+
sortable: true,
|
|
117
|
+
type: 'string',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'name',
|
|
121
|
+
required: true,
|
|
122
|
+
label: 'Dessert (100g serving)',
|
|
123
|
+
align: 'left',
|
|
124
|
+
sortable: true,
|
|
125
|
+
type: 'string',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'date',
|
|
129
|
+
required: true,
|
|
130
|
+
label: 'Fecha',
|
|
131
|
+
align: 'left',
|
|
132
|
+
sortable: true,
|
|
133
|
+
type: 'date'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'available',
|
|
137
|
+
required: true,
|
|
138
|
+
label: 'Available',
|
|
139
|
+
align: 'left',
|
|
140
|
+
sortable: true,
|
|
141
|
+
showBasicCheckbox: true,
|
|
142
|
+
type: 'boolean',
|
|
143
|
+
checkBoxDataCy: 'checkbox'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'booleanIcon',
|
|
147
|
+
required: true,
|
|
148
|
+
label: 'Boolean Icon',
|
|
149
|
+
align: 'left',
|
|
150
|
+
sortable: true,
|
|
151
|
+
showCustomizedIcon: true,
|
|
152
|
+
type: 'boolean'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'calories',
|
|
156
|
+
align: 'center',
|
|
157
|
+
label: 'Calories',
|
|
158
|
+
field: 'calories',
|
|
159
|
+
sortable: true,
|
|
160
|
+
editable: true,
|
|
161
|
+
showEditIcon: true,
|
|
162
|
+
popupEditEmit: 'onSaveValuePopupEdit',
|
|
163
|
+
popupEditDataCy: '',
|
|
164
|
+
mask: '#####',
|
|
165
|
+
showSelectNumberOptions: false,
|
|
166
|
+
popupEditInputtype: 'number',
|
|
167
|
+
type: 'number'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'fat',
|
|
171
|
+
label: 'Fat (g)',
|
|
172
|
+
field: 'fat',
|
|
173
|
+
sortable: true,
|
|
174
|
+
showCustomizedButton: true,
|
|
175
|
+
btnIcon: 'save',
|
|
176
|
+
btnEmit: 'onClickButton',
|
|
177
|
+
dataCy: 'onClickButton',
|
|
178
|
+
btnColor: 'primary',
|
|
179
|
+
type: 'number'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'carbs',
|
|
183
|
+
label: 'Carbs (g)',
|
|
184
|
+
field: 'carbs',
|
|
185
|
+
editable: true,
|
|
186
|
+
popupEditEmit: 'onSaveValuePopupEdit',
|
|
187
|
+
popupEditDataCy: '',
|
|
188
|
+
inputMaxLength: 200,
|
|
189
|
+
popupEditInputtype: 'textarea',
|
|
190
|
+
type: 'string'
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'checked',
|
|
194
|
+
label: 'Checked',
|
|
195
|
+
field: 'carbs',
|
|
196
|
+
sortable: true,
|
|
197
|
+
required: true,
|
|
198
|
+
showCustomizedCheckBox: true,
|
|
199
|
+
checkedIcon: 'check_circle',
|
|
200
|
+
uncheckedIcon: 'cancel',
|
|
201
|
+
checkBoxColorCaseTrue: 'positive',
|
|
202
|
+
checkBoxColorCaseFalse: 'negative',
|
|
203
|
+
checkBoxDataCy: '',
|
|
204
|
+
type: 'boolean'
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'protein',
|
|
208
|
+
label: 'Protein (g)',
|
|
209
|
+
field: 'protein',
|
|
210
|
+
sortable: true,
|
|
211
|
+
required: true,
|
|
212
|
+
editable: true,
|
|
213
|
+
showEditIcon: true,
|
|
214
|
+
popupEditEmit: 'onSaveValuePopupEdit',
|
|
215
|
+
popupEditInputtype: 'text',
|
|
216
|
+
popupEditDataCy: '',
|
|
217
|
+
showInputPopupEdit: true,
|
|
218
|
+
type: 'string'
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'sodium',
|
|
222
|
+
label: 'Sodium (mg)',
|
|
223
|
+
field: 'sodium',
|
|
224
|
+
type: 'string'
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'calcium',
|
|
228
|
+
label: 'Calcium (%)',
|
|
229
|
+
field: 'calcium',
|
|
230
|
+
sortable: true,
|
|
231
|
+
type: 'string'
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: 'iron',
|
|
235
|
+
label: 'Iron (%)',
|
|
236
|
+
field: 'iron',
|
|
237
|
+
sortable: true,
|
|
238
|
+
type: 'string'
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
const rows = ref<object [] | []>([])
|
|
242
|
+
const rowsData = ref<object [] | []>([])
|
|
243
|
+
rowsData.value = [
|
|
244
|
+
{
|
|
245
|
+
id: 1,
|
|
246
|
+
name: 'Frozen Yogurt',
|
|
247
|
+
booleanIcon: true,
|
|
248
|
+
available: true,
|
|
249
|
+
calories: 159,
|
|
250
|
+
fat: 6.0,
|
|
251
|
+
carbs: 24,
|
|
252
|
+
checked: false,
|
|
253
|
+
protein: 4.0,
|
|
254
|
+
sodium: 87,
|
|
255
|
+
calcium: '14%',
|
|
256
|
+
iron: '1%'
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 2,
|
|
260
|
+
name: 'Ice cream sandwich',
|
|
261
|
+
booleanIcon: true,
|
|
262
|
+
available: false,
|
|
263
|
+
calories: 237,
|
|
264
|
+
fat: 9.0,
|
|
265
|
+
carbs: 37,
|
|
266
|
+
checked: false,
|
|
267
|
+
protein: 4.3,
|
|
268
|
+
sodium: 129,
|
|
269
|
+
calcium: '8%',
|
|
270
|
+
iron: '1%'
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
id: 3,
|
|
274
|
+
name: 'Eclair',
|
|
275
|
+
booleanIcon: true,
|
|
276
|
+
available: true,
|
|
277
|
+
calories: 262,
|
|
278
|
+
fat: 16.0,
|
|
279
|
+
carbs: 23,
|
|
280
|
+
checked: false,
|
|
281
|
+
protein: 6.0,
|
|
282
|
+
sodium: 337,
|
|
283
|
+
calcium: '6%',
|
|
284
|
+
iron: '7%'
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: 4,
|
|
288
|
+
name: 'Cupcake',
|
|
289
|
+
booleanIcon: false,
|
|
290
|
+
available: false,
|
|
291
|
+
calories: 305,
|
|
292
|
+
fat: 3.7,
|
|
293
|
+
carbs: 67,
|
|
294
|
+
checked: false,
|
|
295
|
+
protein: 4.3,
|
|
296
|
+
sodium: 413,
|
|
297
|
+
calcium: '3%',
|
|
298
|
+
iron: '8%'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
id: 5,
|
|
302
|
+
name: 'Gingerbread',
|
|
303
|
+
booleanIcon: true,
|
|
304
|
+
available: true,
|
|
305
|
+
calories: 356,
|
|
306
|
+
fat: 16.0,
|
|
307
|
+
carbs: 49,
|
|
308
|
+
checked: false,
|
|
309
|
+
protein: 3.9,
|
|
310
|
+
sodium: 327,
|
|
311
|
+
calcium: '7%',
|
|
312
|
+
iron: '16%'
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
id: 5,
|
|
316
|
+
name: 'Jelly bean',
|
|
317
|
+
booleanIcon: false,
|
|
318
|
+
available: false,
|
|
319
|
+
calories: 375,
|
|
320
|
+
fat: 0.0,
|
|
321
|
+
carbs: 94,
|
|
322
|
+
checked: true,
|
|
323
|
+
protein: 0.0,
|
|
324
|
+
sodium: 50,
|
|
325
|
+
calcium: '0%',
|
|
326
|
+
iron: '0%'
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: 6,
|
|
330
|
+
name: 'Lollipop',
|
|
331
|
+
booleanIcon: true,
|
|
332
|
+
available: true,
|
|
333
|
+
calories: 392,
|
|
334
|
+
fat: 0.2,
|
|
335
|
+
carbs: 98,
|
|
336
|
+
checked: false,
|
|
337
|
+
protein: 0,
|
|
338
|
+
sodium: 38,
|
|
339
|
+
calcium: '0%',
|
|
340
|
+
iron: '2%'
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
id: 7,
|
|
344
|
+
name: 'Honeycomb',
|
|
345
|
+
booleanIcon: true,
|
|
346
|
+
available: false,
|
|
347
|
+
calories: 408,
|
|
348
|
+
fat: 3.2,
|
|
349
|
+
carbs: 87,
|
|
350
|
+
checked: true,
|
|
351
|
+
protein: 6.5,
|
|
352
|
+
sodium: 562,
|
|
353
|
+
calcium: '0%',
|
|
354
|
+
iron: '45%'
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
id: 8,
|
|
358
|
+
name: 'Donut',
|
|
359
|
+
booleanIcon: true,
|
|
360
|
+
available: true,
|
|
361
|
+
calories: 452,
|
|
362
|
+
fat: 25.0,
|
|
363
|
+
carbs: 51,
|
|
364
|
+
checked: false,
|
|
365
|
+
protein: 4.9,
|
|
366
|
+
sodium: 326,
|
|
367
|
+
calcium: '2%',
|
|
368
|
+
iron: '22%'
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: 9,
|
|
372
|
+
name: 'KitKat',
|
|
373
|
+
booleanIcon: false,
|
|
374
|
+
available: false,
|
|
375
|
+
calories: 518,
|
|
376
|
+
fat: 26.0,
|
|
377
|
+
carbs: 65,
|
|
378
|
+
checked: true,
|
|
379
|
+
protein: 7,
|
|
380
|
+
sodium: 54,
|
|
381
|
+
calcium: '12%',
|
|
382
|
+
iron: '6%'
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
id: 10,
|
|
386
|
+
name: 'Frozen Yogurt',
|
|
387
|
+
booleanIcon: true,
|
|
388
|
+
available: true,
|
|
389
|
+
calories: 159,
|
|
390
|
+
fat: 6.0,
|
|
391
|
+
carbs: 24,
|
|
392
|
+
checked: false,
|
|
393
|
+
protein: 4.0,
|
|
394
|
+
sodium: 87,
|
|
395
|
+
calcium: '14%',
|
|
396
|
+
iron: '1%'
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
id: 11,
|
|
400
|
+
name: 'Ice cream sandwich',
|
|
401
|
+
booleanIcon: true,
|
|
402
|
+
available: false,
|
|
403
|
+
calories: 237,
|
|
404
|
+
fat: 9.0,
|
|
405
|
+
carbs: 37,
|
|
406
|
+
checked: false,
|
|
407
|
+
protein: 4.3,
|
|
408
|
+
sodium: 129,
|
|
409
|
+
calcium: '8%',
|
|
410
|
+
iron: '1%'
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
id: 12,
|
|
414
|
+
name: 'Eclair',
|
|
415
|
+
booleanIcon: true,
|
|
416
|
+
available: true,
|
|
417
|
+
calories: 262,
|
|
418
|
+
fat: 16.0,
|
|
419
|
+
carbs: 23,
|
|
420
|
+
checked: false,
|
|
421
|
+
protein: 6.0,
|
|
422
|
+
sodium: 337,
|
|
423
|
+
calcium: '6%',
|
|
424
|
+
iron: '7%'
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
id: 13,
|
|
428
|
+
name: 'Cupcake',
|
|
429
|
+
booleanIcon: false,
|
|
430
|
+
available: false,
|
|
431
|
+
calories: 305,
|
|
432
|
+
fat: 3.7,
|
|
433
|
+
carbs: 67,
|
|
434
|
+
checked: false,
|
|
435
|
+
protein: 4.3,
|
|
436
|
+
sodium: 413,
|
|
437
|
+
calcium: '3%',
|
|
438
|
+
iron: '8%'
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
id: 14,
|
|
442
|
+
name: 'Gingerbread',
|
|
443
|
+
booleanIcon: true,
|
|
444
|
+
available: true,
|
|
445
|
+
calories: 356,
|
|
446
|
+
fat: 16.0,
|
|
447
|
+
carbs: 49,
|
|
448
|
+
checked: false,
|
|
449
|
+
protein: 3.9,
|
|
450
|
+
sodium: 327,
|
|
451
|
+
calcium: '7%',
|
|
452
|
+
iron: '16%'
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
id: 15,
|
|
456
|
+
name: 'Jelly bean',
|
|
457
|
+
booleanIcon: false,
|
|
458
|
+
available: false,
|
|
459
|
+
calories: 375,
|
|
460
|
+
fat: 0.0,
|
|
461
|
+
carbs: 94,
|
|
462
|
+
checked: true,
|
|
463
|
+
protein: 0.0,
|
|
464
|
+
sodium: 50,
|
|
465
|
+
calcium: '0%',
|
|
466
|
+
iron: '0%'
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
id: 16,
|
|
470
|
+
name: 'Lollipop',
|
|
471
|
+
booleanIcon: true,
|
|
472
|
+
available: true,
|
|
473
|
+
calories: 392,
|
|
474
|
+
fat: 0.2,
|
|
475
|
+
carbs: 98,
|
|
476
|
+
checked: false,
|
|
477
|
+
protein: 0,
|
|
478
|
+
sodium: 38,
|
|
479
|
+
calcium: '0%',
|
|
480
|
+
iron: '2%'
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
id: 17,
|
|
484
|
+
name: 'Honeycomb',
|
|
485
|
+
booleanIcon: true,
|
|
486
|
+
available: false,
|
|
487
|
+
calories: 408,
|
|
488
|
+
fat: 3.2,
|
|
489
|
+
carbs: 87,
|
|
490
|
+
checked: true,
|
|
491
|
+
protein: 6.5,
|
|
492
|
+
sodium: 562,
|
|
493
|
+
calcium: '0%',
|
|
494
|
+
iron: '45%'
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
id: 18,
|
|
498
|
+
name: 'Donut',
|
|
499
|
+
booleanIcon: true,
|
|
500
|
+
available: true,
|
|
501
|
+
calories: 452,
|
|
502
|
+
fat: 25.0,
|
|
503
|
+
carbs: 51,
|
|
504
|
+
checked: false,
|
|
505
|
+
protein: 4.9,
|
|
506
|
+
sodium: 326,
|
|
507
|
+
calcium: '2%',
|
|
508
|
+
iron: '22%'
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
id: 19,
|
|
512
|
+
name: 'KitKat',
|
|
513
|
+
booleanIcon: false,
|
|
514
|
+
available: false,
|
|
515
|
+
calories: 518,
|
|
516
|
+
fat: 26.0,
|
|
517
|
+
carbs: 65,
|
|
518
|
+
checked: true,
|
|
519
|
+
protein: 7,
|
|
520
|
+
sodium: 54,
|
|
521
|
+
calcium: '12%',
|
|
522
|
+
iron: '6%'
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
id: 20,
|
|
526
|
+
name: 'KitKat',
|
|
527
|
+
booleanIcon: false,
|
|
528
|
+
available: false,
|
|
529
|
+
calories: 518,
|
|
530
|
+
fat: 26.0,
|
|
531
|
+
carbs: 65,
|
|
532
|
+
checked: true,
|
|
533
|
+
protein: 7,
|
|
534
|
+
sodium: 54,
|
|
535
|
+
calcium: '12%',
|
|
536
|
+
iron: '6%'
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
id: 21,
|
|
540
|
+
name: 'KitKat',
|
|
541
|
+
booleanIcon: false,
|
|
542
|
+
available: false,
|
|
543
|
+
calories: 518,
|
|
544
|
+
fat: 26.0,
|
|
545
|
+
carbs: 65,
|
|
546
|
+
checked: true,
|
|
547
|
+
protein: 7,
|
|
548
|
+
sodium: 54,
|
|
549
|
+
calcium: '12%',
|
|
550
|
+
iron: '6%'
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
const showSkeleton = ref<boolean>(false)
|
|
554
|
+
const tableRef = ref<TableInterface | null>(null)
|
|
555
|
+
const smallDevice = computed(() => {
|
|
556
|
+
return q.screen.width <= tabletMaxWidth.value
|
|
557
|
+
})
|
|
558
|
+
watch(() => '$q.screen.width', () => {
|
|
559
|
+
setTimeout(() => {
|
|
560
|
+
tableStyle.value = setTableHeight.setTableHeight()
|
|
561
|
+
}, 500)
|
|
562
|
+
})
|
|
563
|
+
|
|
564
|
+
watch(() => showSkeleton.value, (val) => {
|
|
565
|
+
if (!val) {
|
|
566
|
+
if (!val) {
|
|
567
|
+
setTimeout(() => {
|
|
568
|
+
tableStyle.value = setTableHeight.setTableHeight()
|
|
569
|
+
tableRef.value?.handleInfiniteScrollTableCompositionAPi()
|
|
570
|
+
}, 500)
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
})
|
|
574
|
+
onMounted(() => {
|
|
575
|
+
getRows()
|
|
576
|
+
})
|
|
577
|
+
|
|
578
|
+
function getRows () {
|
|
579
|
+
showSkeleton.value = true
|
|
580
|
+
rows.value = rowsData.value
|
|
581
|
+
setTimeout(()=> {
|
|
582
|
+
showSkeleton.value = false
|
|
583
|
+
|
|
584
|
+
}, 1000)
|
|
585
|
+
}
|
|
586
|
+
function onUpdateBasicCheckboxValue (rows: object []) {
|
|
587
|
+
console.log(rows, 'onUpdateBasicCheckboxValue')
|
|
588
|
+
}
|
|
589
|
+
function onUpdateCustomizedCheckboxValue (rows: object []) {
|
|
590
|
+
console.log(rows, 'onUpdateCustomizedCheckboxValue')
|
|
591
|
+
}
|
|
592
|
+
function setItemNotFound (rows: object []) {
|
|
593
|
+
console.log(rows, 'onClickButton')
|
|
594
|
+
}
|
|
595
|
+
function toggleSearchVisibility () {
|
|
596
|
+
// tableRef.value?.toggleSearchVisibility(this.store)
|
|
597
|
+
// tableRef.value?.filterInputFocus()
|
|
598
|
+
}
|
|
599
|
+
function toggleRightDrawer (): void {
|
|
600
|
+
// this.$refs.sideBar.toggleRightDrawer()
|
|
601
|
+
}
|
|
602
|
+
function toogleColumnsSelectorVisibility () {
|
|
603
|
+
// this.$refs.sideBar.setRightDrawerOpenToFalse()
|
|
604
|
+
// tableRef.value?.toogleColumnsSelectorVisibility()
|
|
605
|
+
}
|
|
606
|
+
function onClickBtnMenu () {
|
|
607
|
+
// this.toggleRightDrawer()
|
|
608
|
+
}
|
|
609
|
+
function retryReadLabel () {
|
|
610
|
+
console.log('retryReadLabel')
|
|
611
|
+
}
|
|
612
|
+
function onCloseDialogLabelsError () {
|
|
613
|
+
console.log('onCloseDialogLabelsError')
|
|
614
|
+
}
|
|
615
|
+
/* function getAlertLabelsWithError () {
|
|
616
|
+
this.$refs.AlertLabelsWithError.alert = true
|
|
617
|
+
this.$refs.AlertLabelsWithError.labelsErrors.push({
|
|
618
|
+
label: '558877',
|
|
619
|
+
error: 'The Bin does not exist. Identification fields and values',
|
|
620
|
+
icon: 'cancel',
|
|
621
|
+
spinner: false
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
label: '558871',
|
|
625
|
+
error: 'The Bin does not exist. Identification fields and values',
|
|
626
|
+
icon: 'cancel',
|
|
627
|
+
spinner: false
|
|
628
|
+
})
|
|
629
|
+
} */
|
|
630
|
+
</script>
|
|
631
|
+
<style scoped>
|
|
632
|
+
.header-container {
|
|
633
|
+
padding: 20px 20px 5px 20px;
|
|
634
|
+
}
|
|
635
|
+
.q-toolbar {
|
|
636
|
+
min-height: unset !important;
|
|
637
|
+
padding: 0 !important;
|
|
638
|
+
}
|
|
639
|
+
</style>
|