CusSearchButtons.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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="arrow_2" size="14" :rotate="expandValue ? 270 : 90"/>
  8. </div>
  9. </div>
  10. </template>
  11. <script lang="ts">
  12. import {
  13. defineComponent,
  14. computed,
  15. onMounted,
  16. ref,
  17. reactive,
  18. watch,
  19. getCurrentInstance,
  20. nextTick,
  21. ComponentInternalInstance, toRefs
  22. } from 'vue'
  23. import {useStore} from 'vuex'
  24. import {useRouter} from 'vue-router'
  25. export default defineComponent({
  26. name: 'CusSearchButtons',
  27. props: {
  28. expandValue: {
  29. default: null
  30. }
  31. },
  32. setup(props, { emit }) {
  33. const store = useStore();
  34. const router = useRouter();
  35. const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
  36. return {
  37. }
  38. },
  39. })
  40. </script>
  41. <style scoped lang="scss">
  42. .search-buttons {
  43. margin-left: auto;
  44. display: flex;
  45. align-items: flex-start;
  46. justify-content: flex-end;
  47. margin-bottom: 12px;
  48. >div {
  49. margin-right: 12px;
  50. display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. font-size: 14px;
  54. font-family: Microsoft YaHei;
  55. font-weight: 400;
  56. box-sizing: border-box;
  57. &:last-child {
  58. margin-right: 0;
  59. }
  60. }
  61. .search {
  62. width: 74px;
  63. height: 32px;
  64. background: #0062E9;
  65. border-radius: 4px;
  66. color: #FFFFFF;
  67. }
  68. .reset {
  69. width: 74px;
  70. height: 32px;
  71. border: 1px solid #0062E9;
  72. border-radius: 4px;
  73. color: #3070CF;
  74. }
  75. .expand {
  76. color: #0062E9;
  77. margin-top: 8px;
  78. .svg-icon {
  79. margin-left: 9px;
  80. }
  81. }
  82. }
  83. </style>