自定义组件生命周期attached,为什么propery被重置?
在使用自定义组件时传入property
![](https://image.wxopen.club/content_6705ab36-4cd8-11ea-b631-001a7dda7111.png)
![](https://image.wxopen.club/content_6746fecc-4cd8-11ea-9432-001a7dda7111.png)
组件内部给startYear,endYear设置了默认值
![](https://image.wxopen.club/content_677c6ca6-4cd8-11ea-91fa-001a7dda7111.png)
打印生命周期
![](https://image.wxopen.club/content_67b7abee-4cd8-11ea-b1ad-001a7dda7111.png)
![](https://image.wxopen.club/content_67e4cb9c-4cd8-11ea-b71c-001a7dda7111.png)
为什么会在attached时startYear,endYear会被置为0呢?
2 回复
在使用自定义组件时传入property
组件内部给startYear,endYear设置了默认值
打印生命周期
为什么会在attached时startYear,endYear会被置为0呢?