首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >v-select键显示对象对象

v-select键显示对象对象
EN

Stack Overflow用户
提问于 2020-05-13 23:07:42
回答 1查看 55关注 0票数 0

我是个新手,我还不知道如何正确地使用v-select。我将select值从API拉到名为FormatTypes的存储中,如下所示:

代码语言:javascript
复制
[{"id":5,"formatlabel":"RDBMS Table or View"}
,{"id":6,"formatlabel":"Microsoft Access"}
....
,{"id":23,"formatlabel":"ArcGIS for Server image services"}]

我的v-select:

代码语言:javascript
复制
<v-select font-weight-regular subtitle-1
          v-model=dataset.formattypeid
          :name="FormatTypes"
          :items="FormatTypes"
          :item-value="FormatTypes.id"
          :item-text="FormatTypes.formatlabel"
          :label="FormatTypeLbl"
          :outlined=true
           >

我已经使用了item-text/item-value属性,但是我仍然在显示中得到"object Object“。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-05-13 23:33:24

您不必使用绑定,也无需将其链接回item-valueitem-text中的项

代码语言:javascript
复制
<v-select font-weight-regular subtitle-1
   v-model=dataset.formattypeid
   :name="FormatTypes"
   :items="FormatTypes"
   item-value="id" // No need of binding and no need of FormatTypes linking
   item-text="formatlabel" // No need of binding and no need of FormatTypes linking
   :label="FormatTypeLbl"
   :outlined=true
   >
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61778132

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档