C端小程序
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

48 行
1019 B

  1. Component({
  2. externalClasses: ['i-class', 'i-class-mask', 'i-class-header'],
  3. options: {
  4. multipleSlots: true
  5. },
  6. properties: {
  7. visible: {
  8. type: Boolean,
  9. value: false
  10. },
  11. maskClosable: {
  12. type: Boolean,
  13. value: true
  14. },
  15. showCancel: {
  16. type: Boolean,
  17. value: false
  18. },
  19. cancelText: {
  20. type: String,
  21. value: '取消'
  22. },
  23. actions: {
  24. type: Array,
  25. value: []
  26. }
  27. },
  28. methods: {
  29. handleClickMask () {
  30. if (!this.data.maskClosable) return;
  31. this.handleClickCancel();
  32. },
  33. handleClickItem ({ currentTarget = {} }) {
  34. const dataset = currentTarget.dataset || {};
  35. const { index } = dataset;
  36. this.triggerEvent('click', { index });
  37. },
  38. handleClickCancel () {
  39. this.triggerEvent('cancel');
  40. }
  41. }
  42. });