quasar-factory-lib 0.0.28 → 0.0.30

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.28",
100
+ "version": "0.0.30",
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,19 +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"
21
20
  >
22
21
  <span
23
- :style="tableProps.row.rowStyleFn(col.name, tableProps.row.name)"
24
22
  v-if="getColumnValue(col)"
25
- v-html="tableProps.row[col.name]"
23
+ v-html="tablePropsData.row[col.name]"
26
24
  ></span>
27
25
  <!-- fa-solid fa-pen-to-square -->
28
26
  <q-icon
29
27
  v-if="col.editable"
30
28
  name="fa-solid fa-pen-to-square "
31
29
  color="primary"
32
- size="sm"
30
+ size="xs"
33
31
  class="cursor-pointer"
34
32
  />
35
33
  <TablePopupEdit
@@ -39,13 +39,12 @@
39
39
  <q-item-label
40
40
  v-if="getColumnValue(col)"
41
41
  class="itemsFontSize text-almost-black"
42
- :style="tableProps.row.rowStyleFn(col.name, tableProps.row.name)"
43
42
  >
44
43
  <q-icon
45
44
  v-if="col.editable"
46
45
  name="fa-solid fa-pen-to-square"
47
46
  color="primary"
48
- size="sm"
47
+ size="sx"
49
48
  class="cursor-pointer"
50
49
  />
51
50
  <span v-html="tableProps.row[col.name]" />
@@ -11,10 +11,10 @@
11
11
  :rows="rows"
12
12
  :columns="columns"
13
13
  :visible-columns="visibleColumns"
14
- :small-device="true"
14
+ :small-device="false"
15
15
  :store="store"
16
16
  :table-style="tableStyle"
17
- :show-skeleton="false"
17
+ :show-skeleton="showSkeleton"
18
18
  :selection-type="'multiple'"
19
19
  :filter-method="filterMethod"
20
20
  :filter-computed="filter"
@@ -39,6 +39,7 @@ export default {
39
39
  },
40
40
  data () {
41
41
  return {
42
+ showSkeleton: true,
42
43
  showDialog: false,
43
44
  forceRender: false,
44
45
  store: tableStore(),
@@ -51,8 +52,7 @@ export default {
51
52
  label: 'Dessert (100g serving)',
52
53
  align: 'left',
53
54
  sortable: true,
54
- tdStyle: (row: { tdStyle: string }) => row.tdStyle,
55
- rowStyleFn: (row: { rowStyleFn: string }) => row.rowStyleFn,
55
+ rowStyleFn: (row) => row.rowStyleFn,
56
56
  },
57
57
  {
58
58
  name: 'available',
@@ -81,8 +81,7 @@ export default {
81
81
  popupEditEmit: 'onSaveValuePopupEdit',
82
82
  popupEditInputtype: 'number',
83
83
  popupEditDataCy: '',
84
- popupEditMask: '#####',
85
- tdStyle: (row: { tdStyle: string }) => row.tdStyle,
84
+ popupEditMask: '#####'
86
85
  },
87
86
  {
88
87
  name: 'fat',
@@ -301,12 +300,6 @@ export default {
301
300
  const lista = this.rowsData
302
301
  const lista2 = []
303
302
  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
303
  lista2.push({
311
304
  name: lista[i].name,
312
305
  booleanIcon: lista[i].booleanIcon,
@@ -319,16 +312,17 @@ export default {
319
312
  sodium: lista[i].sodium,
320
313
  calcium: lista[i].calcium,
321
314
  iron: lista[i].iron,
322
- tdStyle: tdStyle_,
323
315
  rowStyleFn: this.rowStyleFn
324
316
  })
325
317
  }
326
- // console.log(lista2)
327
- this.rows = lista2
318
+ this.rows = lista2
319
+ this.showSkeleton = false
320
+
328
321
  },
329
322
  methods: {
330
323
  rowStyleFn (colName: string, rowName: string) {
331
- if (colName ==='name' && rowName=== 'Frozen Yogurt') {
324
+ console.log('rowStyleFn', colName)
325
+ if (colName === 'name' && rowName=== 'Frozen Yogurt') {
332
326
  return 'color: red !important; font-weight: bold;'
333
327
  }
334
328
  return 'color: blue !important; font-weight: bold;'