diff --git a/manifest.json b/manifest.json index e21ec36..9ddbef1 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "querydash", "name": "QueryDash", - "version": "1.0.9", + "version": "1.1.0", "minAppVersion": "1.8.0", "description": "Refer to Dataview and add search, sorting, and pagination functions, just like Notion.", "author": "lwx", diff --git a/src/pages/GenerateColumns.tsx b/src/pages/GenerateColumns.tsx index 419a4a0..9ea2acd 100644 --- a/src/pages/GenerateColumns.tsx +++ b/src/pages/GenerateColumns.tsx @@ -47,7 +47,7 @@ function formatObject(value: any) { export const ellipsisLink = (app: any, display: string, path: any) => { return ( - { const file = app.vault.getAbstractFileByPath(path); if (file && file instanceof TFile) { @@ -61,7 +61,7 @@ export const ellipsisLink = (app: any, display: string, path: any) => { > {display} - + ); }; @@ -78,7 +78,7 @@ export const ellipsisDisplay = (display: string) => { export const externalLink = (display: string, path: string) => { // 在obsidian中打开外部链接 - return { window.open(path, "_blank"); }}> @@ -88,6 +88,6 @@ export const externalLink = (display: string, path: string) => { > {display} - ; + ; } diff --git a/src/pages/QueryDashView.tsx b/src/pages/QueryDashView.tsx index 20b83e6..0457c34 100644 --- a/src/pages/QueryDashView.tsx +++ b/src/pages/QueryDashView.tsx @@ -37,7 +37,9 @@ const QueryDashView: React.FC = ({app, source}) => { useEffect(() => { // Get the first word of the source - const sourceType = source.split(" ")[0].toLowerCase(); + let sourceType = source.match(/^\s*(\S+)/)?.[1] ?? ''; + sourceType = sourceType.toLowerCase(); + setSourceType(sourceType); }, [source]); diff --git a/src/pages/tableview/TableView.tsx b/src/pages/tableview/TableView.tsx index 210fa10..403cdf3 100644 --- a/src/pages/tableview/TableView.tsx +++ b/src/pages/tableview/TableView.tsx @@ -138,7 +138,6 @@ const TableView: React.FC = ({app, source}) => { // console.log('value: ', value); }, }} - rowKey="title" search={{ labelWidth: 'auto', }} @@ -150,7 +149,6 @@ const TableView: React.FC = ({app, source}) => { // console.log('params:', params); const response = await executeTableQuery(dv, source, params); - console.log("response", response); const {tableData, columns} = response; setColumns(columns);