Преглед на файлове

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

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;
     }