@hostlink/nuxt-light 0.0.107 → 0.0.109

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "0.0.107"
4
+ "version": "0.0.109"
5
5
  }
@@ -473,9 +473,6 @@ const hasActions = computed(() => {
473
473
 
474
474
  const getCellStyle = (col: any, row: any) => {
475
475
  const style: any = {};
476
- if (col.whiteSpace) {
477
- style.whiteSpace = col.whiteSpace;
478
- }
479
476
  if (col.backgroundColor) {
480
477
  if (typeof col.backgroundColor == "function") {
481
478
  style.backgroundColor = col.backgroundColor(row);
@@ -485,8 +482,20 @@ const getCellStyle = (col: any, row: any) => {
485
482
 
486
483
  }
487
484
  return style;
485
+ }
486
+
487
+ const getCellClass = (col: any, row: any) => {
488
+ const cl: any = [];
488
489
 
490
+ if (col.cellClass) {
491
+ if (typeof col.cellClass == "function") {
492
+ cl.push(col.cellClass(row));
493
+ } else {
494
+ cl.push(col.cellClass);
495
+ }
489
496
 
497
+ }
498
+ return cl;
490
499
  }
491
500
 
492
501
  </script>
@@ -564,7 +573,8 @@ const getCellStyle = (col: any, row: any) => {
564
573
  </template>
565
574
  <template v-else>
566
575
  <q-td :key="col.name" :props="props" :auto-width="col.autoWidth ?? false"
567
- :style="getCellStyle(col, props.row)"><template v-if="col.to" class="bg-primary">
576
+ :style="getCellStyle(col, props.row)" :class="getCellClass(col, props.row)"><template
577
+ v-if="col.to" class="bg-primary">
568
578
  <l-link :to="col.to(props.row)">{{ col.value }}</l-link>
569
579
  </template><template v-else>{{ col.value }}</template></q-td>
570
580
  </template>
@@ -626,7 +636,7 @@ const getCellStyle = (col: any, row: any) => {
626
636
 
627
637
  <template v-if="!col.searchType">
628
638
  <q-input dense clearable v-model="filters[col.name]" @keydown.enter.prevent="onFilters"
629
- @clear="onFilters"></q-input>
639
+ @clear="onFilters" enterkeyhint="search"></q-input>
630
640
 
631
641
  </template>
632
642
 
@@ -3,7 +3,6 @@ declare const _default: {
3
3
  label: string;
4
4
  sortable: boolean;
5
5
  searchable: boolean;
6
- style: string;
7
6
  };
8
7
  first_name: {
9
8
  label: string;
@@ -2,8 +2,8 @@ export default {
2
2
  username: {
3
3
  label: "Username",
4
4
  sortable: true,
5
- searchable: true,
6
- style: "white-space: nowrap;"
5
+ searchable: true
6
+ //cellClass: (row: any) => (row.username == "admin" ? "text-danger" : ""),
7
7
  /* backgroundColor: (row: any) => {
8
8
 
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "0.0.107",
3
+ "version": "0.0.109",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",