index.vue 846 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <script>
  2. import Prompt from '!!raw-loader!./prompt.md'
  3. import Vue from 'vue'
  4. export default Vue.extend({
  5. name: 'InitSelect',
  6. props: [
  7. 'tool_name',
  8. 'tool_input',
  9. 'tool_data'
  10. ],
  11. data() {
  12. return {
  13. type: 'comp',
  14. prompt: Prompt
  15. }
  16. }
  17. })
  18. </script>
  19. <template>
  20. <div class="init-select">
  21. <div v-for="item in tool_data" class="button" @click="$emit('sentAi',{...item})">{{ item.label }}</div>
  22. </div>
  23. </template>
  24. <style scoped lang="scss">
  25. .init-select{
  26. max-height: 600px;
  27. overflow: hidden;
  28. .button{
  29. width: 100%;
  30. background: #c0d7f6;
  31. padding: 8px 16px;
  32. border-radius: 64px;
  33. color: #2b2677;
  34. font-size: 16px;
  35. transition-duration: 300ms;
  36. cursor: pointer;
  37. &:hover{
  38. background: #b4cbec;
  39. }
  40. &:not(:last-child){
  41. margin-bottom: 6px;
  42. }
  43. }
  44. }
  45. </style>