index.js 715 B

12345678910111213141516171819202122232425262728293031323334353637
  1. Component({
  2. externalClasses: ['i-class'],
  3. options: {
  4. multipleSlots: true
  5. },
  6. properties: {
  7. //info, success, warning, error
  8. type: {
  9. type: String,
  10. value: 'info'
  11. },
  12. closable: {
  13. type: Boolean,
  14. value: false
  15. },
  16. showIcon: {
  17. type: Boolean,
  18. default: false
  19. },
  20. desc: {
  21. type: Boolean,
  22. default: false
  23. },
  24. },
  25. data: {
  26. closed: false
  27. },
  28. methods: {
  29. handleTap() {
  30. this.setData({
  31. closed: !this.data.closed,
  32. });
  33. this.triggerEvent('close');
  34. },
  35. }
  36. });