Component({
    properties: {
        list: Array,
        deleteItem: Function
    },
    options: {
        addGlobalClass: true
    },
    methods: {
        handleItem(e) {
            const {
                item,
                name
            } = e.target.dataset,
                that = this;
            if (!item) return;
            if (name == 'edit') {
                wx.navigateTo({
                    url: '/packageA/setclient/modules/bankcard/update?data=' + JSON.stringify(item)
                })
            } else {
                wx.showModal({
                    title: `提示`,
                    content: '是否确定删除?',
                    complete: ({
                        confirm
                    }) => {
                        if (confirm) that.triggerEvent("deleteItem", item)
                    }
                })
            }
        }
    }
})