The assignment is not displayed when editing the echo of the select component of iview

clicking the edit button initializes the edited content, but when opened, the value of the select component is not selected by default. Why? The
code is as follows:

<FormItem :label="$t("dictionary_type")" prop="type_id">
    <Select v-model="dictionaryItem.type_id">
        <Option v-for="dicType in dicTypes" :value="dicType.id" :key="dicType.id">{{ dicType.dic_name }}</Option>
    </Select>
</FormItem>

when you click to edit, it will be assigned a value:

open (row) {
    let _this = this;
    _this.dictionaryItemId = row.id;
    _this.dictionaryItem.type_id = row.type_id;
    _this.dictionaryItem.item_name = row.item_name;
    _this.dictionaryItem.item_value = row.item_value;
    _this.dictionaryItem.sort = parseInt(row.sort);
    _this.dictionaryItem.comment = row.comment;
    _this.showModal = true;
}

after opening, it is shown in the following figure

some people say that check to see if dictionaryItem.type_id is congruent value,. How to check this?

Oct.28,2021

1. Check whether row.type_id has a value
2. If the row.type_id has a value that matches the id of one of the dicTypes items.

you can print it in this method and check the above two items.

Menu