<template>
    <div class="essay">
      <van-search
        v-model="keywords"
        placeholder="请输入搜索关键词"
        @search="onSearch"
      >
        <template #left>
          <div class="essay-back" @click="$router.push('/')">返回</div>
        </template>
      </van-search>
      <van-tabs v-model="active" animated>
        <van-tab title="最新">
          <latest />
        </van-tab>
        <van-tab title="最热" disabled>
          <latest />
        </van-tab>
        <van-tab title="关注" disabled>
          <latest />
        </van-tab>
      </van-tabs>
    </div>
</template>

<script>
import Latest from './latest'

export default {
  name: 'essay',
  data () {
    return {
      active: 0,
      keywords: ''
    }
  },
  components: { Latest },
  methods: {
    onSearch () {}
  }
}
</script>

<style lang="scss" scoped>
.essay {
  min-height: 100vh;
  &-back {
    padding-right: 12px;
  }
}
</style>
