Vanessa 2025-06-26 10:06:32 +08:00
parent c935368b97
commit 7e9b52719a
3 changed files with 11 additions and 8 deletions

View file

@ -419,6 +419,12 @@
display: block;
}
}
&[data-dtype="created"],
&[data-dtype="updated"],
&[data-dtype="lineNumber"] {
cursor: default;
}
}
&--wrap {

View file

@ -229,12 +229,9 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
const cellType = getTypeByCellElement(target);
if (viewType === "gallery") {
const itemElement = hasClosestByClassName(target, "av__gallery-item");
if (itemElement)
if (cellType === "updated" || cellType === "created" || cellType === "lineNumber") {
itemElement.classList.add("av__gallery-item--select");
} else {
popTextCell(protyle, [target]);
}
if (itemElement && cellType !== "updated" && cellType !== "created" && cellType !== "lineNumber") {
popTextCell(protyle, [target]);
}
} else {
const scrollElement = hasClosestByClassName(target, "av__scroll");
if (!scrollElement) {

View file

@ -10,7 +10,7 @@ import {addClearButton} from "../../../../util/addClearButton";
import {avRender, updateSearch} from "../render";
import {getViewIcon} from "../view";
import {processRender} from "../../../util/processCode";
import {getColIconByType} from "../col";
import {getColIconByType, getColNameByType} from "../col";
export const renderGallery = (options: {
blockElement: HTMLElement,
@ -94,7 +94,7 @@ export const renderGallery = (options: {
// NOTE: innerHTML 中不能换行否则 https://github.com/siyuan-note/siyuan/issues/15132
galleryHTML += `<div class="av__cell${checkClass} ariaLabel"
data-empty="${isEmpty}"
aria-label="${escapeAttr(view.fields[fieldsIndex].name)}"
aria-label="${escapeAttr(view.fields[fieldsIndex].name) || getColNameByType(view.fields[fieldsIndex].type)}"
data-position="5west"
data-id="${cell.id}"
data-field-id="${view.fields[fieldsIndex].id}"