LoginHeaderGroup.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="login-header-group">
  3. <view class="header-item">
  4. <cwg-system :text-color="textColor" :icon-color="iconColor" event-source="login"/>
  5. </view>
  6. <view class="divider" :style="{ backgroundColor: dividerColor }"></view>
  7. <view class="header-item" style="margin-right: 10rpx">
  8. <cwg-language :text-color="textColor" :icon-color="iconColor" />
  9. </view>
  10. </view>
  11. </template>
  12. <script setup lang="ts">
  13. import { computed } from 'vue'
  14. import CwgSystem from '@/components/cwg-system.vue'
  15. import CwgLanguage from '@/components/cwg-language.vue'
  16. const props = defineProps({
  17. iconColor: {
  18. type: String,
  19. default: '#141d22'
  20. },
  21. textColor: {
  22. type: String,
  23. default: '#141d22'
  24. }
  25. })
  26. const dividerColor = computed(() => {
  27. return props.textColor === '#fff' ? 'rgba(255, 255, 255, 0.4)' : 'rgba(0, 0, 0, 0.2)'
  28. })
  29. </script>
  30. <style scoped lang="scss">
  31. @import "@/uni.scss";
  32. .login-header-group {
  33. display: flex;
  34. align-items: center;
  35. padding: px2rpx(4) 0;
  36. height: px2rpx(36);
  37. .header-item {
  38. display: flex;
  39. align-items: center;
  40. }
  41. .divider {
  42. width: 1px;
  43. height: px2rpx(14);
  44. margin: 0 px2rpx(16);
  45. }
  46. }
  47. </style>