我用 Angular 创建了一个简单的故事,但故事参数没有出现在组件中。故事:
export const myStory = (args: FileExplorerComponent) => ({
component: FileExplorerComponent,
template: `
<div style="position: relative">
<common-file-explorer></common-file-explorer>
<p>Przykładowe użycie Webdav</p>
</div>
`,
directory: 'bip',
parameters: {
directory: 'bip',
},
props: {
directory: 'bip',
menuItems: [
{ directory: 'bip' }
],
}
零件:
@Input() directory: string;
构造函数:
console.log('directory', this.directory);
它显示未定义。我是否必须设置提供程序或构造函数参数?