@hostlink/nuxt-light 1.67.6 → 1.67.7
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
package/dist/module.mjs
CHANGED
|
@@ -334,16 +334,21 @@ const module$1 = defineNuxtModule({
|
|
|
334
334
|
}, */
|
|
335
335
|
async setup(options, nuxt) {
|
|
336
336
|
const resolver = createResolver(import.meta.url);
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
337
|
+
const runtimeConfig = nuxt.options.runtimeConfig ?? {};
|
|
338
|
+
runtimeConfig.public = runtimeConfig.public ?? {};
|
|
339
|
+
const existingLight = runtimeConfig.public.light;
|
|
340
|
+
runtimeConfig.public = {
|
|
341
|
+
...runtimeConfig.public,
|
|
342
|
+
light: {
|
|
343
|
+
...existingLight,
|
|
344
|
+
tableActionIcons: {
|
|
345
|
+
view: options.tableActionIcons?.view,
|
|
346
|
+
edit: options.tableActionIcons?.edit,
|
|
347
|
+
delete: options.tableActionIcons?.delete
|
|
348
|
+
}
|
|
345
349
|
}
|
|
346
350
|
};
|
|
351
|
+
nuxt.options.runtimeConfig = runtimeConfig;
|
|
347
352
|
extendPages((pages) => {
|
|
348
353
|
for (const route of routes) {
|
|
349
354
|
if (route.children) {
|
|
@@ -597,17 +597,14 @@ const hasFilters = computed(() => {
|
|
|
597
597
|
|
|
598
598
|
<l-action-btn v-if="actionView && props.row.canView"
|
|
599
599
|
:to="`/${modelName}/${props.row[primaryKey]}/view`"
|
|
600
|
-
:icon="light.styles.table.actionIcons.view"
|
|
601
|
-
:tooltip="$t('View')" />
|
|
600
|
+
:icon="light.styles.table.actionIcons.view" />
|
|
602
601
|
|
|
603
602
|
<l-action-btn v-if="activeEdit && props.row.canUpdate"
|
|
604
603
|
:to="`/${modelName}/${props.row[primaryKey]}/edit`"
|
|
605
|
-
:icon="light.styles.table.actionIcons.edit"
|
|
606
|
-
:tooltip="$t('Edit')" />
|
|
604
|
+
:icon="light.styles.table.actionIcons.edit" />
|
|
607
605
|
|
|
608
606
|
<l-delete-btn v-if="actionDelete && props.row.canDelete"
|
|
609
607
|
:icon="light.styles.table.actionIcons.delete"
|
|
610
|
-
:tooltip="$t('Delete')"
|
|
611
608
|
@submit="onDelete(props.row[primaryKey])" size="sm" />
|
|
612
609
|
|
|
613
610
|
<slot name="actions" v-bind="props"></slot>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed } from "vue";
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
3
|
import { useErrorMessage } from "./useErrorMessage";
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
context: Object
|
|
6
6
|
});
|
|
7
|
-
const
|
|
7
|
+
const error = ref(false);
|
|
8
|
+
const errorMessage = ref("");
|
|
9
|
+
useErrorMessage(props.context.node, error, errorMessage);
|
|
8
10
|
const value = computed({
|
|
9
11
|
get: () => props.context.value,
|
|
10
12
|
set: (val) => props.context.node.input(val)
|