<template>
  <search-white-board @search="handleSearch">
    <div slot="more">
      <el-row :gutter="20">
        <el-col class="toolbar-txt txt-right" :span="2">发布位置</el-col>
        <el-col :span="6">
          <el-select
            v-model="form.usedStatus"
            clearable
            placeholder="请选择"
            style="width: 100%;"
          >
            <el-option
              v-for="item in usedOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </el-col>
      </el-row>
    </div>
  </search-white-board>
</template>

<script>
import mxField from '@/mixins/field'
import { setStatus } from '@/utils'

export default {
  name: 'TagToolbar',

  mixins: [mxField()],

  data() {
    return {
      form: {
        usedStatus: 'all',
        showStatus: 'all'
      },
      apiForm: {
        usedStatus: 'use_status',
        showStatus: 'show_status'
      },
      usedOptions: setStatus(['全部状态', '未使用', '已使用'], ['all', 'unused', 'used'])
    }
  },

  methods: {
  }
}
</script>

<style scoped>
.toolbar-txt {
  font-size: 13px;
  padding: 5px;
  line-height: 1.7;
}
.txt-right {
  text-align: right;
}
</style>
