File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
view/system/bookmark-export Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " nav" ,
3- "version" : " 16 .0.0" ,
3+ "version" : " 17 .0.0" ,
44 "author" : " xiejiahe" ,
55 "homepage" : " https://github.com/xjh22222228/nav" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ export function parseBookmark(
123123 const twoLevel : INavTwoProp = {
124124 id : ( id += 1 ) ,
125125 title,
126- icon : '' ,
126+ icon : getIcon ( titleEl ) ,
127127 nav : [ ] ,
128128 }
129129 parentData . nav . push ( twoLevel )
@@ -159,7 +159,7 @@ export function parseBookmark(
159159 const oneLevel : INavProps = {
160160 id : ( id += 1 ) ,
161161 title,
162- icon : '' ,
162+ icon : getIcon ( titleEl ) ,
163163 nav : [ ] ,
164164 }
165165 data . push ( oneLevel )
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ export async function getNavs() {
1818 if ( isSelfDevelop ) {
1919 return
2020 }
21- function finish ( dbData : any ) {
22- navs . set ( dbData )
21+ function finish ( navsData : INavProps [ ] ) {
22+ navs . set ( navsData )
2323 event . emit ( 'WEB_FINISH' )
2424 window . __FINISHED__ = true
2525 }
@@ -61,9 +61,9 @@ export async function getNavs() {
6161 }
6262
6363 try {
64- const dbData : any =
64+ const navsData : any =
6565 ( await localforage . getItem ( STORAGE_KEY_MAP . WEBSITE ) ) || data
66- finish ( dbData )
66+ finish ( navsData )
6767 } catch {
6868 finish ( data )
6969 }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export default class SystemBookmarkExportComponent {
5353 data . forEach ( ( item ) => {
5454 if ( item . title ) {
5555 for ( const k in item ) {
56- const keys = [ 'title' , 'nav' ]
56+ const keys = [ 'title' , 'nav' , 'icon' ]
5757 if ( ! keys . includes ( k ) ) {
5858 delete item [ k ]
5959 }
You can’t perform that action at this time.
0 commit comments