• ElementUi——el-select下拉框


    <el-select v-model="ruleForm.status" placeholder="请选择状态" @change="styleChange">
       <el-option v-for="item in optionA4" :key="item.value" :label="item.label" :value="item.value"/>
    </el-select>

    JS: 

         optionA4: [
            {
              value: '0',
              label: '全部状态'
            },
            {
              value: '1',
              label: '正常运行'
            },
            {
              value: '2',
              label: '离线或故障'
            },
            {
              value: '3',
              label: '超标报警'
            }
          ],

    改变方法:

    styleChange(val) {
        if(val == 0){
        this.isShow1 = true,
        this.isShow2 = false
        }else{
        this.isShow1 = false
        this.isShow2 = true
        }
        var data= {} 
        this.outfallType = val
          data.outfallType = this.outfallType
        getRealDataV2(data).then(val => {
            if (val.code === 200) {
            this.newData(val)
            }
        })
    },        
  • 相关阅读:
    MATLAB01
    Diffie-Hellman 密钥交换
    古典密码
    正则表达式
    装饰器初析
    进制转换的栈实现
    Log4j(异常日志)
    2018/6/6
    2018.1.1T19B3-u4
    2018.1.1T19-B3-U3jiangyi
  • 原文地址:https://www.cnblogs.com/acmyun/p/12053039.html
Copyright © 2020-2023  润新知