ChatFooter.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <FlexRow
  3. position="relative"
  4. border="1px solid #e0e0e0"
  5. :radius="30"
  6. :padding="20"
  7. :margin="20"
  8. align="center"
  9. >
  10. <textarea
  11. class="input"
  12. v-model="input"
  13. placeholder="给智能助手提问题,交流灵感..."
  14. auto-height
  15. confirm-type="send"
  16. style="flex: 1;"
  17. >
  18. </textarea>
  19. <IconButton
  20. icon="navigation"
  21. :touchable="Boolean(input)"
  22. :loading="props.chatManager.isLoading.value"
  23. :innerStyle="{
  24. backgroundColor: '#000',
  25. borderRadius: '50%',
  26. padding: '10rpx',
  27. }"
  28. color="white"
  29. @click="props.chatManager.send(input)"
  30. />
  31. </FlexRow>
  32. </template>
  33. <script setup lang="ts">
  34. import IconButton from '@/components/basic/IconButton.vue';
  35. import FlexCol from '@/components/layout/FlexCol.vue';
  36. import FlexRow from '@/components/layout/FlexRow.vue';
  37. import { ref } from 'vue';
  38. import type { ChatManager } from '../core/Chat';
  39. const props = defineProps<{
  40. chatManager: ChatManager;
  41. }>();
  42. const input = ref('');
  43. </script>