@hostlink/nuxt-light 0.0.48 → 0.0.50
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 +1 -1
- package/dist/runtime/components/l-alert.vue +37 -0
- package/dist/runtime/components/l-date-picker.vue +1 -1
- package/dist/runtime/components/l-input.vue +0 -1
- package/dist/runtime/components/l-table.vue +5 -0
- package/dist/runtime/lib/id.mjs +2 -3
- package/dist/runtime/pages/Translate/index.vue +17 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
type: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: 'info' //info, warning, negative, positive
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const icon = computed(() => {
|
|
14
|
+
switch (props.type) {
|
|
15
|
+
case 'info':
|
|
16
|
+
return 'sym_o_info'
|
|
17
|
+
case 'warning':
|
|
18
|
+
return 'sym_o_warning'
|
|
19
|
+
case 'negative':
|
|
20
|
+
return 'sym_o_error'
|
|
21
|
+
case 'positive':
|
|
22
|
+
return 'sym_o_check_circle_outline'
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<q-item :class="`bg-${type}`">
|
|
30
|
+
<q-item-section avatar>
|
|
31
|
+
<q-icon :name="icon" class="text-white" />
|
|
32
|
+
</q-item-section>
|
|
33
|
+
<q-item-section class="text-white">
|
|
34
|
+
<slot></slot>
|
|
35
|
+
</q-item-section>
|
|
36
|
+
</q-item>
|
|
37
|
+
</template>
|
|
@@ -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
|
|
package/dist/runtime/lib/id.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { useRoute } from "vue-router";
|
|
2
2
|
const route = useRoute();
|
|
3
3
|
export default () => {
|
|
4
|
-
let
|
|
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(
|
|
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>
|