DataTimingRange.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <main class="d-flex align-baseline">
  3. <UiInputDatePicker class="time-range" v-if="showRange" label="period_choose" :data="[]" :range="true"/>
  4. <v-tooltip bottom>
  5. <template v-slot:activator="{ on, attrs }">
  6. <v-btn
  7. class="time-btn"
  8. max-height="25"
  9. v-bind="attrs"
  10. v-on="on"
  11. @click="showRange=!showRange"
  12. elevation="0"
  13. max-width="10px"
  14. min-width="10px"
  15. >
  16. <v-icon color="ot_grey" class="font-weight-normal" x-small>fas fa-history</v-icon>
  17. </v-btn>
  18. </template>
  19. <span>{{$t('history_help')}}</span>
  20. </v-tooltip>
  21. </main>
  22. </template>
  23. <script lang="ts">
  24. import {defineComponent, ref} from '@nuxtjs/composition-api'
  25. export default defineComponent({
  26. setup() {
  27. const showRange = ref(false)
  28. return {
  29. showRange
  30. }
  31. }
  32. })
  33. </script>
  34. <style lang="scss">
  35. .v-btn--active .v-icon{
  36. color: #FFF !important;
  37. }
  38. .time-btn{
  39. border-width: 1px 1px 1px 0px;
  40. border-style: solid;
  41. border-color: rgba(0, 0, 0, 0.12) !important;
  42. }
  43. .time-range{
  44. max-height: 20px;
  45. .v-text-field{
  46. padding-top: 0 !important;
  47. margin-top: 0 !important;
  48. }
  49. .v-icon{
  50. font-size: 16px;
  51. }
  52. input{
  53. font-size: 14px;
  54. width: 200px !important;
  55. }
  56. }
  57. </style>