<!--
 * @Descripttion: 
 * @version: 
 * @Author: JC9527
 * @Date: 2023-09-18 10:08:30
 * @LastEditors: JC9527
 * @LastEditTime: 2023-09-18 16:21:18
-->
<template>
  <div class="plan-management">
    <div class="plan-topBox">
      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
        <el-tab-pane label="活动推荐" name="recommendView"></el-tab-pane>
        <el-tab-pane label="活动邀请" name="inviteView"></el-tab-pane>
      </el-tabs>
      <my-input @changeInput="changeInput"></my-input>
    </div>
    <div class="plan-bottomBox">
      <component :is="defaultRouter" :value="input"></component>
    </div>
  </div>
</template>
<script>
import inviteView from '../components/invite.vue'
import recommendView from '../components/recommend.vue'
import myInput from "@/views/components/myInput/index.vue"
export default {
  components:{inviteView,recommendView,myInput},
  data() {
    return {
      input: '',
      activeName: 'recommendView',
      defaultRouter:'recommendView'
    }
  },
  methods:{
    // 输入框的值
    changeInput(value){
      this.input = value;
    },
    handleClick() {
      this.defaultRouter = this.activeName
    }
  },
  async created() {

  },
}
</script>
<style lang="scss" scoped>
.plan-management {
  padding: 0 20px 10px 20px;
  background-color: #fff;
  height: 100%;
  width: 100%;
  border-radius: 10px 10px 0 0;
  box-shadow: 0px 0px 15px 0px rgba(229,212,212,0.58);
  .plan-topBox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 0 0;
    ::v-deep .el-tabs--top {
      height: 40px;
    }
  }
  .plan-bottomBox {
    margin-top: 10px;
  }
}
</style>
