File tree Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 11
11
:disabled =" disabled" >
12
12
<slot name =" text" >
13
13
{{text}}
14
+
14
15
</slot >
15
16
</b-button >
16
17
78
79
document .documentElement .addEventListener (' click' , this .clickOut );
79
80
}
80
81
},
82
+ destroyed () {
83
+ if (typeof document !== ' undefined' ) {
84
+ document .removeEventListener (' click' , this .clickOut );
85
+ }
86
+ },
81
87
created () {
82
88
this .$root .$on (' shown::dropdown' , el => {
83
89
if (el !== this ) {
Original file line number Diff line number Diff line change 49
49
},
50
50
class: [' class' ]
51
51
},
52
+ created () {
53
+ this .$root .$on (' shown::dropdown' , el => {
54
+ if (el !== this ) {
55
+ this .clickOut ();
56
+ }
57
+ });
58
+ },
59
+ mounted () {
60
+ if (typeof document !== ' undefined' ) {
61
+ document .documentElement .addEventListener (' click' , this .clickOut );
62
+ }
63
+ },
64
+ destroyed () {
65
+ if (typeof document !== ' undefined' ) {
66
+ document .removeEventListener (' click' , this .clickOut );
67
+ }
68
+ },
52
69
methods: {
53
70
setShow (state ) {
54
71
if (this .show === state) {
69
86
this .setShow (false );
70
87
}
71
88
},
72
- created () {
73
- this .$root .$on (' shown::dropdown' , el => {
74
- if (el !== this ) {
75
- this .clickOut ();
76
- }
77
- });
78
- },
79
- mounted () {
80
- if (typeof document !== ' undefined' ) {
81
- document .documentElement .addEventListener (' click' , this .clickOut );
82
- }
83
- }
84
89
};
85
90
</script >
You can’t perform that action at this time.
0 commit comments