gx
queenwuli
2021-01-25 c4246ca910f28014efaace64ebf92f47a673a9cf
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
<template>
    <view>
        <slot></slot>
    </view>
</template>
 
<script>
    /**
     * SwipeAction 滑动操作
     * @description 通过滑动触发选项的容器
     * @tutorial https://ext.dcloud.net.cn/plugin?id=181
     */
    export default {
        data() {
            return {};
        },
        provide() {
            return {
                swipeaction: this
            };
        },
        created() {
            this.children = [];
        },
        methods: {
            closeOther(vm) {
                if (this.openItem && this.openItem !== vm) {
                    // #ifdef APP-VUE || H5 || MP-WEIXIN
                    this.openItem.button.show = 'none'
                    // #endif
 
                    // #ifndef APP-VUE || H5 || MP-WEIXIN
                    this.openItem.close()
                    // #endif
                }
                this.openItem = vm
            }
        }
    };
</script>
 
<style></style>