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/package.json CHANGED
@@ -97,6 +97,6 @@
97
97
  "release": "standard-version"
98
98
  },
99
99
  "type": "module",
100
- "version": "0.0.34",
100
+ "version": "0.0.35",
101
101
  "author": ""
102
102
  }
@@ -20,7 +20,7 @@
20
20
  >
21
21
  <span
22
22
  v-if="getColumnValue(col)"
23
- :class="tableProps.row.customizedClass && tableProps.row.customizedClass(col, tablePropsData.row[col.name])"
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.customizedClass ? tableProps.row.customizedClass(col, tablePropsData.row[col.name]) : '',
43
- 'itemsFontSize text-almost-black'
42
+ tableProps.row.customizedTextClass ? tableProps.row.customizedTextClass : 'itemsFontSize text-almost-black',
44
43
  ]"
45
44
  >
46
45
  <q-icon
@@ -57,11 +57,10 @@ export default {
57
57
  label: 'Dessert (100g serving)',
58
58
  align: 'left',
59
59
  sortable: true,
60
- customizedClass: (row: { customizedClass: string }) => row.customizedClass,
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
- customizedClass: this.getClass
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 (cols: string, rowName: string) {
331
- console.log(cols.name, rowName)
332
- if (cols.name === 'name' && rowName === 'Frozen Yogurt') {
333
- return 'text-negative'
334
- } else {
335
- return 'text-positive'
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 {