@hostlink/nuxt-light 1.26.0 → 1.26.2

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.26.0",
4
+ "version": "1.26.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -0,0 +1,10 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ test: String
4
+ })
5
+ </script>
6
+ <template>
7
+ <div>
8
+ {{ props }}
9
+ </div>
10
+ </template>
@@ -660,7 +660,7 @@ selectedNodePath.value = drives[0].index.toString();
660
660
  <q-list padding class="text-grey-8">
661
661
  <q-item>
662
662
  <q-item-section>
663
- <l-btn icon="add" label="New" :disable="!selectedNodePath">
663
+ <q-btn icon="add" label="New" :disable="!selectedNodePath" :color="$light.color">
664
664
  <q-menu>
665
665
  <q-list>
666
666
  <q-item clickable v-close-popup @click="onNewFolder" v-if="permission.includes('fs.folder.create')">
@@ -679,7 +679,7 @@ selectedNodePath.value = drives[0].index.toString();
679
679
  </q-item>
680
680
  </q-list>
681
681
  </q-menu>
682
- </l-btn>
682
+ </q-btn>
683
683
  </q-item-section>
684
684
  </q-item>
685
685
 
@@ -354,7 +354,7 @@ const onLocalRequest = async (p: any) => {
354
354
  color: "negative"
355
355
  })
356
356
  this.setData({ data: [], meta: { total: 0, key: "", name: "" } });
357
-
357
+
358
358
  }
359
359
  }
360
360
  }
@@ -550,7 +550,8 @@ const onAdd = () => {
550
550
  v-model:minimized="minimized" v-model:maximized="maximized">
551
551
 
552
552
  <q-toolbar v-if="addComponent">
553
- <q-btn icon="sym_o_add" :label="$t('Add')" :color="$light.color" @click="onAdd" v-if="addComponent" outline />
553
+ <q-btn icon="sym_o_add" :label="$t('Add')" :color="$light.color" @click="onAdd" v-if="addComponent"
554
+ outline />
554
555
  </q-toolbar>
555
556
 
556
557
 
@@ -619,7 +620,8 @@ const onAdd = () => {
619
620
  <l-link :to="col.to(props.row)">{{ col.value }}</l-link>
620
621
  </template>
621
622
  <template v-else-if="col.component">
622
- <component :is="col.component" v-model="props.row"/>
623
+ <component :is="col.component" v-model="props.row"
624
+ v-bind="col.componentProps ? col.componentProps(props.row) : null" />
623
625
  </template>
624
626
  <template v-else>
625
627
  {{ col.value }}
@@ -1,3 +1,4 @@
1
+ import type { Component } from "vue";
1
2
  export interface LightModelGqlField {
2
3
  [key: string]: string | LightModelGqlField | boolean;
3
4
  }
@@ -11,6 +12,8 @@ export interface LightModelField {
11
12
  gqlField?: LightModelGqlField;
12
13
  to?: (row: any) => string;
13
14
  field?: (row: any) => string;
15
+ component?: Component;
16
+ componentProps?: any;
14
17
  }
15
18
  export interface LightModelFields {
16
19
  [key: string]: LightModelField;
@@ -14,7 +14,7 @@ const columns = model("User").columns({
14
14
  join_date: true,
15
15
  status: true,
16
16
  has2FA: true,
17
- //test: true,
17
+ //_test: true,
18
18
  })
19
19
 
20
20
 
@@ -49,5 +49,12 @@ declare const _default: {
49
49
  searchType: string;
50
50
  format: (value: any) => "Yes" | "No";
51
51
  };
52
+ _test: {
53
+ label: string;
54
+ component: any;
55
+ componentProps: (a: any) => {
56
+ test: any;
57
+ };
58
+ };
52
59
  };
53
60
  export default _default;
@@ -1,3 +1,4 @@
1
+ import MyTest from "../components/MyTest.vue";
1
2
  export default {
2
3
  username: {
3
4
  label: "Username",
@@ -62,5 +63,14 @@ export default {
62
63
  format: (value) => {
63
64
  return value ? "Yes" : "No";
64
65
  }
66
+ },
67
+ _test: {
68
+ label: "Test",
69
+ component: MyTest,
70
+ componentProps: (a) => {
71
+ return {
72
+ test: a.username
73
+ };
74
+ }
65
75
  }
66
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.26.0",
3
+ "version": "1.26.2",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",