message.js 356 B

12345678910111213141516171819202122
  1. export default {
  2. created() {
  3. if (this.type === 'message') {
  4. // 不显示遮罩
  5. this.maskShow = false
  6. // 获取子组件对象
  7. this.childrenMsg = null
  8. }
  9. },
  10. methods: {
  11. customOpen() {
  12. if (this.childrenMsg) {
  13. this.childrenMsg.open()
  14. }
  15. },
  16. customClose() {
  17. if (this.childrenMsg) {
  18. this.childrenMsg.close()
  19. }
  20. }
  21. }
  22. }