diff options
| author | taehoon <th.dev91@gmail.com> | 2019-07-17 13:56:27 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-10-24 15:15:33 -0400 |
| commit | c009f17651e153835babd04b1cda1cb4a24ca0a2 (patch) | |
| tree | 5073426fccc2bd71903c92562a3aa0273e915a0b /src/main.js | |
| parent | c9ba37ba2cb5871fbf31881842308f503b9852bb (diff) | |
set different trigger event in desktop and mobile by default
Diffstat (limited to 'src/main.js')
| -rw-r--r-- | src/main.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.js b/src/main.js index 7923ffe8..cfa683e5 100644 --- a/src/main.js +++ b/src/main.js @@ -29,6 +29,7 @@ import VueClickOutside from 'v-click-outside' import PortalVue from 'portal-vue' import VBodyScrollLock from './directives/body_scroll_lock' import VTooltip from 'v-tooltip' +import MobileDetect from 'mobile-detect' import afterStoreSetup from './boot/after_store.js' @@ -41,7 +42,13 @@ Vue.use(VueChatScroll) Vue.use(VueClickOutside) Vue.use(PortalVue) Vue.use(VBodyScrollLock) -Vue.use(VTooltip) +Vue.use(VTooltip, { + popover: { + defaultTrigger: (new MobileDetect(window.navigator.userAgent)).mobile() ? 'click' : 'hover', + defaultContainer: false, + defaultOffset: 5 + } +}) const i18n = new VueI18n({ // By default, use the browser locale, we will update it if neccessary |
