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? –