Explorar el Código

toast提示一律改用element-ui的

任一存 hace 4 años
padre
commit
0fb5920cb2

+ 3 - 3
src/components/preview/index.vue

@@ -52,10 +52,10 @@ export default {
 
 
       try {
       try {
         document.execCommand("copy")
         document.execCommand("copy")
-          ? this.$tips({ content: "复制成功", icon: "ok" })
-          : this.$tips({ content: "复制失败", icon: "ok" });
+          ? this.$msg.success("复制成功")
+          : this.$msg.error("复制失败")
       } catch (err) {
       } catch (err) {
-        this.$tips({ content: "复制失败", icon: "ok" });
+        this.$msg.error("复制失败")
       }
       }
 
 
       document.body.removeChild(textArea);
       document.body.removeChild(textArea);

+ 2 - 2
src/framework/Head.vue

@@ -87,7 +87,7 @@ export default {
           someData: { ...this.info, status: 1 },
           someData: { ...this.info, status: 1 },
         },
         },
         () => {
         () => {
-          this.$tips({ content: "保存成功", icon: "ok" });
+          this.$msg.success("保存成功");
           this.getInfo();
           this.getInfo();
           this.$store.commit("UpdateIsShowState", true);
           this.$store.commit("UpdateIsShowState", true);
           setTimeout(() => {
           setTimeout(() => {
@@ -176,7 +176,7 @@ export default {
           someData: { ...this.info, status: 1 },
           someData: { ...this.info, status: 1 },
         },
         },
         () => {
         () => {
-          this.$tips({ content: "保存成功", icon: "ok" });
+          this.$msg.success("保存成功")
           this.getInfo();
           this.getInfo();
           this.$store.commit("UpdateIsShowState", true);
           this.$store.commit("UpdateIsShowState", true);
         },
         },

+ 1 - 1
src/framework/core/index.vue

@@ -69,7 +69,7 @@ export default {
             this.$bus.emit('toggleFlash',false)
             this.$bus.emit('toggleFlash',false)
             this.$bus.emit("initView", res.data);
             this.$bus.emit("initView", res.data);
             this.updateInfo()
             this.updateInfo()
-            this.$tips({ content: "设置成功",icon:'ok' });
+            this.$msg.success("设置成功")
             this.$store.commit("SetInfo", this.info);
             this.$store.commit("SetInfo", this.info);
           }
           }
         });
         });

+ 2 - 2
src/views/hotspot/Setting.vue

@@ -169,7 +169,7 @@ export default {
       }
       }
 
 
       this.activeItem.someData = JSON.stringify(this.someData);
       this.activeItem.someData = JSON.stringify(this.someData);
-      this.$tips({ content: this.editTitle + "成功", icon: "ok" });
+      this.$msg.success(this.editTitle + "成功")
 
 
       let iidx = this.info.scenes.findIndex(item=>this.activeItem.sceneCode == item.sceneCode)
       let iidx = this.info.scenes.findIndex(item=>this.activeItem.sceneCode == item.sceneCode)
       if (iidx>-1) {
       if (iidx>-1) {
@@ -189,7 +189,7 @@ export default {
       this.deleteKRHotspot(data);
       this.deleteKRHotspot(data);
       this.activeItem.someData = JSON.stringify(this.someData);
       this.activeItem.someData = JSON.stringify(this.someData);
       this.updateInfo()
       this.updateInfo()
-      this.$tips({ content: "删除成功", icon: "ok" });
+      this.$msg.success("删除成功")
     },
     },
     open(data) {
     open(data) {
       this.editTitle = "新增";
       this.editTitle = "新增";

+ 1 - 1
src/views/information/Setting.vue

@@ -53,7 +53,7 @@ export default {
           ok: () => {
           ok: () => {
               this.info.firstScene = ''
               this.info.firstScene = ''
               this.$store.commit("SetInfo", this.info);
               this.$store.commit("SetInfo", this.info);
-              this.$tips({content:'删除成功',icon:'ok'})
+              this.$msg.success('删除成功')
           }
           }
       });
       });
       
       

+ 2 - 2
src/views/information/Toolbar.vue

@@ -318,7 +318,7 @@ export default {
         }(场景/全景图)也都将会被删除,是否删除?`,
         }(场景/全景图)也都将会被删除,是否删除?`,
         ok: () => {
         ok: () => {
           this.delTree(data, type);
           this.delTree(data, type);
-          this.$tips({ content: "删除成功", icon: "ok" });
+          this.$msg.success("删除成功")
         },
         },
       });
       });
     },
     },
@@ -331,7 +331,7 @@ export default {
           this.delFirstScene()
           this.delFirstScene()
           this.$store.commit("SetInfo", this.info);
           this.$store.commit("SetInfo", this.info);
           this.$bus.emit('scenesChange')
           this.$bus.emit('scenesChange')
-          this.$tips({ content: "删除成功", icon: "ok" });
+          this.$msg.success("删除成功")
         },
         },
       });
       });
     },
     },

+ 2 - 2
src/views/information/index.vue

@@ -243,7 +243,7 @@ export default {
       if (!this.reNameItem.sceneTitle.trim()) {
       if (!this.reNameItem.sceneTitle.trim()) {
         return this.$alert({ content: "请输入名字" });
         return this.$alert({ content: "请输入名字" });
       }
       }
-      this.$tips({ content: "重命名成功", icon: "ok" });
+      this.$msg.success("重命名成功")
       this.$store.commit("SetInfo", this.info);
       this.$store.commit("SetInfo", this.info);
       this.showRename = false;
       this.showRename = false;
     },
     },
@@ -293,7 +293,7 @@ export default {
 
 
       this.$bus.emit('scenesChange')
       this.$bus.emit('scenesChange')
       this.$store.commit("SetInfo", this.info);
       this.$store.commit("SetInfo", this.info);
-      this.$tips({ content: "操作成功", icon: "ok" });
+      this.$msg.success("操作成功")
       this.showAddGroup = false;
       this.showAddGroup = false;
 
 
       if (this.currentTabAtri.oper != "edit") {
       if (this.currentTabAtri.oper != "edit") {

+ 3 - 3
src/views/material/popup/share.vue

@@ -86,10 +86,10 @@ export default {
 
 
       try {
       try {
         document.execCommand("copy")
         document.execCommand("copy")
-          ? this.$tips({ content: "复制成功", icon: "ok" })
-          : this.$tips({ content: "复制失败", icon: "ok" });
+          ? this.$msg.success("复制成功")
+          : this.$msg.error("复制失败");
       } catch (err) {
       } catch (err) {
-        this.$tips({ content: "复制失败", icon: "ok" });
+        this.$msg.error("复制失败")
       }
       }
 
 
       document.body.removeChild(textArea);
       document.body.removeChild(textArea);

+ 2 - 6
src/views/material/works/index.vue

@@ -116,9 +116,7 @@ export default {
     openShare(data){
     openShare(data){
       getPanoInfo(data.id, (data) => {
       getPanoInfo(data.id, (data) => {
         if (data.scenes.length<=0) {
         if (data.scenes.length<=0) {
-          return this.$tips({
-            content: "链接未生成,请编辑作品添加素材"
-          });
+          return this.$msg.message("链接未生成,请编辑作品添加素材");
         }
         }
         this.showShare = true
         this.showShare = true
         this.shareItem = data
         this.shareItem = data
@@ -128,9 +126,7 @@ export default {
     handlePreview(item){
     handlePreview(item){
       getPanoInfo(item.id, (data) => {
       getPanoInfo(item.id, (data) => {
         if (data.scenes.length<=0) {
         if (data.scenes.length<=0) {
-          return this.$tips({
-            content: "链接未生成,请编辑作品添加素材"
-          });
+          return this.$msg.message("链接未生成,请编辑作品添加素材");
         }
         }
         this.showItem = {
         this.showItem = {
           ...item,
           ...item,