<template>
    <div class="teacher-container">
        <span class="to-train-mgt" @click="toAddExprt">
            <Icon type="md-add" size="24" />
        </span>
        <div class="table-tools-wrap"></div>
        <vuescroll>
            <Table :columns="columns1" :data="teachers">
                <template slot-scope="{ row }" slot="picture">
                    <PersonalPhoto :name="row.name" :picture="row.picture" />
                </template>
            </Table>
        </vuescroll>
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
import PersonalPhoto from '@/components/public/personalPhoto/Index.vue'
export default {
    components: {
        PersonalPhoto
    },
    data() {
        return {
            columns1: [
                {
                    title: ' ',
                    slot: 'picture',
                    align: 'center'
                },
                {
                    title: '专家ID',
                    key: 'id',
                    sortable: true
                },
                {
                    title: '专家姓名',
                    key: 'name',
                    sortable: true
                }
            ]
        }
    },
    computed: {
        ...mapGetters({
            teachers: 'user/getSchoolUserJoined', // 取得已加入此學校的使用者
        })
    },
    methods:{
        toAddExprt(){

        }
    }
}
</script>
<style lang="less" scoped>
@import "./Teacher.less";
</style>
