vueless 1.1.1-beta.60 → 1.1.1-beta.61
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.61",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -29,6 +29,7 @@ const emit = defineEmits([
|
|
|
29
29
|
]);
|
|
30
30
|
|
|
31
31
|
const wrapperRef = useTemplateRef<HTMLDivElement>("wrapper");
|
|
32
|
+
const contentRef = useTemplateRef<HTMLDivElement>("content");
|
|
32
33
|
|
|
33
34
|
const isOpened = ref(false);
|
|
34
35
|
|
|
@@ -43,7 +44,11 @@ const toggleIconName = computed(() => {
|
|
|
43
44
|
return props.toggleIcon ? config.value.defaults.toggleIcon : "";
|
|
44
45
|
});
|
|
45
46
|
|
|
46
|
-
function onClickItem() {
|
|
47
|
+
function onClickItem(event: MouseEvent) {
|
|
48
|
+
if (contentRef.value && contentRef.value.contains(event.target as Node)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
isOpened.value = !isOpened.value;
|
|
48
53
|
|
|
49
54
|
emit("click", elementId, isOpened.value);
|
|
@@ -103,7 +108,7 @@ const {
|
|
|
103
108
|
v-text="description"
|
|
104
109
|
/>
|
|
105
110
|
|
|
106
|
-
<div v-if="isOpened && hasSlotContent(slots['default'])" v-bind="contentAttrs">
|
|
111
|
+
<div v-if="isOpened && hasSlotContent(slots['default'])" ref="content" v-bind="contentAttrs">
|
|
107
112
|
<!-- @slot Use it to add accordion content. -->
|
|
108
113
|
<slot />
|
|
109
114
|
</div>
|