quasar-factory-lib 0.0.31 → 0.0.32
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/pages/TablePage.vue.d.ts +13 -0
- package/dist/quasar-factory-lib.js +334 -331
- package/dist/quasar-factory-lib.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Table/Table.vue +0 -3
- package/src/components/Table/components/TableSlotBody.vue +2 -1
- package/src/components/Table/components/TableSlotGrid.vue +2 -3
- package/src/css/app.css +7 -0
- package/src/pages/TablePage.vue +19 -3
package/package.json
CHANGED
|
@@ -258,8 +258,6 @@ export default defineComponent({
|
|
|
258
258
|
this.$emit('onUpdateCustomizedCheckboxValue', row)
|
|
259
259
|
},
|
|
260
260
|
clearTableSelection () {
|
|
261
|
-
// const table = this.$refs.myTable as QTable
|
|
262
|
-
// table.clearSelection()
|
|
263
261
|
this.selected = []
|
|
264
262
|
},
|
|
265
263
|
toggleSearchVisibility (store: {disableScannerButtons: boolean, lastFilterValue: string, valueInputFilterTable: string}) {
|
|
@@ -294,5 +292,4 @@ export default defineComponent({
|
|
|
294
292
|
})
|
|
295
293
|
</script>
|
|
296
294
|
<style>
|
|
297
|
-
/* @import url('./style.css'); */
|
|
298
295
|
</style>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<span
|
|
22
22
|
v-if="getColumnValue(col)"
|
|
23
|
+
:class="tableProps.row.customizedClass && tableProps.row.customizedClass(col.name, tablePropsData.row[col.name])"
|
|
23
24
|
v-html="tablePropsData.row[col.name]"
|
|
24
25
|
></span>
|
|
25
26
|
<!-- fa-solid fa-pen-to-square -->
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
v-if="col.editable"
|
|
28
29
|
name="edit"
|
|
29
30
|
color="primary"
|
|
30
|
-
size="
|
|
31
|
+
size="md"
|
|
31
32
|
class="cursor-pointer"
|
|
32
33
|
/>
|
|
33
34
|
<TablePopupEdit
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
v-for="col in tablePropsData.cols.filter((col: any) => col.name !== 'desc')"
|
|
28
28
|
:key="col.name"
|
|
29
29
|
>
|
|
30
|
-
<q-item-section>
|
|
30
|
+
<q-item-section :class="tableProps.row.customizedClass && tableProps.row.customizedClass(col.name, tablePropsData.row[col.name])">
|
|
31
31
|
<q-item-label class="itemsFontSize ellipsis text-light-gray">
|
|
32
32
|
{{
|
|
33
33
|
col.label
|
|
@@ -40,12 +40,11 @@
|
|
|
40
40
|
v-if="getColumnValue(col)"
|
|
41
41
|
class="itemsFontSize text-almost-black"
|
|
42
42
|
>
|
|
43
|
-
<!-- fa-solid fa-pen-to-square -->
|
|
44
43
|
<q-icon
|
|
45
44
|
v-if="col.editable"
|
|
46
45
|
name="edit"
|
|
47
46
|
color="primary"
|
|
48
|
-
size="
|
|
47
|
+
size="md"
|
|
49
48
|
class="cursor-pointer"
|
|
50
49
|
/>
|
|
51
50
|
<span v-html="tableProps.row[col.name]" />
|
package/src/css/app.css
CHANGED
package/src/pages/TablePage.vue
CHANGED
|
@@ -4,14 +4,18 @@
|
|
|
4
4
|
class="full-width column justify-center align-center items-center"
|
|
5
5
|
style="height: 70vh;"
|
|
6
6
|
>
|
|
7
|
+
<q-btn @click="()=> {
|
|
8
|
+
smallDevice = ! smallDevice
|
|
9
|
+
}">Change Device</q-btn>
|
|
7
10
|
<div
|
|
8
11
|
class="full-width"
|
|
9
12
|
>
|
|
10
13
|
<Table
|
|
14
|
+
ref="table"
|
|
11
15
|
:rows="rows"
|
|
12
16
|
:columns="columns"
|
|
13
17
|
:visible-columns="visibleColumns"
|
|
14
|
-
:small-device="
|
|
18
|
+
:small-device="smallDevice"
|
|
15
19
|
:store="store"
|
|
16
20
|
:table-style="tableStyle"
|
|
17
21
|
:show-skeleton="showSkeleton"
|
|
@@ -39,6 +43,7 @@ export default {
|
|
|
39
43
|
},
|
|
40
44
|
data () {
|
|
41
45
|
return {
|
|
46
|
+
smallDevice: false,
|
|
42
47
|
showSkeleton: true,
|
|
43
48
|
showDialog: false,
|
|
44
49
|
forceRender: false,
|
|
@@ -51,7 +56,8 @@ export default {
|
|
|
51
56
|
required: true,
|
|
52
57
|
label: 'Dessert (100g serving)',
|
|
53
58
|
align: 'left',
|
|
54
|
-
sortable: true
|
|
59
|
+
sortable: true,
|
|
60
|
+
customizedClass: (row: { customizedClass: string }) => row.customizedClass,
|
|
55
61
|
},
|
|
56
62
|
{
|
|
57
63
|
name: 'available',
|
|
@@ -295,10 +301,12 @@ export default {
|
|
|
295
301
|
infiniteScroll.handleInfiniteScrollNewTable(this)
|
|
296
302
|
// this.rows = this.rowsData
|
|
297
303
|
this.visibleColumns = this.store.visiblecolumns
|
|
304
|
+
console.log(this.$refs.table)
|
|
298
305
|
|
|
299
306
|
const lista = this.rowsData
|
|
300
307
|
const lista2 = []
|
|
301
308
|
for (let i = 0; i < lista.length; i++) {
|
|
309
|
+
|
|
302
310
|
lista2.push({
|
|
303
311
|
name: lista[i].name,
|
|
304
312
|
booleanIcon: lista[i].booleanIcon,
|
|
@@ -310,7 +318,8 @@ export default {
|
|
|
310
318
|
protein: lista[i].protein,
|
|
311
319
|
sodium: lista[i].sodium,
|
|
312
320
|
calcium: lista[i].calcium,
|
|
313
|
-
iron: lista[i].iron
|
|
321
|
+
iron: lista[i].iron,
|
|
322
|
+
customizedClass: this.getClass
|
|
314
323
|
})
|
|
315
324
|
}
|
|
316
325
|
this.rows = lista2
|
|
@@ -318,6 +327,13 @@ export default {
|
|
|
318
327
|
|
|
319
328
|
},
|
|
320
329
|
methods: {
|
|
330
|
+
getClass (colName: string, rowName: string) {
|
|
331
|
+
if (colName === 'name' && rowName === 'Frozen Yogurt') {
|
|
332
|
+
return 'text-negative'
|
|
333
|
+
} else {
|
|
334
|
+
return 'text-positive'
|
|
335
|
+
}
|
|
336
|
+
},
|
|
321
337
|
saveSelectedColumns (columns: string []): void {
|
|
322
338
|
this.store.visiblecolumns = columns
|
|
323
339
|
this.visibleColumns = columns
|