组件按需加载

This commit is contained in:
A1300399510
2023-07-13 17:34:25 +08:00
parent 348057a649
commit a626223e64
10 changed files with 97 additions and 110 deletions

View File

@@ -51,7 +51,6 @@
<script setup>
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import { ElLoading } from 'element-plus'
const { proxy } = getCurrentInstance()
const router = useRouter()
@@ -84,11 +83,11 @@ onMounted(() => {
})
async function init() {
loading = ElLoading.service({
lock: true,
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)',
})
// loading = ElLoading.service({
// lock: true,
// text: 'Loading',
// background: 'rgba(0, 0, 0, 0.7)',
// })
// if (identityList.value > 0) return
proxy.$post("/tenement/pc/api/publish/checkidentity").then(res => {
@@ -99,7 +98,7 @@ async function init() {
isintermediary.value = data.isintermediary
if (data['ispopup'] == 0) overallJump()
}).finally(() => {
loading.close()
// loading.close()
})
}
@@ -124,7 +123,7 @@ let choiceItem = (key) => {
let overallJump = () => {
choicePopState.value = false
console.log("11",identityKey.value);
console.log("11", identityKey.value);
router.push(`/edit?intermediary=${identityKey.value}`)
}