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

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

export default {
  name: 'EventsListToolbar',

  data() {
    return {
      fields: [
        {
          type: 'SceneSelect',
          name: 'kindergartenId',
          label: '场景'
        },
        {
          type: 'text',
          name: 'name',
          label: '活动'
        },
        {
          type: 'dateArray',
          name: 'date',
          label: '活动时间',
          apiName: ['startTime', 'endTime'],
          labelWidth: '100px'
        },
        {
          type: 'select',
          name: 'isShow',
          label: '显示/隐藏',
          options: TYPE,
          format: val => (val !== null && val !== '' ? !!val : null),
          defaultValue: 1
        }
      ]
    };
  }
};
</script>

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