LoginHeaderGroup.vue 1.2 KB

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