Skip to content

Commit

Permalink
Switch to a working on-click-outside directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
itsgoingd committed Jan 12, 2025
1 parent ee610c8 commit 1cab947
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 72 deletions.
181 changes: 113 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
},
"dependencies": {
"@sqltools/formatter": "^1.2.2",
"@vueuse/components": "^12.4.0",
"@vueuse/core": "^12.4.0",
"ansi-to-html": "^0.7.2",
"date-fns": "^4.1.0",
"feather-icons": "^4.28.0",
Expand All @@ -37,7 +39,6 @@
"register-service-worker": "^1.7.1",
"sass": "^1.55.0",
"urijs": "^1.19.2",
"v-click-outside": "^3.1.2",
"vue": "^3.2.0",
"vue-clipboard2": "^0.3.1"
},
Expand Down
5 changes: 3 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Icon from './components/UI/Icon'
import Spinner from './components/UI/Spinner'

import VueClipboard from 'vue-clipboard2'
import vClickOutside from 'v-click-outside'
import { vOnClickOutside } from '@vueuse/components'

import lodashGet from 'lodash/get'

Expand All @@ -32,7 +32,8 @@ export default function createApp(global) {
VueClipboard.config.autoSetContainer = true

app.use(VueClipboard)
app.use(vClickOutside)

app.directive('on-click-outside', vOnClickOutside)

app.mixin({ methods: { $get: lodashGet } })

Expand Down
2 changes: 1 addition & 1 deletion src/components/UI/Popover.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="popover" :class="classList" v-if="shown" v-click-outside="close">
<div class="popover" :class="classList" v-if="shown" v-on-click-outside="close">
<div class="popover-content">
<slot></slot>
</div>
Expand Down

0 comments on commit 1cab947

Please sign in to comment.