diff --git a/packages/duoyun-ui/docs/zh/02-elements/README.md b/packages/duoyun-ui/docs/zh/02-elements/README.md index 682adee5..bab55df5 100644 --- a/packages/duoyun-ui/docs/zh/02-elements/README.md +++ b/packages/duoyun-ui/docs/zh/02-elements/README.md @@ -2,7 +2,7 @@ diff --git a/packages/duoyun-ui/package.json b/packages/duoyun-ui/package.json index af249097..2371999a 100644 --- a/packages/duoyun-ui/package.json +++ b/packages/duoyun-ui/package.json @@ -1,6 +1,6 @@ { "name": "duoyun-ui", - "version": "1.1.6", + "version": "1.1.7", "description": "A lightweight desktop UI component library, implemented using Gem", "keywords": [ "frontend", @@ -48,7 +48,7 @@ "elkjs": "^0.7.1" }, "peerDependencies": { - "@mantou/gem": "^1.7.2" + "@mantou/gem": "^1.7.6" }, "devDependencies": { "@esm-bundle/chai": "^4.3.4-fix.0", diff --git a/packages/gem-book/src/element/elements/404.ts b/packages/gem-book/src/element/elements/404.ts index 9a971d45..edfe6d23 100644 --- a/packages/gem-book/src/element/elements/404.ts +++ b/packages/gem-book/src/element/elements/404.ts @@ -7,6 +7,7 @@ import { selfI18n } from '../helper/i18n'; import { icons } from './icons'; import '@mantou/gem/elements/reflect'; +import '@mantou/gem/elements/title'; @customElement('gem-book-404') @connectStore(selfI18n.store) @@ -53,7 +54,7 @@ export class Meta extends GemElement { margin-right: 10px; } -

404 - Not found

+

Not Found

${noGithub ? '' : html` diff --git a/packages/gem-book/src/element/elements/icons.ts b/packages/gem-book/src/element/elements/icons.ts index de7a415a..d0ece9f9 100644 --- a/packages/gem-book/src/element/elements/icons.ts +++ b/packages/gem-book/src/element/elements/icons.ts @@ -1,6 +1,23 @@ import { raw } from '@mantou/gem'; export const icons = { + github: raw` + + + + `, + menu: raw` + + `, + close: raw` + + `, i18n: raw` ` : null} ${title} + ${icon ? html`` : null} + ${title} `; }; diff --git a/packages/gem-book/src/element/elements/nav.ts b/packages/gem-book/src/element/elements/nav.ts index dee9c51a..23d722f9 100644 --- a/packages/gem-book/src/element/elements/nav.ts +++ b/packages/gem-book/src/element/elements/nav.ts @@ -7,6 +7,7 @@ import { globalemitter, connectStore, boolattribute, + classMap, } from '@mantou/gem'; import { mediaQuery } from '@mantou/gem/helper/mediaquery'; @@ -16,6 +17,7 @@ import { capitalize, isSameOrigin } from '../lib/utils'; import { bookStore } from '../store'; import { icons } from './icons'; +import { sidebarStore, toggleSidebar } from './sidebar'; import '@mantou/gem/elements/link'; import '@mantou/gem/elements/use'; @@ -28,6 +30,7 @@ import './nav-logo'; */ @customElement('gem-book-nav') @connectStore(bookStore) +@connectStore(sidebarStore) export class Nav extends GemElement { @boolattribute logo: boolean; @@ -38,10 +41,8 @@ export class Nav extends GemElement { renderI18nSelect = () => { const { langList = [], lang } = bookStore; if (lang) { - const name = langList.find(({ code }) => code === lang)?.name; return html` -
- ${mediaQuery.isPhone ? '' : name || lang} +
this.i18nRef.element?.click()} .element=${icons.i18n}>