Vuetify的v-select出于某种原因未显示所有项目

时间:2019-05-04 16:38:00

标签: vuetify.js

这对我来说很奇怪-我的代码很基本:

<v-select
        chips
        multiple
        :items="areas"
         v-model="person.applicant.areas"
        :label="trans('Areas of interest')"
        item-text="name"
        item-value="id"
></v-select>

{{areas}}之前回显的项目将返回如下:

[ 
    { "interestsAreas": "TEst", "id": 0, "name": "TEst" },
    { "interestsAreas": "Test2", "id": 1, "name": "Test2" }, 
    { "interestsAreas": "Something", "id": 0, "name": "Something" },
    { "interestsAreas": "1", "id": 1, "name": "1" },
    { "interestsAreas": "2", "id": 2, "name": "2" },
    { "interestsAreas": "3", "id": 3, "name": "3" }
]

但是,无论我做什么,v-select都会从下拉列表中删除“ Something”和“ 1”,即使我重命名它们或其他。

我无法理解删除其中某些逻辑的原因,是否存在任何已知的错误或我在调用中未正确执行的操作?

1 个答案:

答案 0 :(得分:0)

我想这与item-value有关,因为id需要唯一

        d13C        d2H         Filenames
Sample          
KMa-Sah-1   -23.696     -297.40     [ftir_data/MAND_KMA-SAH1_DIRECT DEPOSIT_3.CSV,...]
KMa-Sah-2   -25.304     -303.86     [ftir_data/MAND_KMA-SAH2_DIRECT DEPOSIT_2.CSV,...]
KMa-Sah-3   -22.236     NaN         [ftir_data/MAND_KMA-SAH3_DIRECT DEPOSIT_1.CSV,...]
KMa-Sah-4   -23.814     -289.03     [ftir_data/MAND_KMA-SAH4_DIRECT DEPOSIT_1.CSV,...]
KMa-Sah-5   -21.340     -275.20     [ftir_data/MAND_KMA-SAH5_DIRECT DEPOSIT_1.CSV,...]
KMa-Sah-6   -19.313     -289.30     [ftir_data/MAND_KMA-SAH6_DIRECT DEPOSIT_1.CSV,...]
KMa-Sah-7   -23.739     -327.30     [ftir_data/MAND_KMA-SAH7_DIRECT DEPOSIT_3.CSV,...]
KMa-Sah-8   -21.770     -277.80     [ftir_data/MAND_KMA-SAH8_DIRECT DEPOSIT_3.CSV,...]
KMa-Sah-9   -23.210     -309.50     [ftir_data/MAND_KMA-SAH9_DIRECT DEPOSIT_1.CSV,...]
KMa-Sah-10  -24.514     -314.07     [ftir_data/MAND_KMA-SAH10_DIRECT DEPOSIT_4.CSV...]