如何在 Storybook for Vue 中添加描述文本?
How do you add a description text in Storybook for Vue?
我正在尝试查找有关如何创建一些文本来描述组件的信息,如来自 https://storybook.js.org/docs/vue/writing-docs/doc-blocks
的屏幕截图所示
我查了 Component Story Format 那里没有找到信息,他们只有 title
、component
、decorators
和 parameters
.我在生成的示例中也找不到任何内容。
根据@david weldon 的评论。 how to document components(强调我的)
上有一个小广告
If you're including Storybook in your project for the first time, we provide you with DocsPage, a documentation template that lists all the stories for a component and associated metadata. It infers metadata values based on source code, types and JSDoc comments. If you need, you can customize this page to create your own custom template.
所以我尝试了
<script>
import { defineComponent } from "vue";
/**
* This is a test.
*/
export default defineComponent({
setup(props) {
const handleClick = () => {};
const handleMouseOver = () => {};
return {
handleClick,
handleMouseOver,
};
},
});
</script>
它确实出现了
我正在尝试查找有关如何创建一些文本来描述组件的信息,如来自 https://storybook.js.org/docs/vue/writing-docs/doc-blocks
的屏幕截图所示我查了 Component Story Format 那里没有找到信息,他们只有 title
、component
、decorators
和 parameters
.我在生成的示例中也找不到任何内容。
根据@david weldon 的评论。 how to document components(强调我的)
上有一个小广告If you're including Storybook in your project for the first time, we provide you with DocsPage, a documentation template that lists all the stories for a component and associated metadata. It infers metadata values based on source code, types and JSDoc comments. If you need, you can customize this page to create your own custom template.
所以我尝试了
<script>
import { defineComponent } from "vue";
/**
* This is a test.
*/
export default defineComponent({
setup(props) {
const handleClick = () => {};
const handleMouseOver = () => {};
return {
handleClick,
handleMouseOver,
};
},
});
</script>
它确实出现了