@hostlink/nuxt-light 0.0.49 → 0.0.51

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,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "0.0.49"
4
+ "version": "0.0.51"
5
5
  }
@@ -17,8 +17,8 @@ const props = defineProps({
17
17
  },
18
18
  label: {
19
19
  type: String,
20
+ default: ""
20
21
  },
21
-
22
22
  required: {
23
23
  type: Boolean,
24
24
  default: false
@@ -116,7 +116,6 @@ const attrs = {
116
116
  }
117
117
  </script>
118
118
  <template>
119
- {{ slotNames }}
120
119
  <q-input v-bind="attrs" :label="localLabel" v-model="localValue" :rules="new_rules" hide-bottom-space :type="localType">
121
120
  <template v-if="translate" #prepend>
122
121
  <q-btn icon="sym_o_translate" flat dense rounded>
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { useQuasar, QTable } from 'quasar';
3
+ //import { useI18n } from 'vue-i18n';
3
4
  import { useRoute } from 'vue-router';
4
5
  import { ref, computed, onMounted, useSlots, reactive, useAttrs } from "vue";
5
6
  import { t, deleteObject, q, f, useLight } from '../';
@@ -48,6 +49,10 @@ const props = defineProps({
48
49
  }, pagination: {
49
50
  type: Boolean,
50
51
  default: true
52
+ },
53
+ selection: {
54
+ type: String,
55
+ default: "none"
51
56
  }
52
57
  })
53
58
 
@@ -377,7 +382,10 @@ const attrs = {
377
382
  <q-table v-bind="$attrs" :flat="attrs.flat" :dense="attrs.dense" :bordered="attrs.bordered" :row-key="rowKey"
378
383
  :loading="loading" :hide-bottom="hideBottom" v-model:pagination="pagination" ref="table" @request="onRequest"
379
384
  :rows="rows" :rows-per-page-label="t(props.rowsPerPageLabel)" :columns="renderColumns"
380
- :rows-per-page-options="rowsPerPageOptions">
385
+ :rows-per-page-options="rowsPerPageOptions"
386
+ :selection="selection"
387
+
388
+ >
381
389
 
382
390
  <template v-for="s in ss" v-slot:[s]="props">
383
391
  <slot :name="s" v-bind="props"></slot>
@@ -1,13 +1,12 @@
1
1
  import { useRoute } from "vue-router";
2
2
  const route = useRoute();
3
3
  export default () => {
4
- let route2 = useRoute();
5
- let name = route2.name?.toString();
4
+ let name = route.name?.toString();
6
5
  if (name == void 0)
7
6
  return 0;
8
7
  let parts = name.split("-");
9
8
  const module = parts[0];
10
9
  const moduleLower = module.charAt(0).toLowerCase() + module.slice(1);
11
10
  const keyname = parts[1];
12
- return parseInt(route2.params[keyname]);
11
+ return parseInt(route.params[keyname]);
13
12
  };
@@ -8,6 +8,22 @@ const splitterModel = ref(38)
8
8
  const obj = reactive({
9
9
  name: ""
10
10
  })
11
+
12
+ const onSave = async () => {
13
+ await m("addTranslate", {
14
+ data: {
15
+ name: obj.name,
16
+
17
+ values: app.languages.map(language => {
18
+ return {
19
+ language: language.value,
20
+ value: obj[language.value]
21
+ }
22
+ })
23
+
24
+ }
25
+ })
26
+ }
11
27
  </script>
12
28
  <template>
13
29
  <l-page>
@@ -19,7 +35,7 @@ const obj = reactive({
19
35
  </q-card-section>
20
36
  </template>
21
37
  <template #after>
22
- <l-form :bordered="false">
38
+ <l-form :bordered="false" @save="onSave">
23
39
  <l-input label="Name" required v-model="obj.name"></l-input>
24
40
  <l-input v-for="language in app.languages" :label="language.name"
25
41
  v-model="obj[language.value]"></l-input>
@@ -52,7 +52,9 @@ const status = ref("0");
52
52
 
53
53
  <l-tabs v-model="status">
54
54
  <l-tab label="Active" name="0">
55
- <l-table @request="onRequest" :columns="columns" :actions="['view', 'edit', 'delete']">
55
+ <l-table
56
+
57
+ @request="onRequest" :columns="columns" :actions="['view', 'edit', 'delete']">
56
58
  </l-table>
57
59
  </l-tab>
58
60
  <l-tab label="Inactive" name="1">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",