1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| Component({
| properties: {
| applyState: {
| type: String,
| value: 'none'
| },
| rejectCause: {
| type: String,
| value: ''
| }
| },
| data: {
| showRejectDialog: false,
| confirmBtn: { content: '知道了', variant: 'base' },
| },
| methods: {
| applyResource() {
| var myEventDetail = {} // detail对象,提供给事件监听函数
| var myEventOption = {
| bubbles: true,
| composed: true,
| // capturePhase: true,
| } // 触发事件的选项
| this.triggerEvent('applyResource', myEventDetail, myEventOption)
| },
| showDialog() {
| this.setData({
| showRejectDialog: true
| })
| },
| closeDialog() {
| this.setData({
| showRejectDialog: false
| })
| }
| }
| })
|
|