quasar-factory-lib 0.0.34 → 0.0.35
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 +14 -14
- package/dist/quasar-factory-lib.js +2 -3
- package/dist/quasar-factory-lib.umd.cjs +8 -8
- package/package.json +1 -1
- package/src/components/Table/components/TableSlotBody.vue +1 -1
- package/src/components/Table/components/TableSlotGrid.vue +1 -2
- package/src/pages/TablePage.vue +17 -12
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<span
|
|
22
22
|
v-if="getColumnValue(col)"
|
|
23
|
-
:class="tableProps.row.
|
|
23
|
+
:class="tableProps.row.customizedTextClass"
|
|
24
24
|
v-html="tablePropsData.row[col.name]"
|
|
25
25
|
></span>
|
|
26
26
|
<!-- fa-solid fa-pen-to-square -->
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
<q-item-label
|
|
40
40
|
v-if="getColumnValue(col)"
|
|
41
41
|
:class="[
|
|
42
|
-
tableProps.row.
|
|
43
|
-
'itemsFontSize text-almost-black'
|
|
42
|
+
tableProps.row.customizedTextClass ? tableProps.row.customizedTextClass : 'itemsFontSize text-almost-black',
|
|
44
43
|
]"
|
|
45
44
|
>
|
|
46
45
|
<q-icon
|
package/src/pages/TablePage.vue
CHANGED
|
@@ -57,11 +57,10 @@ export default {
|
|
|
57
57
|
label: 'Dessert (100g serving)',
|
|
58
58
|
align: 'left',
|
|
59
59
|
sortable: true,
|
|
60
|
-
|
|
60
|
+
customizedTextClass: (row: { customizedTextClass: string }) => row.customizedTextClass
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
name: 'available',
|
|
64
|
-
required: false,
|
|
65
64
|
label: 'Available',
|
|
66
65
|
align: 'left',
|
|
67
66
|
sortable: true,
|
|
@@ -109,7 +108,6 @@ export default {
|
|
|
109
108
|
label: 'Checked',
|
|
110
109
|
field: 'carbs',
|
|
111
110
|
sortable: true,
|
|
112
|
-
required: false,
|
|
113
111
|
showCustomizedCheckBox: true,
|
|
114
112
|
checkedIcon: 'check_circle',
|
|
115
113
|
uncheckedIcon: 'cancel',
|
|
@@ -122,7 +120,6 @@ export default {
|
|
|
122
120
|
label: 'Protein (g)',
|
|
123
121
|
field: 'protein',
|
|
124
122
|
sortable: true,
|
|
125
|
-
required: false,
|
|
126
123
|
editable: true,
|
|
127
124
|
showEditIcon: true,
|
|
128
125
|
popupEditEmit: 'onSaveValuePopupEdit',
|
|
@@ -306,7 +303,12 @@ export default {
|
|
|
306
303
|
const lista = this.rowsData
|
|
307
304
|
const lista2 = []
|
|
308
305
|
for (let i = 0; i < lista.length; i++) {
|
|
309
|
-
|
|
306
|
+
let myNewClass = ''
|
|
307
|
+
if (lista[i]['calories'] === 159) {
|
|
308
|
+
myNewClass = 'text-negative'
|
|
309
|
+
} else {
|
|
310
|
+
myNewClass = 'text-positive'
|
|
311
|
+
}
|
|
310
312
|
lista2.push({
|
|
311
313
|
name: lista[i].name,
|
|
312
314
|
booleanIcon: lista[i].booleanIcon,
|
|
@@ -319,7 +321,7 @@ export default {
|
|
|
319
321
|
sodium: lista[i].sodium,
|
|
320
322
|
calcium: lista[i].calcium,
|
|
321
323
|
iron: lista[i].iron,
|
|
322
|
-
|
|
324
|
+
customizedTextClass: myNewClass
|
|
323
325
|
})
|
|
324
326
|
}
|
|
325
327
|
this.rows = lista2
|
|
@@ -327,12 +329,15 @@ export default {
|
|
|
327
329
|
|
|
328
330
|
},
|
|
329
331
|
methods: {
|
|
330
|
-
getClass (
|
|
331
|
-
console.log(
|
|
332
|
-
if (cols.name === 'name' && rowName === 'Frozen Yogurt') {
|
|
333
|
-
|
|
334
|
-
} else {
|
|
335
|
-
|
|
332
|
+
getClass (slotType: string, props: string, rowName: string) {
|
|
333
|
+
console.log(slotType, props, rowName)
|
|
334
|
+
// if (cols.name === 'name' && rowName === 'Frozen Yogurt') {
|
|
335
|
+
// return 'text-negative'
|
|
336
|
+
// } else {
|
|
337
|
+
// return 'text-positive'
|
|
338
|
+
// }
|
|
339
|
+
if (props.columns.Name.name === '') {
|
|
340
|
+
|
|
336
341
|
}
|
|
337
342
|
},
|
|
338
343
|
saveSelectedColumns (columns: string []): void {
|