AntDesignView drop-down box linkage changes

Effect:

 Select the first drop-down box, and the last two contents are fixed. Changes are not allowed.

        <a-form-item label="映射字段">
          <a-select @change="handleChange" v-model:value="selectMapping">
            <a-select-option v-for="(item, index) in mappingList" :key="index" :value="index" :infos="item">{
   
   {
              item.name
            }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="映射字段编码">
          <a-input v-model:value="formState.mapFieldCode" readOnly>{
   
   { mapFieldCode }}</a-input>
        </a-form-item>
        <a-form-item label="映射字段名称">
          <a-input v-model:value="formState.mapFieldName" readOnly>{
   
   { mapFieldName }}</a-input>
        </a-form-item>
   function handleChange (val, option){
      formState.value.mapFieldName = option.infos.name
      formState.value.mapFieldCode = option.infos.code
      mapFieldCode.value = option.infos.code
      mapFieldName.value = option.infos.name
    }

Write variables and initial values ​​yourself. When initially loading, the interface of the first selection box is called.

Guess you like

Origin blog.csdn.net/qq_46617584/article/details/131192168