Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Jun 8, 2023
1 parent a349763 commit a57bb25
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,22 @@ button {
box-shadow: var(--docsearch-searchbox-shadow);
color: var(--docsearch-text-color);
outline: none;
}


.toper-message {
background-color: #000000;
text-align: center;
line-height: 30px;
font-size: 13px;
color: #fff;
}

.toper-message a {
color: #fff;
opacity: .85;
}

.toper-message a:hover {
opacity: 1;
}
13 changes: 12 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class MyComponent extends QuarkElement {
#ecosystemLangs
#curHost
#isQuarkc
#isDocNotReady

// 响应式内部状态
@state() // logo
Expand Down Expand Up @@ -88,8 +89,12 @@ class MyComponent extends QuarkElement {
this.#ecosystemLangs = this.#isZhLang ? langs["zh-CN"] : langs["en-US"]
this.#curHost = `https://${location.host}` // e.g. https://vue-quarkdesign.hellobike.com
this.#isQuarkc = ~location.host.indexOf('quark.hellobike.com') // 是否是 quarkc
}
this.#isDocNotReady = false

if(~['vanilla', 'angular', 'svelte'].indexOf(location.host.split('-')[0])) {
this.#isDocNotReady = true
}
}

componentDidMount(): void {
// 默认设置语言
Expand Down Expand Up @@ -175,6 +180,12 @@ class MyComponent extends QuarkElement {
render() {
return (
<Fragment>
{
this.#isDocNotReady ?
<div className="toper-message">
<a href="https://vue-quarkdesign.hellobike.com">文档更新中,可先参照 Vue 文档(Coming soon...)</a>
</div> : null
}
<header class="header">
<div>
<div class="container">
Expand Down

0 comments on commit a57bb25

Please sign in to comment.