Write a select component, which needs to be modified when used in business. I modified it based on inheriting select and renamed it teble-select. Vue prompts [Vue warn]: Error in render function: "TypeError: Cannot read property 'name' of undefined" What is the reason for this? Is it caused by a problem with the writing of my select component? Please let me know, comrades
select component:
{{selected.name}}
- {{item.name}}
组件是可以正常使用的,但是重新包装下 就会提示name undefined ??
Is it possible for options to be empty? If it is possible to be empty, then selected may be undefined
If asynchronous is involved, add v-if="options.length !== 0" to the root element of this component template