浏览代码

Поправлен баг

Book Pauk 2 年之前
父节点
当前提交
5372507acd
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      client/components/share/NumInput.vue

+ 4 - 2
client/components/share/NumInput.vue

@@ -74,7 +74,8 @@ const componentOptions = {
             this.checkErrorAndEmit(true);
         },
         modelValue(newValue) {
-            this.filteredValue = newValue;
+            if (this.ready)//исправление бага TypeError: Cannot read properties of null (reading 'emitsOptions')
+                this.filteredValue = newValue;
         },
         min() {
             this.checkErrorAndEmit();
@@ -102,7 +103,8 @@ class NumInput {
     filteredValue = 0;
     error = false;
 
-    created() {
+    mounted() {
+        this.ready = true;
         this.filteredValue = this.modelValue;
     }