fix: 塘口无设备时候,修改样式。
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :class="props.type == 1 ? 'nut-cell' : ''">
|
<view :class="props.type == 1 ? 'pond-info-container' : ''" :style="{ width: '100%' }">
|
||||||
<nut-config-provider :theme-vars="themeVarsBody">
|
<nut-config-provider :theme-vars="themeVarsBody">
|
||||||
<nut-row>
|
<nut-row>
|
||||||
<nut-col :span="24">
|
<nut-col :span="24">
|
||||||
@@ -365,11 +365,13 @@
|
|||||||
</nut-row>
|
</nut-row>
|
||||||
<nut-row v-else>
|
<nut-row v-else>
|
||||||
<nut-col :span="24">
|
<nut-col :span="24">
|
||||||
<nut-empty description="暂无设备">
|
<view class="empty-container">
|
||||||
<template #image>
|
<nut-empty description="暂无设备">
|
||||||
<img :src="pond404" />
|
<template #image>
|
||||||
</template>
|
<img :src="pond404" />
|
||||||
</nut-empty>
|
</template>
|
||||||
|
</nut-empty>
|
||||||
|
</view>
|
||||||
</nut-col>
|
</nut-col>
|
||||||
</nut-row>
|
</nut-row>
|
||||||
</nut-config-provider>
|
</nut-config-provider>
|
||||||
@@ -2355,6 +2357,34 @@ defineExpose({
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 暂无设备居中容器
|
||||||
|
.empty-container {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强制 nut-row 占满宽度
|
||||||
|
.nut-row {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强制 nut-cell 占满宽度
|
||||||
|
.nut-cell {
|
||||||
|
width: 100% !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 组件容器样式
|
||||||
|
.pond-info-container {
|
||||||
|
width: 100%;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.loading-container {
|
.loading-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
|||||||
Reference in New Issue
Block a user