mirror of
https://github.com/liufree/obsidian-querydash.git
synced 2026-07-22 05:41:49 +00:00
fix: fix the bug of the same key
This commit is contained in:
parent
7673fbd9f6
commit
76da314a45
4 changed files with 8 additions and 8 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue