Skip to content

Commit

Permalink
perf: width
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Feb 13, 2024
1 parent a3566a9 commit 38916c7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
10 changes: 3 additions & 7 deletions src/components/AttrCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,12 @@ const qfAttrs = [`id`, `vid`, `text`];
<NTd>
<NEllipsis
v-if="attrx.name == 'id'"
style="
width: 180px;
min-width: max(12vw, 180px);
direction: rtl;
text-align: left;
"
class="w-180px min-w-[max(12vw,180px)] text-left"
style="direction: rtl"
>
{{ attrx.value }}
</NEllipsis>
<NEllipsis v-else style="width: 180px; min-width: max(12vw, 180px)">
<NEllipsis v-else class="w-180px min-w-[max(12vw,180px)]">
{{ attrx.value }}
</NEllipsis>
</NTd>
Expand Down
22 changes: 12 additions & 10 deletions src/components/WindowCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,20 @@ const renderLabel = (info: {
size="small"
striped
:singleLine="false"
class="table-fixed"
:themeOverrides="{
thPaddingSmall: '2px 4px',
tdPaddingSmall: '2px 4px',
}"
>
<NThead>
<NTr>
<NTh class="w-140px"> Device </NTh>
<NTh class="w-100px"> Name </NTh>
<NTh class="w-100px"> VersionName </NTh>
<NTh class="w-100px"> VersionCode </NTh>
<NTh class="w-150px"> AppId </NTh>
<NTh> ActivityId </NTh>
<NTh class="w-175px"> 操作 </NTh>
<NTh> 设备 </NTh>
<NTh> 应用名称 </NTh>
<NTh> 版本名称 </NTh>
<NTh> 版本代码 </NTh>
<NTh> 应用ID </NTh>
<NTh> 界面ID </NTh>
<NTh> 操作 </NTh>
</NTr>
</NThead>
<NTbody>
Expand Down Expand Up @@ -141,12 +140,15 @@ const renderLabel = (info: {
{{ snapshot.appId }}
</NEllipsis>
</NTd>
<NTd @click="copy(snapshot.activityId)" class="break-words">
<NTd
@click="copy(snapshot.activityId)"
class="break-words max-w-[max(15vw,200px)]"
>
<NEllipsis>
{{ snapshot.activityId }}
</NEllipsis>
</NTd>
<NTd>
<NTd class="min-w-175px">
<slot></slot>
</NTd>
</NTr>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const useSnapshotColumns = () => {
const appNameCol = useAutoWrapWidthColumn<Snapshot>({
key: `appName`,
minWidth: 100,
title: `APP名称`,
title: `应用名称`,
filterMultiple: true,
filter(value, row) {
return value.toString() == row.appName;
Expand All @@ -70,7 +70,7 @@ export const useSnapshotColumns = () => {
});
const appIdCol = useAutoWrapWidthColumn<Snapshot>({
key: `appId`,
title: `ID`,
title: `应用ID`,
minWidth: 100,
render(row) {
return row.appId;
Expand Down

0 comments on commit 38916c7

Please sign in to comment.