Determine whether the value bound to el-input and el-input-number is empty

Determine whether el-input is empty

<el-input placeholder="措施:" v-model="radarECCM" class="bt1-text1-input"></el-input>
if (this.radarECCM == "") {
   this.$alert(不能为空");
}

Determine whether el-input-number is empty:

<el-input-number placeholder="频段:" v-model="radarRFBand" class="bt1-text1-input-number" :precision="2"></el-input-number>
if (typeof this.radarRFBand == "undefined") {
    this.$alert("不能为空");
}

Guess you like

Origin blog.csdn.net/ChaoChao66666/article/details/131204962