| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <template>
- <view class="base-container">
- <view class="base-list">
- <view class="base-item" v-for="(item, index) in dataList" :key="index">
- <view class="base-item-value">{{ item.value }}</view>
- <view class="base-item-label">{{
- item.sfDisplayname || item.sfName
- }}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- dataList: {
- type: Array,
- default: () => [],
- },
- },
- data() {
- return {
- list: [
- {
- label: 'PH值',
- value: '0.00',
- },
- {
- label: 'EC值',
- value: '987 us',
- },
- {
- label: '水温',
- value: '20 ℃',
- },
- {
- label: '管道压力',
- value: '20 Pa',
- },
- ],
- };
- },
- };
- </script>
- <style scoped lang="scss">
- .base-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: calc(100% - 64rpx);
- padding: 16rpx 0;
- margin: 0 32rpx;
- justify-content: space-between;
- border-radius: 16rpx;
- background: linear-gradient(180deg, #edfbfb 0%, #d2f2ed 100%);
- margin-bottom: 30rpx;
- .base-list {
- width: 100%;
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- .base-item {
- text-align: center;
- .base-item-value {
- width: 150rpx;
- color: #042118;
- font-family: 'Source Han Sans CN VF';
- font-size: 32rpx;
- font-weight: 500;
- text-align: center;
- }
- .base-item-label {
- width: 150rpx;
- color: #687a74;
- font-family: 'Source Han Sans CN VF';
- text-align: center;
- font-size: 28rpx;
- font-weight: 400;
- // 超出隐藏
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- }
- }
- </style>
|