異步子組件加載時(shí)候會(huì)耗費(fèi)一定的時(shí)間,此組件可顯示loading提示
<Suspense>
<template #default>? ? ?//固定寫(xiě)法
<asyncComponent />? ? //異步子組件
</template>
<template v-slot:fallback>? ? ?//固定寫(xiě)法
<h1>loading... </h1>
</template>
</Suspense>
異步子組件加載時(shí)候會(huì)耗費(fèi)一定的時(shí)間,此組件可顯示loading提示
<Suspense>
<template #default>? ? ?//固定寫(xiě)法
<asyncComponent />? ? //異步子組件
</template>
<template v-slot:fallback>? ? ?//固定寫(xiě)法
<h1>loading... </h1>
</template>
</Suspense>