@hostlink/nuxt-light 1.46.5 → 1.46.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.46.5",
4
+ "version": "1.46.7",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -21,15 +21,15 @@ function getTo(field) {
21
21
  }
22
22
  return null;
23
23
  }
24
- const getFormattedValue = (field, model) => {
25
- let val = model ? model[field.name] : null;
26
- if (field.format) {
27
- if (field.format instanceof Function) {
28
- return field.format(val, model);
24
+ const getFieldValue = (field) => {
25
+ const model = props.modelValue;
26
+ if (field.field) {
27
+ if (field.field instanceof Function) {
28
+ return field.field(model);
29
29
  }
30
30
  }
31
31
  ;
32
- return val;
32
+ return model ? model[field.name] : null;
33
33
  };
34
34
  </script>
35
35
 
@@ -37,7 +37,7 @@ const getFormattedValue = (field, model) => {
37
37
  <q-list v-bind="$props">
38
38
  <template v-if="fields">
39
39
  <l-item v-for="field in fields" :label="field.label" :to="getTo(field)">
40
- {{ getFormattedValue(field, props.modelValue) }}
40
+ {{ getFieldValue(field) }}
41
41
  </l-item>
42
42
 
43
43
  </template>
@@ -3,7 +3,7 @@ import "@quasar/quasar-ui-qmarkdown/dist/index.css";
3
3
  import { q } from "#imports";
4
4
  import { createI18n } from "vue-i18n";
5
5
  import createLight from "./composables/createLight.js";
6
- import { addRouteMiddleware, defineNuxtPlugin, navigateTo, useRoute } from "#app";
6
+ import { addRouteMiddleware, defineNuxtPlugin, useRoute } from "#app";
7
7
  import "./assets/main.css";
8
8
  import message_en from "./locales/en.json";
9
9
  import message_zh from "./locales/zh-hk.json";
@@ -36,8 +36,7 @@ export default defineNuxtPlugin((nuxtApp) => {
36
36
  }
37
37
  });
38
38
  if (!my) {
39
- await navigateTo("/");
40
- return false;
39
+ return;
41
40
  }
42
41
  if (!my.allowedPath) {
43
42
  return "/page_not_found?path=" + encodeURIComponent(to.fullPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.46.5",
3
+ "version": "1.46.7",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",