@hostlink/nuxt-light 1.46.4 → 1.46.5

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.4",
4
+ "version": "1.46.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -21,7 +21,8 @@ function getTo(field) {
21
21
  }
22
22
  return null;
23
23
  }
24
- const getFormattedValue = (field, val, model) => {
24
+ const getFormattedValue = (field, model) => {
25
+ let val = model ? model[field.name] : null;
25
26
  if (field.format) {
26
27
  if (field.format instanceof Function) {
27
28
  return field.format(val, model);
@@ -36,7 +37,7 @@ const getFormattedValue = (field, val, model) => {
36
37
  <q-list v-bind="$props">
37
38
  <template v-if="fields">
38
39
  <l-item v-for="field in fields" :label="field.label" :to="getTo(field)">
39
- {{ getFormattedValue(field, props.modelValue, props.modelValue) }}
40
+ {{ getFormattedValue(field, props.modelValue) }}
40
41
  </l-item>
41
42
 
42
43
  </template>
@@ -1,4 +1,8 @@
1
1
  import { default as api } from "./api.js";
2
2
  export default (name, field) => {
3
- return api.model(name).field(field);
3
+ let f = api.model(name).field(field);
4
+ if (f && !f.name) {
5
+ f.name = field;
6
+ }
7
+ return f;
4
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.46.4",
3
+ "version": "1.46.5",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",