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
38
39
40
41
42
43
44
45
46
47
48
49
| Component({
| properties: {
| show: {
| type: Boolean,
| value: false
| },
| //left/right
| direction: {
| type: String,
| value: 'right'
| },
| //背景颜色
| background: {
| type: String,
| value: '#fff'
| },
| zIndex: {
| type: Number,
| optionalTypes: [String],
| value: 996
| },
| //点击遮罩 是否可关闭
| maskClosable: {
| type: Boolean,
| value: true
| },
| maskBackground: {
| type: String,
| value: 'rgba(0,0,0,.6)'
| },
| //圆角值,左侧打开时为右侧圆角,右侧打开时为左侧圆角
| radius: {
| type: String,
| optionalTypes: [Number],
| value: 0
| }
| },
| methods: {
| stop() {},
| handleClose(e) {
| if (!this.data.maskClosable) return;
| this.setData({
| show: false,
| })
| this.triggerEvent('close', {});
|
| }
| }
| })
|
|