瀏覽代碼

remove duplicate judgment (#1432)

Co-authored-by: zhangchao3 <zhangchao3@corp.netease.com>
arika163 3 年之前
父節點
當前提交
16cd2438dd
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/directives/loading.ts

+ 1 - 3
src/directives/loading.ts

@@ -24,9 +24,7 @@ const loadingDirective: Directive = {
     if (!instance) return;
     instance.setTip(el.getAttribute('loading-tip'));
     if (binding.oldValue !== binding.value) {
-      if (binding.oldValue !== binding.value) {
-        instance.setLoading?.(binding.value && !instance.loading);
-      }
+      instance.setLoading?.(binding.value && !instance.loading);
     }
   },
   unmounted(el) {