quasar-factory-lib 0.0.27 → 0.0.28
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 +0 -282
- package/dist/pages/TablePage.vue.d.ts +27 -298
- package/dist/quasar-factory-lib.js +4365 -4475
- package/dist/quasar-factory-lib.umd.cjs +11 -11
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/Table/Table.vue +4 -4
- package/src/components/Table/components/TableSlotBody.vue +4 -3
- package/src/components/Table/components/TableSlotGrid.vue +1 -1
- package/src/css/app.css +7 -0
- package/src/pages/TablePage.vue +44 -8
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"@quasar/extras": "^1.16.11",
|
|
4
4
|
"global": "^4.4.0",
|
|
5
5
|
"pinia": "^3.0.1",
|
|
6
|
-
"quasar": "^2.
|
|
6
|
+
"quasar": "^2.18.0",
|
|
7
7
|
"vue": "^3.5.11",
|
|
8
8
|
"vue-i18n": "^10.0.4"
|
|
9
9
|
},
|
|
@@ -97,6 +97,6 @@
|
|
|
97
97
|
"release": "standard-version"
|
|
98
98
|
},
|
|
99
99
|
"type": "module",
|
|
100
|
-
"version": "0.0.
|
|
100
|
+
"version": "0.0.28",
|
|
101
101
|
"author": ""
|
|
102
102
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
:small-device="smallDevice"
|
|
57
57
|
/>
|
|
58
58
|
</template>
|
|
59
|
-
<template #body="props">
|
|
59
|
+
<!-- <template #body="props">
|
|
60
60
|
<TableSlotBody
|
|
61
61
|
v-if="!showSkeleton"
|
|
62
62
|
:table-props="props"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
@on-click-button="onClickButton"
|
|
68
68
|
@click="onRowClick(props.row)"
|
|
69
69
|
/>
|
|
70
|
-
</template>
|
|
70
|
+
</template> -->
|
|
71
71
|
<template #item="props">
|
|
72
72
|
<TableSlotGrid
|
|
73
73
|
:table-props="props"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
import { defineComponent } from 'vue'
|
|
96
96
|
import TableSlotHeader from './components/TableSlotHeader.vue'
|
|
97
97
|
import TableColumnsSelector from './components/TableColumnsSelector.vue'
|
|
98
|
-
import TableSlotBody from './components/TableSlotBody.vue'
|
|
98
|
+
// import TableSlotBody from './components/TableSlotBody.vue'
|
|
99
99
|
import TableSlotGrid from './components/TableSlotGrid.vue'
|
|
100
100
|
import TableFilter from './components/TableFilter.vue'
|
|
101
101
|
import TableSort from './utils/sort.js'
|
|
@@ -106,7 +106,7 @@ export default defineComponent({
|
|
|
106
106
|
components: {
|
|
107
107
|
TableSlotHeader,
|
|
108
108
|
TableColumnsSelector,
|
|
109
|
-
TableSlotBody,
|
|
109
|
+
// TableSlotBody,
|
|
110
110
|
TableSlotGrid,
|
|
111
111
|
TableFilter,
|
|
112
112
|
TableSkeleton,
|
|
@@ -17,16 +17,17 @@
|
|
|
17
17
|
:key="col.name"
|
|
18
18
|
:class="tableProps.row.rowBgColor || 'bg-main-color'"
|
|
19
19
|
:props="tableProps"
|
|
20
|
+
:style="tablePropsData.row.tdStyle"
|
|
20
21
|
>
|
|
21
22
|
<span
|
|
22
|
-
:style="
|
|
23
|
+
:style="tableProps.row.rowStyleFn(col.name, tableProps.row.name)"
|
|
23
24
|
v-if="getColumnValue(col)"
|
|
24
25
|
v-html="tableProps.row[col.name]"
|
|
25
|
-
|
|
26
|
+
></span>
|
|
26
27
|
<!-- fa-solid fa-pen-to-square -->
|
|
27
28
|
<q-icon
|
|
28
29
|
v-if="col.editable"
|
|
29
|
-
name="
|
|
30
|
+
name="fa-solid fa-pen-to-square "
|
|
30
31
|
color="primary"
|
|
31
32
|
size="sm"
|
|
32
33
|
class="cursor-pointer"
|
package/src/css/app.css
CHANGED
package/src/pages/TablePage.vue
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:rows="rows"
|
|
12
12
|
:columns="columns"
|
|
13
13
|
:visible-columns="visibleColumns"
|
|
14
|
-
:small-device="
|
|
14
|
+
:small-device="true"
|
|
15
15
|
:store="store"
|
|
16
16
|
:table-style="tableStyle"
|
|
17
17
|
:show-skeleton="false"
|
|
@@ -50,11 +50,13 @@ export default {
|
|
|
50
50
|
required: true,
|
|
51
51
|
label: 'Dessert (100g serving)',
|
|
52
52
|
align: 'left',
|
|
53
|
-
sortable: true
|
|
53
|
+
sortable: true,
|
|
54
|
+
tdStyle: (row: { tdStyle: string }) => row.tdStyle,
|
|
55
|
+
rowStyleFn: (row: { rowStyleFn: string }) => row.rowStyleFn,
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
58
|
name: 'available',
|
|
57
|
-
required:
|
|
59
|
+
required: false,
|
|
58
60
|
label: 'Available',
|
|
59
61
|
align: 'left',
|
|
60
62
|
sortable: true,
|
|
@@ -79,7 +81,8 @@ export default {
|
|
|
79
81
|
popupEditEmit: 'onSaveValuePopupEdit',
|
|
80
82
|
popupEditInputtype: 'number',
|
|
81
83
|
popupEditDataCy: '',
|
|
82
|
-
popupEditMask: '#####'
|
|
84
|
+
popupEditMask: '#####',
|
|
85
|
+
tdStyle: (row: { tdStyle: string }) => row.tdStyle,
|
|
83
86
|
},
|
|
84
87
|
{
|
|
85
88
|
name: 'fat',
|
|
@@ -102,7 +105,7 @@ export default {
|
|
|
102
105
|
label: 'Checked',
|
|
103
106
|
field: 'carbs',
|
|
104
107
|
sortable: true,
|
|
105
|
-
required:
|
|
108
|
+
required: false,
|
|
106
109
|
showCustomizedCheckBox: true,
|
|
107
110
|
checkedIcon: 'check_circle',
|
|
108
111
|
uncheckedIcon: 'cancel',
|
|
@@ -115,7 +118,7 @@ export default {
|
|
|
115
118
|
label: 'Protein (g)',
|
|
116
119
|
field: 'protein',
|
|
117
120
|
sortable: true,
|
|
118
|
-
required:
|
|
121
|
+
required: false,
|
|
119
122
|
editable: true,
|
|
120
123
|
showEditIcon: true,
|
|
121
124
|
popupEditEmit: 'onSaveValuePopupEdit',
|
|
@@ -144,7 +147,6 @@ export default {
|
|
|
144
147
|
rows: [],
|
|
145
148
|
rowsData: [
|
|
146
149
|
{
|
|
147
|
-
tdStyle: "color: #597765 !important; font-weight: bold;",
|
|
148
150
|
name: 'Frozen Yogurt',
|
|
149
151
|
booleanIcon: true,
|
|
150
152
|
available: true,
|
|
@@ -293,10 +295,44 @@ export default {
|
|
|
293
295
|
this.store.cleanTableFilter()
|
|
294
296
|
this.tableStyle = setTableHeight.setTableHeight()
|
|
295
297
|
infiniteScroll.handleInfiniteScrollNewTable(this)
|
|
296
|
-
this.rows = this.rowsData
|
|
298
|
+
// this.rows = this.rowsData
|
|
297
299
|
this.visibleColumns = this.store.visiblecolumns
|
|
300
|
+
|
|
301
|
+
const lista = this.rowsData
|
|
302
|
+
const lista2 = []
|
|
303
|
+
for (let i = 0; i < lista.length; i++) {
|
|
304
|
+
let tdStyle_= ''
|
|
305
|
+
// if (lista[i].name === 'Frozen Yogurt') {
|
|
306
|
+
// tdStyle_ = "color: red !important; font-weight: bold;"
|
|
307
|
+
// }else {
|
|
308
|
+
// tdStyle_ = "color: blue !important; font-weight: bold;"
|
|
309
|
+
// }
|
|
310
|
+
lista2.push({
|
|
311
|
+
name: lista[i].name,
|
|
312
|
+
booleanIcon: lista[i].booleanIcon,
|
|
313
|
+
available: lista[i].available,
|
|
314
|
+
calories: lista[i].calories,
|
|
315
|
+
fat: lista[i]. fat,
|
|
316
|
+
carbs: lista[i].carbs,
|
|
317
|
+
checked: lista[i].checked,
|
|
318
|
+
protein: lista[i].protein,
|
|
319
|
+
sodium: lista[i].sodium,
|
|
320
|
+
calcium: lista[i].calcium,
|
|
321
|
+
iron: lista[i].iron,
|
|
322
|
+
tdStyle: tdStyle_,
|
|
323
|
+
rowStyleFn: this.rowStyleFn
|
|
324
|
+
})
|
|
325
|
+
}
|
|
326
|
+
// console.log(lista2)
|
|
327
|
+
this.rows = lista2
|
|
298
328
|
},
|
|
299
329
|
methods: {
|
|
330
|
+
rowStyleFn (colName: string, rowName: string) {
|
|
331
|
+
if (colName ==='name' && rowName=== 'Frozen Yogurt') {
|
|
332
|
+
return 'color: red !important; font-weight: bold;'
|
|
333
|
+
}
|
|
334
|
+
return 'color: blue !important; font-weight: bold;'
|
|
335
|
+
},
|
|
300
336
|
saveSelectedColumns (columns: string []): void {
|
|
301
337
|
this.store.visiblecolumns = columns
|
|
302
338
|
this.visibleColumns = columns
|