需求 删除 el-input-number 内容后,默认显示 0,不会为 空

            <el-col :span="6">
              <el-form-item label="工时费:">
                <el-input-number
                  v-model="saveParams.dblworkinghourscharge"
                  size="medium"
                  class="input-number"
                  :controls="false"
                  :precision="2"
                  :step="0.1"
                  @blur=" (e, name) => {blurNumber(e, 'dblworkinghourscharge'); } "
                >
                </el-input-number>
                <span class="input-append">元</span>
              </el-form-item>
   blurNumber(e, name) {
      if (!e.target.value) {
        this.saveParams[name] = 0;
      }
    }
Logo

前往低代码交流专区

更多推荐