<template>
  <toolbar-container :fields="fields" v-on="$listeners" />
</template>

<script>
import TYPE from '@/const/type';

export default {
  name: 'InfoManagementToolbar',

  data() {
    return {
      fields: [
        {
          type: 'text',
          name: 'title',
          label: '标题'
        },
        {
          type: 'select',
          name: 'status',
          label: '状态',
          options: TYPE,
          format: val => (val !== null && val !== '' ? !!val : null)
        },
        {
          type: 'dateArray',
          name: 'date',
          label: '发布日期',
          apiName: ['startTime', 'endTime']
        }
      ]
    };
  }
};
</script>

<style type="scss" scoped></style>
