CusSearchButtons.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. height: 30px;
  50. margin-right: 12px;
  51. display: flex;
  52. align-items: center;
  53. justify-content: center;
  54. font-size: 16px;
  55. font-family: PingFang SC-Regular, PingFang SC;
  56. font-weight: 400;
  57. box-sizing: border-box;
  58. padding: 0 10px;
  59. border-radius: 4px;
  60. color: #FFFFFF;
  61. border: 1px solid rgba(0,133,247,0.5);
  62. &:last-child {
  63. margin-right: 0;
  64. }
  65. }
  66. .search {
  67. background-color: #0085F7;
  68. }
  69. .reset {
  70. background-color: rgba(0, 133, 247, 0.2);
  71. }
  72. .expand {
  73. color: #0062E9;
  74. margin-top: 8px;
  75. .svg-icon {
  76. margin-left: 9px;
  77. }
  78. }
  79. }
  80. </style>