Browse Source

fix(shortpassword): 密码圆点不展示修复

Drjnigfubo 4 years ago
parent
commit
7e815f27ed

+ 2 - 2
src/packages/__VUE/shortpassword/index.taro.vue

@@ -41,7 +41,7 @@
           >
             <view
               class="nut-shortpsd-icon"
-              v-if="realInput.length > index"
+              v-if="String(realInput).length > index"
             ></view>
           </view>
         </view>
@@ -148,7 +148,7 @@ export default create({
         val = val.slice(0, comLen.value);
         realInput.value = val;
       }
-      if (realInput.value.length === comLen.value) {
+      if (String(realInput.value).length === comLen.value) {
         emit('complete', val);
       }
       emit('change', val);

+ 2 - 2
src/packages/__VUE/shortpassword/index.vue

@@ -33,7 +33,7 @@
           >
             <view
               class="nut-shortpsd-icon"
-              v-if="realInput.length > index"
+              v-if="String(realInput).length > index"
             ></view>
           </view>
         </view>
@@ -130,7 +130,7 @@ export default create({
         val = val.slice(0, comLen.value);
         realInput.value = val;
       }
-      if (realInput.value.length === comLen.value) {
+      if (String(realInput.value).length === comLen.value) {
         emit('complete', val);
       }
       emit('change', val);