Add new components for login and comment functionality

This commit is contained in:
wangqiao
2025-08-17 20:15:33 +08:00
parent 99df1d1f81
commit 07b4d3de99
37 changed files with 4744 additions and 263 deletions

View File

@ -0,0 +1,29 @@
import { createApp, ref } from 'vue'
import GlobalPopup from './index.vue'
const popupInstance = ref()
const openRegister = () => {
if (!popupInstance.value) {
const app = createApp(GlobalPopup, {
visible: true,
onClose: () => {
closeRegister()
},
})
const container = document.createElement('div')
document.body.appendChild(container)
popupInstance.value = app.mount(container)
}
// popupInstance.value.$el.innerHTML = content
}
const closeRegister = () => {
if (popupInstance.value) {
popupInstance.value.$el.parentNode.removeChild(popupInstance.value.$el)
popupInstance.value = null
}
}
export { openRegister, closeRegister }