modal.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <<<<<<< HEAD
  2. import { Message, MessageBox, Notification, Loading } from 'element-ui'
  3. let loadingInstance;
  4. export default {
  5. // 消息提示
  6. msg(content) {
  7. Message.info(content)
  8. },
  9. // 错误消息
  10. msgError(content) {
  11. Message.error(content)
  12. },
  13. // 成功消息
  14. msgSuccess(content) {
  15. Message.success(content)
  16. },
  17. // 警告消息
  18. msgWarning(content) {
  19. Message.warning(content)
  20. },
  21. // 弹出提示
  22. alert(content) {
  23. MessageBox.alert(content, "系统提示")
  24. },
  25. // 错误提示
  26. alertError(content) {
  27. MessageBox.alert(content, "系统提示", { type: 'error' })
  28. },
  29. // 成功提示
  30. alertSuccess(content) {
  31. MessageBox.alert(content, "系统提示", { type: 'success' })
  32. },
  33. // 警告提示
  34. alertWarning(content) {
  35. MessageBox.alert(content, "系统提示", { type: 'warning' })
  36. },
  37. // 通知提示
  38. notify(content) {
  39. Notification.info(content)
  40. },
  41. // 错误通知
  42. notifyError(content) {
  43. Notification.error(content);
  44. },
  45. // 成功通知
  46. notifySuccess(content) {
  47. Notification.success(content)
  48. },
  49. // 警告通知
  50. notifyWarning(content) {
  51. Notification.warning(content)
  52. },
  53. // 确认窗体
  54. confirm(content) {
  55. return MessageBox.confirm(content, "系统提示", {
  56. confirmButtonText: '确定',
  57. cancelButtonText: '取消',
  58. type: "warning",
  59. })
  60. },
  61. // 提交内容
  62. prompt(content) {
  63. return MessageBox.prompt(content, "系统提示", {
  64. confirmButtonText: '确定',
  65. cancelButtonText: '取消',
  66. type: "warning",
  67. })
  68. },
  69. // 打开遮罩层
  70. loading(content) {
  71. loadingInstance = Loading.service({
  72. lock: true,
  73. text: content,
  74. spinner: "el-icon-loading",
  75. background: "rgba(0, 0, 0, 0.7)",
  76. })
  77. },
  78. // 关闭遮罩层
  79. closeLoading() {
  80. loadingInstance.close();
  81. }
  82. }
  83. =======
  84. import { Message, MessageBox, Notification, Loading } from 'element-ui'
  85. let loadingInstance;
  86. export default {
  87. // 消息提示
  88. msg(content) {
  89. Message.info(content)
  90. },
  91. // 错误消息
  92. msgError(content) {
  93. Message.error(content)
  94. },
  95. // 成功消息
  96. msgSuccess(content) {
  97. Message.success(content)
  98. },
  99. // 警告消息
  100. msgWarning(content) {
  101. Message.warning(content)
  102. },
  103. // 弹出提示
  104. alert(content) {
  105. MessageBox.alert(content, "系统提示")
  106. },
  107. // 错误提示
  108. alertError(content) {
  109. MessageBox.alert(content, "系统提示", { type: 'error' })
  110. },
  111. // 成功提示
  112. alertSuccess(content) {
  113. MessageBox.alert(content, "系统提示", { type: 'success' })
  114. },
  115. // 警告提示
  116. alertWarning(content) {
  117. MessageBox.alert(content, "系统提示", { type: 'warning' })
  118. },
  119. // 通知提示
  120. notify(content) {
  121. Notification.info(content)
  122. },
  123. // 错误通知
  124. notifyError(content) {
  125. Notification.error(content);
  126. },
  127. // 成功通知
  128. notifySuccess(content) {
  129. Notification.success(content)
  130. },
  131. // 警告通知
  132. notifyWarning(content) {
  133. Notification.warning(content)
  134. },
  135. // 确认窗体
  136. confirm(content) {
  137. return MessageBox.confirm(content, "系统提示", {
  138. confirmButtonText: '确定',
  139. cancelButtonText: '取消',
  140. type: "warning",
  141. })
  142. },
  143. // 提交内容
  144. prompt(content) {
  145. return MessageBox.prompt(content, "系统提示", {
  146. confirmButtonText: '确定',
  147. cancelButtonText: '取消',
  148. type: "warning",
  149. })
  150. },
  151. // 打开遮罩层
  152. loading(content) {
  153. loadingInstance = Loading.service({
  154. lock: true,
  155. text: content,
  156. spinner: "el-icon-loading",
  157. background: "rgba(0, 0, 0, 0.7)",
  158. })
  159. },
  160. // 关闭遮罩层
  161. closeLoading() {
  162. loadingInstance.close();
  163. }
  164. }
  165. >>>>>>> ec6eeb00ce64eb587a455406167d302dc3e59216