Browse Source

fix: no loading when modifying products

Casper Dai 3 năm trước cách đây
mục cha
commit
2e83df99a0
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/views/device/product/index.vue

+ 2 - 1
src/views/device/product/index.vue

@@ -237,13 +237,14 @@ export default {
     },
     updateProduct (currObj) {
       if (this.$wide !== currObj.wide || this.$high !== currObj.high) {
-        const loading = this.$showLoading
+        const loading = this.$showLoading()
         return getDevices({
           productId: currObj.id,
           pageSize: 1,
           pageNum: 1
         }).then(({ data }) => {
           if (data.length) {
+            this.$closeLoading(loading)
             this.$message({
               type: 'warning',
               message: '请先删除产品下的设备'