Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码优化,接受接受父组件传过来的数据,需要设置默认值 #21

Open
martinwithyou opened this issue Dec 10, 2019 · 0 comments
Labels
improve improve

Comments

@martinwithyou
Copy link
Contributor

export default {
props: {
// 接受父组件传过来的数据
sowing_list: Array,
// 对象或数组且一定会从一个工厂函数返回默认值
default: () => {
return []
}
},

@Geek-James Geek-James added the improve improve label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve improve
Projects
None yet
Development

No branches or pull requests

2 participants