我创建了 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/