fix: update

This commit is contained in:
Fine 2023-11-01 17:54:44 +08:00
parent 48ea74fa53
commit 1e54aa120a
2 changed files with 6 additions and 10 deletions

View File

@ -15,7 +15,7 @@ limitations under the License. -->
<template> <template>
<div class="log"> <div class="log">
<div class="log-header" :class="type === 'browser' ? ['browser-header', 'flex-h'] : 'service-header'"> <div class="log-header flex-h" :class="type === 'browser' ? ['browser-header', 'flex-h'] : 'service-header'">
<template v-for="(item, index) in columns" :key="`col${index}`"> <template v-for="(item, index) in columns" :key="`col${index}`">
<div :class="[item.label, ['message', 'stack'].includes(item.label) ? 'max-item' : '']"> <div :class="[item.label, ['message', 'stack'].includes(item.label) ? 'max-item' : '']">
{{ t(item.value) }} {{ t(item.value) }}
@ -104,7 +104,6 @@ limitations under the License. -->
} }
.log-header div { .log-header div {
display: inline-block;
padding: 0 5px; padding: 0 5px;
border: 1px solid transparent; border: 1px solid transparent;
border-right: 1px dotted silver; border-right: 1px dotted silver;

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<div class="log-item"> <div class="log-item flex-h">
<div <div
v-for="(item, index) in columns" v-for="(item, index) in columns"
:key="index" :key="index"
@ -25,7 +25,7 @@ limitations under the License. -->
{{ dateFormat(data.timestamp) }} {{ dateFormat(data.timestamp) }}
</span> </span>
<span v-else-if="item.label === 'tags'"> <span v-else-if="item.label === 'tags'">
{{ tags }} {{ level }}
</span> </span>
<span v-else-if="item.label === 'traceId' && !noLink" :class="noLink ? '' : 'blue'"> <span v-else-if="item.label === 'traceId' && !noLink" :class="noLink ? '' : 'blue'">
{{ data[item.label] }} {{ data[item.label] }}
@ -51,7 +51,7 @@ limitations under the License. -->
const options: Recordable<LayoutConfig> = inject("options") || {}; const options: Recordable<LayoutConfig> = inject("options") || {};
const emit = defineEmits(["select"]); const emit = defineEmits(["select"]);
const columns = ServiceLogConstants; const columns = ServiceLogConstants;
const tags = computed(() => { const level = computed(() => {
if (!props.data.tags) { if (!props.data.tags) {
return ""; return "";
} }
@ -125,16 +125,13 @@ limitations under the License. -->
display: inline-block; display: inline-block;
border: 1px solid transparent; border: 1px solid transparent;
border-right: 1px dotted silver; border-right: 1px dotted silver;
white-space: normal;
word-break: break-all;
overflow: hidden; overflow: hidden;
height: 30px;
line-height: 30px;
text-overflow: ellipsis;
white-space: nowrap;
} }
.log-item .text { .log-item .text {
width: 100%; width: 100%;
display: inline-block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;