From fe8da266b86f12cf7a796c8c54b812310efdc16c Mon Sep 17 00:00:00 2001 From: zhanmingkan <496160012@qq.com> Date: 星期一, 16 五月 2022 12:59:02 +0800 Subject: [PATCH] 提交代码 加入了 弹出消息的新样式 --- assets/js/config.js | 42 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 41 insertions(+), 1 deletions(-) diff --git a/assets/js/config.js b/assets/js/config.js index db20c9e..349be59 100644 --- a/assets/js/config.js +++ b/assets/js/config.js @@ -10,4 +10,44 @@ var layerPageStyle={ offsetX: 100, offsetY:50 -} \ No newline at end of file +} + + +var vMsg = new Vue({ + methods: { + success(msg) { + this.$message({ message: msg, type: 'success' }); + }, + info(msg) { + this.$message(msg); + }, + warning(msg) { + this.$message({ message: msg, type: 'warning' }); + }, + error(msg) { + this.$message.error(msg); + }, + iconSuccess(title,msg) { + this.$notify({ + title: title, + message: msg, + type: 'success' + }); + }, + iconWarning(title,msg) { + this.$notify({ + title: title, + message: msg, + type: 'warning' + }); + }, + iconWarningWithTime(title,msg,time) { + this.$notify({ + duration:time, + title: title, + message: msg, + type: 'warning' + }); + }, + }, +}); \ No newline at end of file -- Gitblit v1.9.1