Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
使用 setup 的原因是希望提升开发体验,减少开发时的冗余代码,性能暂时不是第一考虑,后续通过其他手段优化或者JSX方案。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
其他问题出现再补充,仅组件库目前存在的问题,做以下建议:
创建
不使用
<script setup>setup语法糖会将顶层定义的所有变量都暴露出去export CFoo 而不是 Foo
便于
kebab-case使用,见下文“使用kebab-case而不是 Pascal”定义属性类型时使用
PropType使用
kebab-case而不是 Pascal在 HTML 中,
<Button>等价于<button>,在模版中使用组件时,应遵循 HTML 直觉。(这一个理由就够了,别的不详细展开)Beta Was this translation helpful? Give feedback.
All reactions