Skip to content

Commit

Permalink
perf: NEllipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Feb 22, 2024
1 parent 3d65cd6 commit fcd0db1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/utils/table.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import dayjs from 'dayjs';
import { NEllipsis } from 'naive-ui';
import type { TableBaseColumn } from 'naive-ui/es/data-table/src/interface';
import { shallowReactive } from 'vue';
import { useAutoWrapWidthColumn } from './size';
import type { Snapshot } from './types';
import { getDevice } from './node';
import { useAutoWrapWidthColumn } from './size';
import { importTimeStorage } from './storage';
import type { Snapshot } from './types';

export const renderDveice = (row: Snapshot) => {
return `${getDevice(row).manufacturer} Android${
Expand Down Expand Up @@ -73,7 +74,7 @@ export const useSnapshotColumns = () => {
title: `应用ID`,
minWidth: 100,
render(row) {
return row.appId;
return <NEllipsis>{row.appId}</NEllipsis>;
},
});
const appVersionCodeCol = useAutoWrapWidthColumn<Snapshot>({
Expand All @@ -89,7 +90,7 @@ export const useSnapshotColumns = () => {
title: `版本号`,
minWidth: 150,
render(row) {
return row.appVersionName;
return <NEllipsis>{row.appVersionName}</NEllipsis>;
},
});

Expand Down

0 comments on commit fcd0db1

Please sign in to comment.