<template>
    <div class="address">
        <div class="title">我的地址</div>
        <van-address-list :switchable="false" :list="list" default-tag-text="默认" @add="onAdd" @edit="onEdit" />
    </div>
</template>
<script>
export default {
    data() {
        return {
            list: [
                {
                    id: '1',
                    name: '张三',
                    tel: '13000000000',
                    address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
                    isDefault: true
                },
                {
                    id: '2',
                    name: '李四',
                    tel: '1310000000',
                    address: '浙江省杭州市拱墅区莫干山路 50 号'
                }
            ]
        };
    },
    methods: {
        onAdd() {
            this.$router.push('/mineAddressEdit');
        },
        onEdit() {}
    }
};
</script>
<style lang="less" scoped>
.address {
    padding-bottom: 100px;
    box-sizing: border-box;
    background-color: @bg3;
}

.title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    line-height: 30px;
    padding: 10px 10px;
    background-color: @bg;
}

/deep/.van-address-item {
    background-color: @bg;
    .van-tag--danger {
        background-color: transparent;
        color: @prim;
        border: 1px solid @prim;
    }
}

/deep/.van-address-list__bottom {
    background-color: @bg;
    padding-left: 48px;
    padding-right: 48px;

    .van-button--danger {
        background: linear-gradient(135deg, #fdfb60 0%, #ff8f3e 100%);
        border-width: 0;
        color: @bg;
        font-weight: bold;
    }
}
</style>
