有没有办法使用 av-select来显示数组的值?我需要列出str这个数组的值:
myArr: [
{ key: 'one', str: '1st' },
{ key: 'two', str: '2nd' },
{ key: 'three', str: '3rd' },
{ key: 'four', str: '4th' }
]
在中,v-select但不知道该怎么做。到目前为止,我已经完成了这个工作:
<v-select v-model="vCase.eligibility" :items="eligPeriods[0].str"></v-select>
它在 中显示“1st” v-select。但我需要显示所有值。
我尝试使用模板:
<template v-slot:myArr="{item}">
<v-select v-model="myVar.selectedVal" :items="item[str]"></v-select>
</template>
但是它甚至不会在页面上呈现。
有什么帮助或建议吗?