From fcd0db1e55b8e1101eb79612626106bbde323c2b Mon Sep 17 00:00:00 2001 From: lisonge Date: Thu, 22 Feb 2024 21:26:58 +0800 Subject: [PATCH] perf: NEllipsis --- src/utils/table.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/table.tsx b/src/utils/table.tsx index d2a920e..c440140 100644 --- a/src/utils/table.tsx +++ b/src/utils/table.tsx @@ -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${ @@ -73,7 +74,7 @@ export const useSnapshotColumns = () => { title: `应用ID`, minWidth: 100, render(row) { - return row.appId; + return {row.appId}; }, }); const appVersionCodeCol = useAutoWrapWidthColumn({ @@ -89,7 +90,7 @@ export const useSnapshotColumns = () => { title: `版本号`, minWidth: 150, render(row) { - return row.appVersionName; + return {row.appVersionName}; }, });