vue element-UI select multiple echo success, but can not choose

Reference article after vue development (four) element of the select drop-down box to set the initial value, can not re-selection problem

Reference article element modal dialog box to select the selected non-reactive components

The reason is the drop-down box data cycle other interfaces come as too much data hierarchy, render function does not automatically update, need to manually force a refresh

Solution Add @change = "$ forceUpdate ()" update view

<el-select v-model="form.source" placeholder="请选择" @change="$forceUpdate()" style="width:380px">
                <el-option
                  v-for="item in tradeSource"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                />
              </el-select>
                   

Guess you like

Origin www.cnblogs.com/lick468/p/11274194.html