CzrSearchButtons.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div class="search-buttons">
  3. <div class="search __hover" @click="$emit('handleSearch')">查 询</div>
  4. <div class="reset __hover" @click="$emit('handleReset')">重 置</div>
  5. <div class="expand __hover" v-if="expandValue !== null" @click="$emit('update:expandValue', !expandValue)">
  6. {{expandValue ? '收起' : '展开'}}
  7. <SvgIcon name="czr_arrow" size="14" :rotate="expandValue ? 270 : 90"/>
  8. </div>
  9. </div>
  10. </template>
  11. <script setup lang="ts">
  12. defineOptions({
  13. name: 'CzrSearchButtons',
  14. });
  15. const props = defineProps({
  16. expandValue: {
  17. default: null
  18. }
  19. })
  20. </script>
  21. <style scoped lang="scss">
  22. .search-buttons {
  23. margin-left: auto;
  24. display: flex;
  25. align-items: flex-start;
  26. justify-content: flex-end;
  27. margin-bottom: 12px;
  28. >div {
  29. margin-right: 12px;
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. font-size: 14px;
  34. font-family: Microsoft YaHei;
  35. font-weight: 400;
  36. box-sizing: border-box;
  37. &:last-child {
  38. margin-right: 0;
  39. }
  40. }
  41. .search {
  42. width: 60px;
  43. height: 32px;
  44. background: var(--czr-main-color);
  45. border-radius: 2px;
  46. color: #FFFFFF;
  47. }
  48. .reset {
  49. width: 60px;
  50. height: 32px;
  51. border: 1px solid transparent;
  52. border-radius: 2px;
  53. color: #576275;
  54. background-color: var(--czr-default-color);
  55. }
  56. .expand {
  57. line-height: 32px;
  58. color: var(--czr-main-color);
  59. .svg-icon {
  60. margin-left: 9px;
  61. }
  62. }
  63. }
  64. </style>