Appearance
vue/no-setup-props-reactivity-loss
禁止将失去
props
反应性的用法传递给setup
¥disallow usages that lose the reactivity of
props
passed tosetup
📖 规则详情
此规则报告传递给 setup
的 props
的解构或成员表达式导致值失去反应性。
¥This rule reports the destructuring or member expression of props
passed to setup
causing the value to lose reactivity.
解构传递给 setup
的 props
将导致值失去反应性。
¥Destructuring the props
passed to setup
will cause the value to lose reactivity.
此外,在 setup()
的根范围内解构应该会出错,但在嵌套回调或返回的渲染函数中可以:
¥Also, destructuring in root scope of setup()
should error, but ok inside nested callbacks or returned render functions:
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在在 eslint-plugin-vue v9.17.0 中
¥This rule was introduced in eslint-plugin-vue v9.17.0
🔍代码实现
¥🔍 Implementation