diff --git a/LICENSE.txt b/LICENSE.txt index 9a93cb7..e33bf10 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Michael Brenan +Copyright (c) 2025 liufree Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/constants.ts b/src/constants.ts deleted file mode 100644 index e1548bb..0000000 --- a/src/constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const SAMPLE_VIEW_TYPE = 'sample_view'; -export const VIEW_TYPE = 'react-view'; diff --git a/src/pages/GenerateColumns.tsx b/src/pages/GenerateColumns.tsx index 735a9c1..dce5ad0 100644 --- a/src/pages/GenerateColumns.tsx +++ b/src/pages/GenerateColumns.tsx @@ -1,4 +1,4 @@ -import dayjs from "dayjs"; +import moment from "moment"; export function formatValue( value: Record @@ -7,7 +7,7 @@ export function formatValue( if (!value) { return; } - console.log("format value", value); +// console.log("format value", value); if (Array.isArray(value)) { value.map((v) => (typeof v === "object" ? formatObject(v) : v)); res = {type: "array", display: value}; @@ -27,11 +27,11 @@ function formatObject(value: any) { } if ("path" in value && "display" in value) { - console.log("link value", value); + // console.log("link value", value); return {type: "link", path: value.path, display: value.display}; } if ("ts" in value) { - const display= dayjs(value.ts).format("YYYY-MM-DD HH:mm:ss"); + const display= moment(value.ts).format("YYYY-MM-DD HH:mm:ss"); return {type: "datetime", display: display}; } } diff --git a/src/pages/listview/ListView.tsx b/src/pages/listview/ListView.tsx index 3c77f1b..6c8858e 100644 --- a/src/pages/listview/ListView.tsx +++ b/src/pages/listview/ListView.tsx @@ -18,9 +18,9 @@ const ListView: React.FC = ({app, source}) => { const values: Record = {}; headers.forEach((header, index) => { const value = row[index]; - console.log("list value", value); + // console.log("list value", value); const resValue = formatValue(value); - console.log("list resValue", resValue); + // console.log("list resValue", resValue); values[header] = resValue; }); rows.push(values); @@ -29,7 +29,7 @@ const ListView: React.FC = ({app, source}) => { delete params.current; delete params.pageSize; - console.log("list rows", rows); + // console.log("list rows", rows); const filteredData = rows.filter(item => { return Object.keys(params).every(key => { @@ -100,7 +100,7 @@ const ListView: React.FC = ({app, source}) => { title: { title: 'title', render: (_, record: any) => { - console.log("list record", record); + // console.log("list record", record); return {record.File.path}; } }, diff --git a/src/pages/tableview/TableView.tsx b/src/pages/tableview/TableView.tsx index 7dd4057..b4f9c65 100644 --- a/src/pages/tableview/TableView.tsx +++ b/src/pages/tableview/TableView.tsx @@ -77,7 +77,7 @@ const TableView: React.FC = ({app, source}) => { function parseTableResult(value: any, params: any): Array> { const headers: string[] = value.headers; - console.log("headers", headers); + // console.log("headers", headers); // console.log("valueData", value); const rows: Array> = []; @@ -131,7 +131,7 @@ const TableView: React.FC = ({app, source}) => { } useEffect(() => { - console.log("source", source); + // console.log("source", source); }, []); @@ -152,7 +152,7 @@ const TableView: React.FC = ({app, source}) => { option: {fixed: 'right', disable: true}, }, onChange(value) { - console.log('value: ', value); + // console.log('value: ', value); }, }} rowKey="title" @@ -164,7 +164,7 @@ const TableView: React.FC = ({app, source}) => { }} headerTitle="TablieView" request={async (params, sort, filter) => { - console.log('params:', params); + // console.log('params:', params); const response = await executeTableQuery(dv, source, params); const {tableData, columns} = response; diff --git a/versions.json b/versions.json index 26382a1..ce2cda7 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,3 @@ { - "1.0.0": "0.15.0" + "1.0.0": "1.8.0" }