【发布时间】:2020-05-27 22:10:56
【问题描述】:
我有一个动态的按钮数组,我想在一个悬停时隐藏其他按钮。我的尝试有一个REPL here。
在我必须从父母那里更新一个子道具之前,一切都很顺利。我收到此错误:
Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'
所以我将选项行放在我的 Btn.svelte 中,但仍然出现错误。我错过了什么吗?或者也许有更简单的方法??
感谢您的帮助!
【问题讨论】: