fix: fix the bug of the same key

This commit is contained in:
liufree 2025-06-07 00:38:13 +08:00
parent 7673fbd9f6
commit 76da314a45
4 changed files with 8 additions and 8 deletions

View file

@ -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",

View file

@ -47,7 +47,7 @@ function formatObject(value: any) {
export const ellipsisLink = (app: any, display: string, path: any) => {
return (
<a
<Link
onClick={() => {
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}
</Text>
</a>
</Link>
);
};
@ -78,7 +78,7 @@ export const ellipsisDisplay = (display: string) => {
export const externalLink = (display: string, path: string) => {
// 在obsidian中打开外部链接
return <a
return <Link
onClick={() => {
window.open(path, "_blank");
}}>
@ -88,6 +88,6 @@ export const externalLink = (display: string, path: string) => {
>
{display}
</Text>
</a>;
</Link>;
}

View file

@ -37,7 +37,9 @@ const QueryDashView: React.FC<QueryDashViewDashs> = ({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]);

View file

@ -138,7 +138,6 @@ const TableView: React.FC<ViewProps> = ({app, source}) => {
// console.log('value: ', value);
},
}}
rowKey="title"
search={{
labelWidth: 'auto',
}}
@ -150,7 +149,6 @@ const TableView: React.FC<ViewProps> = ({app, source}) => {
// console.log('params:', params);
const response = await executeTableQuery(dv, source, params);
console.log("response", response);
const {tableData, columns} = response;
setColumns(columns);