File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ export default {
6262 height: ` ${TAG_BOOK_HEIGHT }px ` ,
6363 minHeight: ` ${TAG_BOOK_HEIGHT }px ` ,
6464 });
65+ watch (() => props .noteId , () => {
66+ if (props .noteId ) {
67+ mitt .emit (' tag-search-focus' );
68+ }
69+ })
6570 watch (
6671 () => props .coor ,
6772 () => {
Original file line number Diff line number Diff line change 22 <div class =" tag-searcher-wrapper" >
33 <el-input
44 v-model =" searchText"
5+ ref =" taginput"
56 size =" mini"
7+ autofocus
68 placeholder =" create or search tag.."
79 @keydown.enter =" handleEnter"
810 ></el-input >
@@ -33,6 +35,10 @@ export default {
3335 });
3436 }
3537 );
38+ const taginput = ref (null );
39+ mitt .on (' tag-search-focus' , () => {
40+ (taginput .value as unknown as HTMLElement )?.focus ();
41+ })
3642 const handleEnter = () => {
3743 if (! searchText .value ) return ;
3844
@@ -44,6 +50,7 @@ export default {
4450 });
4551
4652 return {
53+ taginput ,
4754 searchText ,
4855 handleEnter ,
4956 };
Original file line number Diff line number Diff line change 77- [x] open link brings the note-id so can jump to note also
88- [x] delete the tag while deleting a note who is the only one that owns this tag
99- [x] searching notes
10+ - [x] tag search auto focus
1011- [ ] more precise rects selection rather than coor (select the real dom by text)
1112- [ ] screenshot features
1213 - https://javascript.plainenglish.io/a-better-alternative-to-html2canvas-in-vuejs-3-e0686755d56e
You can’t perform that action at this time.
0 commit comments