This commit is contained in:
parent
1faeb1358c
commit
cd973ef05b
6 changed files with 19 additions and 6 deletions
|
@ -52,7 +52,8 @@
|
|||
padding-right: 0;
|
||||
border-radius: 2px;
|
||||
|
||||
&:focus {
|
||||
&:focus,
|
||||
&.search__input--block {
|
||||
width: 100%;
|
||||
border-color: var(--b3-theme-primary);
|
||||
}
|
||||
|
|
|
@ -129,6 +129,14 @@ export class Backlinks extends Model {
|
|||
this.searchBacklinks();
|
||||
}
|
||||
});
|
||||
item.addEventListener("input", (event: KeyboardEvent) => {
|
||||
const inputElement = event.target as HTMLInputElement
|
||||
if (inputElement.value === "") {
|
||||
inputElement.classList.remove("search__input--block")
|
||||
} else {
|
||||
inputElement.classList.add("search__input--block")
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.tree = new Tree({
|
||||
|
|
|
@ -343,6 +343,11 @@ export class Graph extends Model {
|
|||
if (event.isComposing) {
|
||||
return;
|
||||
}
|
||||
if (this.inputElement.value === "") {
|
||||
this.inputElement.classList.remove("search__input--block")
|
||||
} else {
|
||||
this.inputElement.classList.add("search__input--block")
|
||||
}
|
||||
this.searchGraph(false);
|
||||
});
|
||||
this.element.querySelectorAll(".b3-slider").forEach((item: HTMLInputElement) => {
|
||||
|
|
|
@ -3,7 +3,6 @@ import {MenuItem} from "./Menu";
|
|||
import {Editor} from "../editor";
|
||||
import {copyTab} from "../layout/util";
|
||||
import {copySubMenu} from "./commonMenuItem";
|
||||
import {Model} from "../layout/Model";
|
||||
|
||||
const closeMenu = (tab: Tab) => {
|
||||
const allTabs: Tab[] = [];
|
||||
|
|
|
@ -322,7 +322,7 @@ export class WYSIWYG {
|
|||
}
|
||||
// 选中整个标题 https://github.com/siyuan-note/siyuan/issues/4329
|
||||
const headElement = hasClosestByAttribute(startContainer, "data-type", "NodeHeading");
|
||||
let isFoldHeading = false
|
||||
let isFoldHeading = false;
|
||||
if (headElement && range.toString() === headElement.firstElementChild.textContent) {
|
||||
const doOperations: IOperation[] = [{
|
||||
action: "delete",
|
||||
|
|
|
@ -635,12 +635,12 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri
|
|||
};
|
||||
|
||||
const getKey = (element: HTMLElement) => {
|
||||
const keys: string[] = []
|
||||
const keys: string[] = [];
|
||||
element.querySelectorAll("mark").forEach(item => {
|
||||
keys.push(item.textContent);
|
||||
})
|
||||
});
|
||||
return [...new Set(keys)].join(" ");
|
||||
}
|
||||
};
|
||||
|
||||
const getArticle = (options: {
|
||||
id: string,
|
||||
|
|
Loading…
Add table
Reference in a new issue