update 调整位置为空时的文字样式,调整表格组件
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<template v-if="column.customRender && isFunction(column.customRender)">
|
||||
{{ column.customRender({ column, record, index, text }) }}
|
||||
</template>
|
||||
<slot v-else-if="column.slot" :name="column.slot" v-bind="{ column, record, index, text } || {}"></slot>
|
||||
<template v-else>
|
||||
{{ text }}
|
||||
</template>
|
||||
@@ -72,6 +73,7 @@
|
||||
|
||||
async function getRecords() {
|
||||
try {
|
||||
dataSource.value = [];
|
||||
tableLoading.value = true;
|
||||
const { code, result } = await props.api({ ...props.apiParams, pageSize: pageSize.value, pageNo: current.value });
|
||||
if (code == 200) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div v-for="item in detailLeft" :key="item.key">
|
||||
<template v-if="item.customRender">
|
||||
<span class="info-label">{{ item.name }}:</span>
|
||||
<span class="info-value"> {{ item.customRender(item.value) }}</span>
|
||||
<span class="info-value" v-html="item.customRender(item.value)"> </span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="info-label">{{ item.name }}:</span>
|
||||
@@ -109,4 +109,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -147,7 +147,7 @@ export function useAlarmDetail() {
|
||||
if (record?.lat) {
|
||||
return `${record.lat},${record.lon}`;
|
||||
} else {
|
||||
return '未知位置';
|
||||
return `<span style="color: #eb3636;">${record?.gpsErrorMsg || ''}</span>`;
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -369,4 +369,4 @@ export function infoContent(res) {
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user