Jelajahi Sumber

fix: no loading when modifying products

Casper Dai 3 tahun lalu
induk
melakukan
2e83df99a0
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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: '请先删除产品下的设备'