You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Vuetify 3 异步组件导入失败问题求助

Vue 3 + Vuetify 3异步组件加载DOM识别问题

明知Vuetify 3并非当前最佳选择仍决定使用,原本以为能顺利开发,却先遇到组件缺失问题,现在又碰到异步组件加载的麻烦——用defineAsyncComponent导入懒加载组件后,DOM无法识别该组件,不确定是不是Vuetify的问题。以下是dashboardActionsLayout.vue的代码及控制台错误截图:

原代码

<template>
  <div>
    <div class="d-flex mb-3 mt-2">
      <add-customer-modal />
    </div>
  </div>
</template>

<script setup>
import { defineAsyncComponent } from "vue";

components: {
  addCustomerModal: defineAsyncComponent(() =>
    import("@/components/customer/addCustomerModal.vue")
  );
}
</script>

<style lang="scss" scoped></style>

控制台错误截图

控制台错误截图

问题原因及解决方案

这和Vuetify 3无关,是Vue 3

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 11:10:41