0
我使用Vue Multiselect Custom Option Template ,我想使用的名称属性作为customLabel
通常这将是容易,因为只是用name
但在这种情况下,我需要的属性中的另一个目的。Vue公司多选:对象中访问对象的自定义选项
这里是我引进的对象:
0:Object
created_at:null
id:1
profile:Object
id:1
picture_url:"some-image.jpg"
profile_id:"your-id"
profile_name:"Your Name"
profile_id:1
subscription_active:1
updated_at:null
通常名称将是根所以它易于获取,但我需要访问这是下profile
嵌套这里是到目前为止,我曾尝试:
methods: {
customLabel ({ profile['profile_name'] }) {
return `${ profile['profile_name'] }`
}
布拉沃,工作,BTW有人告诉过你,你看起来就像死亡竞赛的Pachenko? –