vue.js - 了解 Storybook 在组件、故事和故事组件之间的联系
问题描述
我显然在有关故事书的文档中遗漏了一些东西,以了解正在发生的事情。如果我有如下文件结构(这恰好是一个 Vue.js 故事,但我不确定这是否重要),那么故事书可以工作:
src
components
MyButton.vue
stories
Button.stories.tsx // this imports the MyButton.vue
Button.vue
它可以工作,即使Button.vue
是一个空文件!但是如果我删除或重命名Button.vue
,那么故事书会抛出一个错误:
Button
ERROR in ./src/stories/Button.vue
Module build failed (from ./node_modules/vue-loader/lib/index.js):
Error: ENOENT: no such file or directory, open '<abbr path>/src/stories/Button.vue'
那么Button.stories.tsx
这里是否需要一个已经建立的文件Button.vue
来将信息写入该故事书使用的信息(基本上是复制组件),如果该文件丢失,那么它会给出这个错误?
解决方案
推荐阅读
- sql - postgresql 中的链表概念
- android - 不可能使用 android 中的约束布局将图像放在顶部
- salesforce - Contact_level__c 不存在
- windows - 如何将标准输出重定向到 CMD 中的程序?
- string - 调用base64.StdEncoding.DecodeString时24个字符串有什么特别之处
- java - 如何纠正这个文本处理程序?
- python - pandas - 添加聚合功能
- javascript - Javascript 未在所有 turbolinks 页面加载时触发
- linux - 在linux中将主机名更改为null
- powershell - 在 PowerShell 中使用 Move-Item 将主机名和日期附加到文件名