mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 21:18:07 +01:00
This commit is contained in:
parent
c935368b97
commit
7e9b52719a
3 changed files with 11 additions and 8 deletions
|
|
@ -419,6 +419,12 @@
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-dtype="created"],
|
||||
&[data-dtype="updated"],
|
||||
&[data-dtype="lineNumber"] {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
&--wrap {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue