質問するログイン新規登録

回答編集履歴

2

typoの修正

2020/03/21 00:49

投稿

miso24
miso24

スコア75

answer CHANGED
@@ -21,6 +21,6 @@
21
21
  v-model="todo"
22
22
  item-value="id"
23
23
  item-text="name"
24
- :itemms="todos">
24
+ :items="todos">
25
25
  </v-select>
26
26
  ```

1

リンクと引用の修正

2020/03/21 00:49

投稿

miso24
miso24

スコア75

answer CHANGED
@@ -1,4 +1,7 @@
1
- 公式ドキュメントに
1
+ [公式ドキュメント](https://vuetifyjs.com/en/components/selects/#api)
2
+
3
+ > When using objects for the items prop, you must associate item-text and item-value with existing properties on your objects. These values are defaulted to text and value and can be changed.
4
+
2
5
  > itemsにオブジェクトを用いる場合には`item-text`と`item-value`をオブジェクト内のプロパティに関連付ける必要があります。デフォルトでは`text`と`value`となっており、これらは変更可能です。
3
6
 
4
7
  と書かれています。つまり`item-text`に指定したプロパティ名の値が、表示されるテキストに使われ、`item-value`に指定したプロパティ名の値が、選択した時の値となります。