| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <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;
- height: 100%;
- width: calc(100% - 64rpx);
- height: 88rpx;
- 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>
|