fix: Click outside the drop-down box to not hide

This commit is contained in:
WangHe
2025-08-06 19:14:19 +08:00
parent 2241cfc9da
commit 2235612070
3 changed files with 274 additions and 57 deletions

View File

@@ -12,6 +12,8 @@ import { checkToken, clearToken, isLogin } from './utils/auth'
import { loginWithGoogle } from './utils/google'
import { initTheme } from './utils/theme'
import { clearVditorStorage } from './utils/clearVditorStorage'
import ClickOutside from './directives/clickOutside' // 确保路径正确
// 采用本地开发环境
// export const API_DOMAIN = 'http://127.0.0.1'
@@ -38,16 +40,18 @@ clearVditorStorage()
const app = createApp(App)
app.use(router)
app.use(
Toast,
{
Toast,
{
position: POSITION.TOP_RIGHT,
containerClassName: "open-isle-toast-style-v1",
transition: "Vue-Toastification__fade",
// closeButton: false,
timeout: 2000,
},
},
)
app.directive('click-outside', ClickOutside)
app.mount('#app')
checkToken().then(valid => {