index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <script setup lang="ts">
  2. import { Input, Button } from "ant-design-vue";
  3. const router = useRouter();
  4. const inputValue = ref("");
  5. </script>
  6. <template>
  7. <div
  8. class="h-screen w-full bg-[url('/image/bg.png')] bg-cover flex text-white flex-col relative"
  9. >
  10. <!-- 返回按钮 -->
  11. <BackButton
  12. class="absolute top-3 md:top-[70px] left-9"
  13. @click="router.push('/')"
  14. />
  15. <div class="w-[691px] mx-auto">
  16. <!-- 搜索框 -->
  17. <div
  18. class="h-[72px] backdrop-blur-sm mx-auto bg-gray-800 mt-[83px] bg-opacity-20 flex justify-between items-center rounded-xl overflow-hidden"
  19. >
  20. <div>
  21. <Input
  22. class="bg-transparent text-white text-lg px-4 placeholder:text-gray-100"
  23. :bordered="false"
  24. placeholder="请输入学生姓名"
  25. v-model:value="inputValue"
  26. />
  27. </div>
  28. <div
  29. class="h-full select-none w-[134px] bg-blue-400 flex justify-center items-center font-medium text-xl cursor-pointer"
  30. >
  31. 搜索
  32. </div>
  33. </div>
  34. <!-- 结果框 -->
  35. <div
  36. v-show="inputValue.length > 0"
  37. class="bg-[#c7dfeb] bg-opacity-70 backdrop-blur-sm rounded-xl mt-2 text-black flex flex-col py-8 gap-2 max-h-[400px] overflow-auto"
  38. >
  39. <SearchCard v-for="i in 3" :key="i" class="flex-none" />
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <style scoped></style>