We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
随着项目的增大,components 目录下的组件也来越多,找组件也变得不好看了。那么我就想着能否把组件归类至对应目录,避免一级目录太多了。
导出
// src/pages/page-test/page-test.vue <template> <view> 商品详情xxxxx </view> </template> <script setup> </script>
// src/pages/page-product-detail/template/index.js import template0 from "./template0.vue"; import template1 from "./template1.vue"; export { template0, template1 }
导入
<template> <template0></template0> </template> <script setup> import { template0 } from "../page-product-detail/template"; console.log("template0", template0); </script>
无法渲染出template0组件
能用这种重新导出和引入,让组件能正常渲染出来
The text was updated successfully, but these errors were encountered:
No branches or pull requests
背景
随着项目的增大,components 目录下的组件也来越多,找组件也变得不好看了。那么我就想着能否把组件归类至对应目录,避免一级目录太多了。
环境
例子
导出
导入
实际结果
无法渲染出template0组件
期望
能用这种重新导出和引入,让组件能正常渲染出来
The text was updated successfully, but these errors were encountered: