自定义组件methods为何不能支持非函数的事件
- 当前 Bug 的表现(可附上截图)
1.小程序组件里的method只能是函数类型,其他会被过滤掉
例如,
const Class testClass {}const test = new testClass(){ methods: { test, }} |
这样是无效的
也不能够是
{ methods:{ test: {} }} |
为什么要过滤,而页面则则不影响
2.小程序组件里option除了一定指定的key,其他都会被过滤
例如
const option = {
} |
这个name就会过滤掉
-
预期表现
-
复现路径
-
提供一个最简复现 Demo
