v-select의 item-text 필드에 두 개의 필드를 연결하는 방법이 있습니까?V-select의 item-text에서 두 개의 필드를 연결하여 Vuetify
드롭 다운 목록 값에 대해 작업하고 있지만 표시된 항목에 두 필드가 표시되지 않습니다.
문제는 여기에 있습니다 : 항목 텍스트 = " '$ {data.item.name}, $ {data.item.group}'"
코드 :
`<v-select label="Select" v-bind:items="people" v-model="e11"
item-text="'${data.item.name}, ${data.item.group}'"
item-value="name" max-height="auto" autocomplete >
<template slot="item" slot-scope="data">
<v-list-tile-content>
<v-list-tile-title
v-html="`${data.item.name}, ${data.item.group}`">
</v-list-tile-title>
<v-list-tile-sub-title
v-html="data.item.group">
</v-list-tile-sub-title>
</v-list-tile-content>
</template>
</v-select>`
펜 예 : https://codepen.io/anon/pen/dJveWM?editors=1010
는<v-select>
를 사용하는 경우이 슬롯
item
에 대한뿐만 아니라 슬롯
selection
에 대한뿐만 아니라 템플릿을 정의 할 필요가
당신의 같은 더 명확하게 할 수
이
또한 당신이 달성하려고하는 것과 같은 매우 간단한 해결책이 될 수 있습니다 너의 문제는 무엇인가? – connexo이름 그룹 필드 값을 표시하는 대신 [object Object]가 표시됩니다. – Derek
시간이 내 답변을 확인 했습니까? – connexo