<template>
    <div class="handle-btn">
        <div class="icon-box">
            <div class="icon">
                <i class="iconfont icon-icomx_banli"></i>
            </div>
            <div class="icon-text">办理</div>
        </div>
        <div class="title">{{title || '待配置'}}</div>
    </div>
</template>
<script setup>
    import { defineProps, inject, ref } from 'vue'
    
    let title = ref('')
    let getNode = inject('getNode')
    const node = getNode()
    console.log(node)
    node.on('change:data', ({current}) => {
        title.value = current.title
    })

</script>
<style lang="scss">
    .handle-btn{
        height: 90px;
        width: 150px;
        background: #fff;
        text-align: center;
        box-shadow: 0px 2px 10px 1px rgba(51,51,51,0.1);
        border-radius: 10px 10px 10px 10px;
        padding: 10px;
        .title {
            width: 100%;
            height: 40px;
            line-height: 40px;
            padding: 0 20px;
            text-align: left;
            background: #eee;
            border-radius: 10px;
            margin-top: 10px;
            //文字一行多余省略
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .icon-box{
            display: flex;
            height: 20px;
            line-height: 20px;
            color: #333;
            font-size: 14px;
            .icon{
                height: 20px;
                width: 20px;
                border-radius: 10px;
                background: #FF9315;
                color: #fff;
                i{
                    color: #fff;
                    font-size: 12px;
                }
            }
            .icon-text{
                margin-left:10px;
            }
        }
    }
</style>