-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
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
Use the parent directory name as the component name #7156
Comments
What problem can this feature solve?As far as I know, now with |
@baiwusanyu-c It will resolve the path |
I get it 😄 |
我没有使用unplugin-auto-import。自动引入,不是讨论的关键点。换个开发工具,比如,intellij idea或webstorm,都是自动引入的(可能需要按快捷键,习惯了,没注意),不需要插件。而且,可以看到import的部分,对写代码是有帮助的,如果遇到问题,方便定位。隐藏一些开发的细节,没有意义。 |
So this should be moved to the devtools repo? |
跟开发工具没有关系吧。我提的问题是“组件如何命名”。 |
<script>
export default {
name: 'CustomName'
}
</script> You can define the name manually as a temp solution. |
Use the solution given by @sxzz. You can also refer to the naming of components inside the style guide |
Do you want to move the question to "vue devtools repo"? |
多谢。你的方法是有效的。
|
使用官网的例子,做个比对。我觉得第"2"种风格更适合组织代码。我也知道,typescript语言没有类似 |
@sxzz 多谢,查看了你的github,找到了解决方案 unplugin-vue-macros |
@sxzz 我看 elk 也是一堆 index.vue,你们平时不用 vue-devtools 吗?我没跑过 elk,不知道它有没有解决这个问题 |
@tjx666 Use |
What problem does this feature solve?
componentName("/order/Index.vue")="Order"
What does the proposed API look like?
/([^/\\]+)\.\w+$/
的代码The text was updated successfully, but these errors were encountered: