element-ui bug

form:

      Drop-down menu:

     Because the project is a previous project, we need to modify the content today. We need to bring the existing information of the interface into the selection box and input box. There is no problem with the input box, but there is a problem with the selection box. The content of the previous v-model is data. mz, there is a problem that cannot be modified and no error message is reported. After searching for a long time, v-model cannot use the above mode and can only be changed to a separate mz.

 Logically speaking, mz in the object is also a string. Why doesn’t it work? It’s strange.

I originally wanted to give official feedback, but it was too laborious to open github, and there was no communication group or anything like that. Forget it, I recorded this bug.

 

<template>
  <div>
      <div>
        <span>用户名:</span><input type="text"  placeholder="请输入用户名" name="" id="">
      </div>
      <div>
          <span>密码:</span><input type="text"  placeholder="请输入密码" name="" id="">
      </div>
      <div>
        <el-select v-model="mz" :disabled="mzdisabled" filterable placeholder="">
            <el-option v-for="item in minzulist" :key="item.code" :label="item.value" :value="item.value">
                <span style="float: left">{
   
   { item.value }}</span>
            </el-option>
         </el-select>
      </div>

  </div>
</template>

<script>
import vMinzu from "@/components/data/minzu";
export default {
  data() {
    return {
      data:{
        mz:'',
      },
      mz:'',
      mzdisabled:false,
      minzulist:[]
    }
  },
  components: {
    vMinzu,
  },
  mounted() {
    this.mz='涵'
    this.minzulist = this.jckaff();
    
  },
  methods: {
    jckaff(){
      return vMinzu.data;
    }
  },
}
</script>

<style lang="scss" scoped>
 input{
    border:none;
    outline:none;
    margin-left:10px;
    font-size:12px;
    margin: 0;
    padding:0;
}
</style>
{
  "data": [
        {"code":"01","value":"汉族"},
	{"code":"02","value":"蒙古族"},
	{"code":"03","value":"回族"},
	{"code":"04","value":"藏族"},
	{"code":"05","value":"维吾尔族"},
	{"code":"06","value":"苗族"},
	{"code":"07","value":"彝族"},
	{"code":"08","value":"壮族"},
	{"code":"09","value":"布依族"},
	{"code":"10","value":"朝鲜族"},
	{"code":"11","value":"满族"},
	{"code":"12","value":"侗族"},
	{"code":"13","value":"瑶族"},
	{"code":"14","value":"白族"},
	{"code":"15","value":"土家族"},
	{"code":"16","value":"哈尼族"},
	{"code":"17","value":"哈萨克族"},
	{"code":"18","value":"傣族"},
	{"code":"19","value":"黎族"},
	{"code":"20","value":"僳僳族"},
	{"code":"21","value":"佤族"},
	{"code":"22","value":"畲族"},
	{"code":"23","value":"高山族"},
	{"code":"24","value":"拉祜族"},
	{"code":"25","value":"水族"},
	{"code":"26","value":"东乡族"},
	{"code":"27","value":"纳西族"},
	{"code":"28","value":"景颇族"},
	{"code":"29","value":"柯尔克孜族"},
	{"code":"30","value":"土族"},
	{"code":"31","value":"达斡尔族"},
	{"code":"32","value":"仫佬族"},
	{"code":"33","value":"羌族"},
	{"code":"34","value":"布朗族"},
	{"code":"35","value":"撒拉族"},
	{"code":"36","value":"毛难族"},
	{"code":"37","value":"仡佬族"},
	{"code":"38","value":"锡伯族"},
	{"code":"39","value":"阿昌族"},
	{"code":"40","value":"普米族"},
	{"code":"41","value":"塔吉克族"},
	{"code":"42","value":"怒族"},
	{"code":"43","value":"乌孜别克族"},
	{"code":"44","value":"俄罗斯族"},
	{"code":"45","value":"鄂温克族"},
	{"code":"46","value":"崩龙族"},
	{"code":"47","value":"保安族"},
	{"code":"48","value":"裕固族"},
	{"code":"49","value":"京族"},
	{"code":"50","value":"塔塔尔族"},
	{"code":"51","value":"独龙族"},
	{"code":"52","value":"鄂伦春族"},
	{"code":"53","value":"赫哲族"},
	{"code":"54","value":"门巴族"},
	{"code":"55","value":"珞巴族"},
	{"code":"56","value":"基诺族"},
	{"code":"97","value":"其他"}
]
}

table:

   When using table to display data, there is an error in displaying table data. An example is as shown below.

     normal:

 Something went wrong:

Solution:

     List plus key

 

Guess you like

Origin blog.csdn.net/weixin_53105591/article/details/128940540
Recommended