toolbar.vue 604 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <toolbar-container :fields="fields" v-on="$listeners" />
  3. </template>
  4. <script>
  5. import TYPE from '@/const/type';
  6. export default {
  7. name: 'TrendingToolbar',
  8. data() {
  9. return {
  10. fields: [
  11. {
  12. type: 'text',
  13. name: 'name',
  14. label: '关键字'
  15. },
  16. {
  17. type: 'select',
  18. name: 'isShow',
  19. label: '显示/隐藏',
  20. options: TYPE,
  21. format: val => (val !== null && val !== '' ? !!val : null),
  22. defaultValue: 1
  23. }
  24. ]
  25. };
  26. }
  27. };
  28. </script>
  29. <style type="scss" scoped></style>