drawer.js 526 B

12345678910111213141516171819202122232425262728293031
  1. //抽屉组件
  2. Component({
  3. externalClasses: ['tui-drawer-class'], //自定义样式
  4. properties: {
  5. visible: {
  6. type: Boolean,
  7. value: false
  8. },
  9. mask: {
  10. type: Boolean,
  11. value: true
  12. },
  13. maskClosable: {
  14. type: Boolean,
  15. value: true
  16. },
  17. mode: {
  18. type: String,
  19. value: 'left' // left right
  20. }
  21. },
  22. data: {},
  23. methods: {
  24. handleMaskClick() {
  25. if (!this.data.maskClosable) {
  26. return;
  27. }
  28. this.triggerEvent('close', {});
  29. }
  30. }
  31. });