@policystudio/policy-studio-ui-vue 1.1.90-beta.89 → 1.1.90-beta.90
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,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="psui-el-dropdown-menu"
|
|
4
|
-
v-click-outside="close"
|
|
5
4
|
>
|
|
6
5
|
<div
|
|
7
6
|
ref="PSDropdownTrigger"
|
|
@@ -37,6 +36,7 @@
|
|
|
37
36
|
:class="contentCss"
|
|
38
37
|
aria-orientation="vertical"
|
|
39
38
|
:style="floatingStyles"
|
|
39
|
+
v-click-outside="close"
|
|
40
40
|
>
|
|
41
41
|
<slot name="items" />
|
|
42
42
|
</div>
|
|
@@ -114,7 +114,9 @@ const open = () => {
|
|
|
114
114
|
emit('open')
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
const close = () => {
|
|
117
|
+
const close = (event) => {
|
|
118
|
+
if(event?.target && PSDropdownTrigger.value.contains(event?.target)) return
|
|
119
|
+
|
|
118
120
|
show.value = false
|
|
119
121
|
emit('close')
|
|
120
122
|
}
|
|
@@ -124,7 +126,7 @@ const toggle = (event) => {
|
|
|
124
126
|
|
|
125
127
|
if (event) event.stopPropagation()
|
|
126
128
|
|
|
127
|
-
show.value
|
|
129
|
+
show.value = !show.value
|
|
128
130
|
|
|
129
131
|
}
|
|
130
132
|
|