refactor login dialog for front page

This commit is contained in:
RockYang
2024-05-18 00:27:32 +08:00
parent dad9254128
commit 45d6579fb6
16 changed files with 277 additions and 279 deletions

View File

@@ -600,8 +600,6 @@
</div>
<el-image-viewer @close="() => { previewURL = '' }" v-if="previewURL !== ''" :url-list="[previewURL]"/>
<login-dialog :show="showLoginDialog" @hide="showLoginDialog = false" @success="initData"/>
</div>
</template>
@@ -616,14 +614,14 @@ import {checkSession} from "@/action/session";
import {useRouter} from "vue-router";
import {getSessionId} from "@/store/session";
import {copyObj, removeArrayItem} from "@/utils/libs";
import LoginDialog from "@/components/LoginDialog.vue";
import {useSharedStore} from "@/store/sharedata";
const listBoxHeight = ref(0)
const paramBoxHeight = ref(0)
const showLoginDialog = ref(false)
const loading = ref(true)
const colWidth = ref(240)
const colWidth = ref(220)
const previewURL = ref("")
const store = useSharedStore();
const resizeElement = function () {
listBoxHeight.value = window.innerHeight - 80
@@ -903,7 +901,7 @@ const beforeUpload = (key) => {
// 图片上传
const uploadImg = (file) => {
if (!isLogin.value) {
showLoginDialog.value = true
store.setShowLoginDialog(true)
return
}
@@ -936,7 +934,7 @@ const uploadImg = (file) => {
const promptRef = ref(null)
const generate = () => {
if (!isLogin.value) {
showLoginDialog.value = true
store.setShowLoginDialog(true)
return
}