TopSetting.vue 985 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <a-space size="large">
  3. <a-input
  4. v-model="searchText"
  5. :placeholder="$t('management.search')"
  6. style="width: 300px"
  7. allow-clear
  8. @input="handleSearch"
  9. >
  10. <template #prefix>
  11. <icon-search />
  12. </template>
  13. </a-input>
  14. <a-button type="primary" size="large" @click="handleCreate">
  15. <template #icon>
  16. <icon-plus />
  17. </template>
  18. {{ $t('management.createIntelligent') }}
  19. </a-button>
  20. </a-space>
  21. </template>
  22. <script setup>
  23. import { ref } from 'vue';
  24. import { funcDebounce } from '../../utils/utils';
  25. import { bus_intelligentSearch } from '../../base/event-bus';
  26. const searchText = ref('');
  27. // 搜索
  28. const handleSearch = funcDebounce(
  29. () => {
  30. bus_intelligentSearch.emit(searchText.value);
  31. },
  32. 300,
  33. false
  34. );
  35. // 创建智能体
  36. const handleCreate = () => {};
  37. </script>
  38. <style scoped lang="scss"></style>
  39. <style>
  40. .arco-input-wrapper {
  41. background-color: var(--color-bg-5);
  42. }
  43. </style>