<template>
  <div>
    <el-row>
      <el-col :md="4">
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
        >
          <el-menu-item index="1">
            <i class="el-icon-upload" />
            <span slot="title">投稿</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-files" />
            <span slot="title">稿件</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-data-analysis" />
            <span slot="title">数据</span>
          </el-menu-item>
        </el-menu>
      </el-col>
      <el-col :md="20">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="视频" name="first">
            <publish-video v-if="activeName === 'first'" />
          </el-tab-pane>
          <el-tab-pane label="音频" name="second">
            <publish-audio v-if="activeName === 'second'" />
          </el-tab-pane>
          <el-tab-pane label="图片" name="third">
            <publish-image v-if="activeName === 'third'" />
          </el-tab-pane>
          <el-tab-pane label="文章" name="fourth">
            <publish-article v-if="activeName === 'fourth'" />
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import PublishVideo from '@/components/upload/PublishVideo'
import PublishAudio from '@/components/upload/PublishAudio'
import PublishImage from '@/components/upload/PublishImage'
import PublishArticle from '@/components/upload/PublishArticle'

export default {
  name: 'Publish',
  components: { PublishVideo, PublishAudio, PublishImage, PublishArticle },
  data() {
    return {
      activeName: 'first',
      coverUrl: null,
      videoUrlId: null,
      coverFile: null,
      dialogImageUrl: '',
      dialogVisible: false,
      disabled: false,
      imageList: [],
      imageUrl: ''
    }
  },
  created() {
  },
  methods: {
  }
}
</script>

<style>
.uploader-example {
  width: 500px;
  padding: 15px;
  margin: 40px auto 0;
  font-size: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .4);
}
.uploader-example .uploader-btn {
  margin-right: 4px;
}
.uploader-example .uploader-list {
  max-height: 440px;
  overflow: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 320px;
  height: 240px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 320px;
  height: 240px;
  display: block;
}
</style>
