index.js 796 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. fixMargin: {
  25. type: Boolean,
  26. default: false
  27. }
  28. },
  29. data: {
  30. closed: false
  31. },
  32. methods: {
  33. handleTap() {
  34. this.setData({
  35. closed: !this.data.closed,
  36. });
  37. this.triggerEvent('close');
  38. },
  39. }
  40. });