123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <!-- eslint-disable vue/multi-word-component-names -->
- <template>
- <div class="mini-board" :class="`mini-board_${type}`">
- <template v-if="layout === 'val-top'">
- <slot name="value">
- <div class="mini-board__value" :class="`mini-board__value_${type}`">
- {{ value }}
- </div>
- </slot>
- <slot name="label">
- <div class="mini-board__label" :class="`mini-board__label_${type}`">
- {{ label }}
- </div>
- </slot>
- </template>
- <template v-if="layout === 'label-top'">
- <slot name="label">
- <div class="mini-board__label" :class="`mini-board__label_${type}`">
- {{ label }}
- </div>
- </slot>
- <slot name="value">
- <div class="mini-board__value" :class="`mini-board__value_${type}`">
- {{ value }}
- </div>
- </slot>
- </template>
- </div>
- </template>
- <script lang="ts" setup>
- withDefaults(
- defineProps<{
- label: string;
- value?: string;
- // 告示牌布局,类型为:'val-top' | 'label-top'
- layout: string;
- // 告示牌类型,类型为:'A' | 'B' | 'C' | 'D'
- type?: string;
- }>(),
- {
- value: '/',
- type: 'A',
- layout: 'val-top',
- }
- );
- defineEmits(['click']);
- </script>
- <style lang="less" scoped>
- @import '@/design/vent/color.less';
- .mini-board {
- height: 50px;
- line-height: 25px;
- width: 130px;
- padding: 0 5px 0 5px;
- // box-sizing: border-box;
- text-align: center;
- background-size: 100% 100%;
- position: relative;
- }
- .mini-board_A {
- width: 120px;
- height: 60px;
- background-image: url('@/assets/images/company/area3.png');
- background-size: 100% 100%;
- }
- .mini-board_B {
- width: 131px;
- height: 64px;
- background-image: url('@/assets/images/vent/value-bg.png');
- background-size: 100% auto;
- background-position: center bottom;
- background-repeat: no-repeat;
- }
- .mini-board_C {
- width: 121px;
- height: 69px;
- background-image: url('@/assets/images/vent/vent-param-bg.png');
- }
- .mini-board_D {
- width: 105px;
- height: 58px;
- background-image: url('@/assets/images/vent/home/mini-board-1.png');
- background-position: center bottom;
- background-repeat: no-repeat;
- }
- .mini-board__value_A {
- color: @vent-gas-primary-text;
- font-size: 20px;
- font-weight: bold;
- height: 30px;
- line-height: 30px;
- }
- // .mini-board__label_A {
- // }
- .mini-board__value_B {
- color: @vent-gas-primary-text;
- font-size: 20px;
- font-weight: bold;
- height: 40px;
- line-height: 40px;
- }
- .mini-board__label_B {
- line-height: 24px;
- height: 24px;
- }
- .mini-board__value_C {
- color: @vent-gas-primary-text;
- height: 40px;
- line-height: 40px;
- font-size: 20px;
- font-weight: bold;
- }
- // .mini-board__label_C {
- // }
- .mini-board__value_D {
- font-size: 20px;
- font-weight: bold;
- height: 40px;
- line-height: 40px;
- }
- .mini-board__label_D {
- line-height: 17px;
- height: 17px;
- }
- </style>
|