|
|
@@ -101,6 +101,16 @@
|
|
|
</q-td>
|
|
|
</template>
|
|
|
|
|
|
+ <template #body-cell="props">
|
|
|
+ <q-td :props="props">
|
|
|
+ {{ truncate(props.value) }}
|
|
|
+
|
|
|
+ <q-tooltip v-if="isTruncated(props.value)">
|
|
|
+ {{ props.value }}
|
|
|
+ </q-tooltip>
|
|
|
+ </q-td>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #item="{ cols, row, index }">
|
|
|
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
|
|
<q-card
|
|
|
@@ -175,9 +185,16 @@ import { useI18n } from "vue-i18n";
|
|
|
import { useQuasar } from "quasar";
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
|
+import { truncate } from "src/helpers/utils";
|
|
|
+
|
|
|
import DefaultInput from "./DefaultInput.vue";
|
|
|
import DefaultSelect from "./DefaultSelect.vue";
|
|
|
|
|
|
+const TRUNCATE_LENGTH = 30;
|
|
|
+
|
|
|
+const isTruncated = (value) =>
|
|
|
+ String(value ?? "").length > TRUNCATE_LENGTH;
|
|
|
+
|
|
|
const emit = defineEmits([
|
|
|
"noRows",
|
|
|
"onAddItem",
|
|
|
@@ -388,7 +405,9 @@ const usableSlots = (slots) => {
|
|
|
|
|
|
return availableSlots.filter(
|
|
|
(slot) =>
|
|
|
- !["body-cell-actions", "loading", "no-data", "top"].includes(slot),
|
|
|
+ !["body-cell-actions", "body-cell", "loading", "no-data", "top"].includes(
|
|
|
+ slot,
|
|
|
+ ),
|
|
|
);
|
|
|
};
|
|
|
|