Skip to content

Commit

Permalink
feat: remove
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Jul 12, 2023
1 parent a91125b commit ef200ba
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ https://www.npmjs.com/package/quark-doc-header
该组件同时被被使用在:

- https://quarkc.hellobike.com
- https://vue-quarkdesign.hellobike.com
- https://react-quarkdesign.hellobike.com
- https://vanilla-quarkdesign.hellobike.com
- https://angular-quarkdesign.hellobike.com
- https://svelte-quarkdesign.hellobike.com
- https://vue-quarkd.hellobike.com
- https://react-quarkd.hellobike.com
- https://vanilla-quarkd.hellobike.com
- https://angular-quarkd.hellobike.com
- https://svelte-quarkd.hellobike.com

## 如何使用

Expand Down
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ let n = (C = class extends e {
appId: "EA4BY59U66",
apiKey: "5d1fd7c976a98a74421011f1374dd200"
};
location.host.indexOf("vue-quarkdesign") > -1 ? w({
location.host.indexOf("vue-quarkd") > -1 ? w({
...s,
indexName: localStorage.getItem("language") === "en-US" ? "ENDoc" : "CNDoc"
}) : location.host.indexOf("react-quarkdesign") > -1 && w({
}) : location.host.indexOf("react-quarkd") > -1 && w({
...s,
indexName: localStorage.getItem("language") === "en-US" ? "react-ENDoc" : "react-CNDoc"
}), this.from === "quarkc" ? (this._quarkcLogoSwitch(), this.githubUrl = "https://github.com/hellof2e/quark") : (this._quarkdLogoSwitch(), this.githubUrl = "https://github.com/hellof2e/quark-design"), window.addEventListener("hashchange", () => {
Expand All @@ -167,7 +167,7 @@ let n = (C = class extends e {
i(this, m) ? e.h(
"div",
{ className: "toper-message" },
e.h("a", { href: "https://vue-quarkdesign.hellobike.com" }, "文档更新中(不影响使用),可先参照 Vue 文档(Coming soon, The document is being updated, does not affect the use, you can refer to the Vue document first...)")
e.h("a", { href: "https://vue-quarkd.hellobike.com" }, "文档更新中(不影响使用),可先参照 Vue 文档(Coming soon, The document is being updated, does not affect the use, you can refer to the Vue document first...)")
) : null,
e.h(
"header",
Expand Down Expand Up @@ -247,7 +247,7 @@ let n = (C = class extends e {
e.h("p", { class: "menu-group-title" }, i(this, r).docsTitle),
i(this, r).stacks.map((t) => e.h(
"a",
{ key: t, class: "link menu-link", href: `https://${t}-quarkdesign.hellobike.com/#/${i(this, p) ? "zh-CN" : "en-US"}/component/button`, target: "_blank", rel: "noopener noreferrer" },
{ key: t, class: "link menu-link", href: `https://${t}-quarkd.hellobike.com/#/${i(this, p) ? "zh-CN" : "en-US"}/component/button`, target: "_blank", rel: "noopener noreferrer" },
t,
" ",
i(this, p) ? "文档" : "documentation",
Expand Down
4 changes: 2 additions & 2 deletions lib/index.umd.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions lib/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ declare class MyComponent extends QuarkElement {
guideUrl: string;
componentUrl: string;
activeNav: string;
searchRef: {
current: any;
};
searchRef: import("quarkc").Ref<any>;
constructor();
navActive: () => void;
componentDidMount(): void;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quark-doc-header",
"version": "0.3.29",
"version": "0.3.30",
"scripts": {
"dev": "npm run start",
"start": "vite --open",
Expand Down
12 changes: 6 additions & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class MyComponent extends QuarkElement {
super()
this.#isZhLang = localStorage.getItem("language") === "zh-CN"
this.#ecosystemLangs = this.#isZhLang ? langs["zh-CN"] : langs["en-US"]
this.#curHost = location.origin // e.g. https://vue-quarkdesign.hellobike.com
this.#curHost = location.origin // e.g. https://vue-quarkd.hellobike.com
this.#isDocNotReady = false
this.#isQuarkc = location.host.indexOf('quarkc.hellobike.com') > -1 ? true : false
this.#techName = location.hostname.split('-').length > 1 ? location.hostname.split('-')[0] : false
Expand Down Expand Up @@ -123,7 +123,7 @@ class MyComponent extends QuarkElement {
}

// 主页跳转地址
this.homeUrl = this.#curHost // e.g. https://vue-quarkdesign.hellobike.com
this.homeUrl = this.#curHost // e.g. https://vue-quarkd.hellobike.com
this.guideUrl = `${this.#curHost}/#/${localStorage.getItem("language")}/guide/quickstart`
this.componentUrl = `${this.#curHost}/#/${localStorage.getItem("language")}/component/button`

Expand All @@ -133,13 +133,13 @@ class MyComponent extends QuarkElement {
appId: "EA4BY59U66",
apiKey: "5d1fd7c976a98a74421011f1374dd200",
}
if(location.host.indexOf("vue-quarkdesign") > -1) {
if(location.host.indexOf("vue-quarkd") > -1) {
docsearch({
...params,
indexName:
localStorage.getItem("language") === "en-US" ? "ENDoc" : "CNDoc",
});
} else if(location.host.indexOf("react-quarkdesign") > -1) {
} else if(location.host.indexOf("react-quarkd") > -1) {
docsearch({
...params,
indexName:
Expand Down Expand Up @@ -208,7 +208,7 @@ class MyComponent extends QuarkElement {
{
this.#isDocNotReady ?
<div className="toper-message">
<a href="https://vue-quarkdesign.hellobike.com">文档更新中(不影响使用),可先参照 Vue 文档(Coming soon, The document is being updated, does not affect the use, you can refer to the Vue document first...)</a>
<a href="https://vue-quarkd.hellobike.com">文档更新中(不影响使用),可先参照 Vue 文档(Coming soon, The document is being updated, does not affect the use, you can refer to the Vue document first...)</a>
</div> : null
}
<header class="header">
Expand Down Expand Up @@ -281,7 +281,7 @@ class MyComponent extends QuarkElement {
<a
key={item}
class="link menu-link"
href={`https://${item}-quarkdesign.hellobike.com/#/${this.#isZhLang ? 'zh-CN' : 'en-US'}/component/button`}
href={`https://${item}-quarkd.hellobike.com/#/${this.#isZhLang ? 'zh-CN' : 'en-US'}/component/button`}
target="_blank"
rel="noopener noreferrer"
>
Expand Down

0 comments on commit ef200ba

Please sign in to comment.