<template>
    <div class="page_drugsTemplate">
        <van-sticky>
            <div class="hisOrderTitle">
                <i class="iconfont icon-zuojiantou jiantou" @click="close"></i>
                <span class="titleName">药品模板</span>
                <span>保存</span>
            </div>
        </van-sticky>
        <div>
            <van-tree-select
            :items="items"
            :active-id.sync="activeIds"
            :main-active-index.sync="activeIndex"
            />
        </div>
    </div>
</template>


<script>
export default {
    data(){
        return{
            items: [
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
                { text: '浙江', children: [{text: '温州',id: 1},{text: '杭州',id: 2},] },
                { text: '江苏', children: [] },
            ],
            activeIds: [1, 2],
            activeIndex: 0,
        }
    },
    methods:{
        close(){
            this.$parent.close(2);
        },
    }
}
</script>
