@iservice365/layer-common 0.0.5 → 0.0.6
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/CHANGELOG.md +6 -0
- package/components/SwitchContext.vue +11 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:close-on-content-click="false"
|
|
7
7
|
>
|
|
8
8
|
<template #activator="{ props }">
|
|
9
|
-
<v-list>
|
|
9
|
+
<v-list class="pa-0">
|
|
10
10
|
<v-list-item
|
|
11
11
|
v-bind="props"
|
|
12
12
|
:key="props.title"
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
:to="props.route"
|
|
16
16
|
class="text-subtitle-2 font-weight-bold"
|
|
17
17
|
>
|
|
18
|
-
|
|
18
|
+
<v-list-item-title class="text-truncate">
|
|
19
|
+
{{ selected || `Select ${props.title}` }}
|
|
20
|
+
</v-list-item-title>
|
|
19
21
|
</v-list-item>
|
|
20
22
|
</v-list>
|
|
21
23
|
</template>
|
|
@@ -36,10 +38,10 @@
|
|
|
36
38
|
class="text-caption font-weight-bold"
|
|
37
39
|
v-for="item in prop.items"
|
|
38
40
|
:key="item.value"
|
|
39
|
-
@click="
|
|
41
|
+
@click="selected = item.value"
|
|
40
42
|
>
|
|
41
43
|
<v-icon size="16" class="mr-2">
|
|
42
|
-
{{
|
|
44
|
+
{{ selected === item.value ? "mdi-check" : "" }}
|
|
43
45
|
</v-icon>
|
|
44
46
|
|
|
45
47
|
{{ item.text }}
|
|
@@ -63,11 +65,6 @@ const prop = defineProps({
|
|
|
63
65
|
required: false,
|
|
64
66
|
default: () => [],
|
|
65
67
|
},
|
|
66
|
-
selected: {
|
|
67
|
-
type: String,
|
|
68
|
-
required: false,
|
|
69
|
-
default: "",
|
|
70
|
-
},
|
|
71
68
|
icon: {
|
|
72
69
|
type: String,
|
|
73
70
|
required: false,
|
|
@@ -82,5 +79,9 @@ const prop = defineProps({
|
|
|
82
79
|
|
|
83
80
|
const emit = defineEmits(["click:switch"]);
|
|
84
81
|
|
|
85
|
-
const menu = defineModel<boolean>({ required: false, default: false });
|
|
82
|
+
const menu = defineModel<boolean>("menu", { required: false, default: false });
|
|
83
|
+
const selected = defineModel<string>("selected", {
|
|
84
|
+
required: false,
|
|
85
|
+
default: "",
|
|
86
|
+
});
|
|
86
87
|
</script>
|