vue.js - 组件未在 quasar 项目中渲染,没有错误

标签 vue.js vuejs3 quasar-framework

我创建了 Vue 3,类星体项目。一切工作正常,直到我添加新组件的那一刻。除了我构建并将其添加到项目中的新组件之外,所有内容都在渲染。如果可以的话请帮我解决这个问题。

这是我的代码: 索引页:


<template>
  <q-page class="flex flex-center">
    <!-- section one-->
    <SectionOne />

  </q-page>
</template>

<script>
import { defineComponent } from "vue";
import SectionOne from "components/MainPage/SectionOne.vue";

export default defineComponent({
  components: {
    SectionOne,
  },
  name: "IndexPage",
});
</script>

组件:

<template>
  <div class="q-pa-md q-gutter-md">
    <div class="row justify-between">
      <q-parallax src="https://cdn.quasar.dev/img/parallax2.jpg">
        <h1 class="text-white">Basic</h1>
      </q-parallax>
    </div>
  </div>
</template>

最佳答案

不确定您的项目结构,但试试这个(缺少“./”)

import SectionOne from "./components/MainPage/SectionOne.vue";

关于vue.js - 组件未在 quasar 项目中渲染,没有错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72993835/

相关文章:

javascript - 如何在组件之间传递 v-model 值

quasar-framework - 如何更改 Quasar 中主工具栏的颜色?

javascript - vue中页面刷新后如何显示加载的数据?

vue.js - Vue 3 中的模板渲染与渲染函数 h()

javascript - 如何在 Vue 3 中获取储值?

vuejs3 - react 对象未在模板 Vue3 Composition API 上更新

JavaScript/VueJS : Check if an Array contains an object with an element that has specific value

vue.js - 我如何在 vuejs 中检查 radio 值?

vue.js - Vue Apollo : How can I query GraphQL using an object as Input argument?

node.js - quasar+feathers 应用程序中 Google OAuth 的 browserInApp 问题