| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- <!-- eslint-disable vue/multi-word-component-names -->
- <template>
- <!-- 基准的列表模块,通过不同的 type 展示不同的样式 -->
- <div class="list flex items-center" :class="`list_${type}`">
- <!-- 部分类型的列表需要加一张图片 -->
- <div :class="`list__image_${type}`"></div>
- <!-- 剩下的部分填充剩余宽度 -->
- <div class="flex-grow" :class="`list__wrapper_${type}`">
- <div v-for="item in listConfig" :key="item.prop" class="flex items-center" :class="`list-item_${type}`">
- <!-- 列表项前面的图标 -->
- <div :class="`list-item__icon_${type}`"></div>
- <!-- 列表项的具体内容填充剩余宽度 -->
- <div class="flex-grow" :class="`list-item__content_${type}`">
- <div class="list-item__label">{{ item.label }}</div>
- <div class="list-item__info" :class="`list-item__info_${item.color}`">{{ item.info }}</div>
- <div class="list-item__value" :class="`list-item__value_${item.color} list-item__value_${type}`">{{ item.value }}</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- withDefaults(
- defineProps<{
- listConfig: {
- value: string;
- color: string;
- label: string;
- prop: string;
- info: string;
- }[];
- /** A B C D E */
- type: string;
- }>(),
- {
- listConfig: () => [],
- type: 'A',
- }
- );
- // defineEmits(['click']);
- </script>
- <style lang="less" scoped>
- @import '@/design/vent/color.less';
- /* Timeline 相关的样式 */
- .list {
- padding: 5px 20px;
- position: relative;
- background-repeat: no-repeat;
- width: 100%;
- height: 100%;
- background-size: auto 100%;
- background-image: url(/@/assets/images/home-container/configurable/list_bg_default.png);
- }
- .list_A {
- padding-left: 5px;
- }
- .list-item__content_A {
- background-repeat: no-repeat;
- background-image: @vent-gas-list-item-bg-img;
- padding: 5px 10px;
- display: flex;
- }
- .list-item__icon_A {
- background-repeat: no-repeat;
- width: 25px;
- height: 29px;
- background-image: url(/@/assets/images/home-container/configurable/triangle_icon.png);
- }
- .list-item__content_B {
- background-repeat: no-repeat;
- padding: 5px 10px 10px 10px;
- display: flex;
- background-position: left bottom;
- background-size: 100% auto;
- background-image: url(/@/assets/images/home-container/configurable/list_bg_b.png);
- }
- .list__image_B {
- width: 77px;
- height: 77px;
- background-repeat: no-repeat;
- background-image: url(/@/assets/images/home-container/configurable/deco_1.png);
- background-size: auto;
- margin-right: 20px;
- }
- .list_C {
- background: none;
- }
- .list-item__content_C {
- height: 60px;
- background-repeat: no-repeat;
- padding: 25px 50px 0 50px;
- display: flex;
- background-position: center;
- background-size: 100% 100%;
- background-image: url(/@/assets/images/home-container/configurable/list_bg_c.png);
- margin-bottom: 10px;
- text-align: center;
- }
- .list-item__content_C > div {
- flex-basis: 33.3%;
- }
- .list_D {
- background-size: 100% auto;
- background-image: url(/@/assets/images/home-container/configurable/list_bg_defflip.png);
- }
- .list__wrapper_D {
- display: flex;
- flex-wrap: wrap;
- }
- .list-item__icon_D {
- display: none;
- }
- .list-item_D {
- flex-basis: 25%;
- // width: 80px;
- height: 60px;
- background-repeat: no-repeat;
- // padding: 25px 50px 0 50px;
- // display: flex;
- background-position: center;
- background-size: auto 100%;
- background-image: url(/@/assets/images/home-container/configurable/list_bg_d.png);
- // margin-bottom: 10px;
- text-align: center;
- margin-bottom: 10px;
- }
- .list-item__content_D {
- line-height: 30px;
- }
- .list-item__value_D {
- font-weight: bold;
- }
- .list_E {
- background-image: url(/@/assets/images/home-container/configurable/list_bg_defflip.png);
- }
- .list__wrapper_E {
- display: flex;
- flex-wrap: wrap;
- }
- .list-item__icon_E {
- display: none;
- }
- .list-item_E {
- flex-basis: 25%;
- // width: 80px;
- height: 70px;
- background-repeat: no-repeat;
- // padding: 25px 50px 0 50px;
- // display: flex;
- background-position: center;
- background-size: auto 100%;
- background-image: url(/@/assets/images/home-container/configurable/list_bg_e.png);
- // margin-bottom: 10px;
- text-align: center;
- margin: 5px 0px;
- padding-top: 32px;
- font-size: 12px;
- }
- // .list-item__icon_red {
- // background-image: url('@/assets/images/home-container/configurable/warn_icon_5.png');
- // }
- // .list-item__icon_orange {
- // background-image: url('@/assets/images/home-container/configurable/warn_icon_4.png');
- // }
- // .list-item__icon_yellow {
- // background-image: url('@/assets/images/home-container/configurable/warn_icon_3.png');
- // }
- // .list-item__icon_green {
- // background-image: url('@/assets/images/home-container/configurable/warn_icon_2.png');
- // }
- // .list-item__icon_blue {
- // background-image: url('@/assets/images/home-container/configurable/warn_icon_1.png');
- // }
- // .list-item__icon {
- // width: 33px;
- // height: 35px;
- // margin-left: 50px;
- // background-repeat: no-repeat;
- // background-position: center center;
- // }
- // .list-item__dot {
- // width: 10px;
- // height: 10px;
- // margin-left: 70px;
- // background-color: @vent-gas-primary-bg;
- // border-radius: 5px;
- // position: relative;
- // }
- // .list-item__dot::before {
- // content: '';
- // position: absolute;
- // top: -3px;
- // left: -3px;
- // width: 16px;
- // height: 16px;
- // border-radius: 8px;
- // border: 1px solid @vent-gas-tab-border;
- // }
- .list-item__label {
- flex-basis: 55%;
- }
- .list-item__info {
- flex-grow: 1;
- }
- .list-item__value {
- flex-basis: 30%;
- }
- .list-item__value_red {
- color: red;
- }
- .list-item__value_orange {
- color: orange;
- }
- .list-item__value_yellow {
- color: yellow;
- }
- .list-item__value_green {
- color: yellowgreen;
- }
- .list-item__value_blue {
- color: lightblue;
- }
- .list-item__value_white {
- color: white;
- }
- </style>
|