Explorar o código

修改生成优惠码

秦鹏 %!s(int64=3) %!d(string=hai) anos
pai
achega
6058e1b31e
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/views/teacher-devEntering/discountCodeList.vue

+ 4 - 1
src/views/teacher-devEntering/discountCodeList.vue

@@ -17,7 +17,7 @@
                 :placeholder="$t('Key561')"
                 v-model="discountNumber"
                 type="number"
-                oninput="value=value.replace(/[^0-9]/g,'')"
+                :oninput="numberInput"
               ></el-input>
             </el-form-item>
             <el-button
@@ -196,6 +196,9 @@ export default {
     this.getList();
   },
   methods: {
+    numberInput() {
+      this.discountNumber = this.discountNumber.replace(/[^0-9]/g, "");
+    },
     // 切换每页条数
     handleSizeChange(val) {
       this.currentPage = 1;