forked from TDesignOteam/tdesign-web-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
112 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'tdesign-web-components/button'; | ||
import 'tdesign-web-components/icon'; | ||
import 'tdesign-web-components/menu'; | ||
|
||
import { Component, signal } from 'omi'; | ||
|
||
export default class CloseableSide extends Component { | ||
collapsed = signal(false); | ||
|
||
active = signal('0'); | ||
|
||
render() { | ||
return ( | ||
<t-menu | ||
value={this.active.value} | ||
collapsed={this.collapsed.value} | ||
onChange={(evt) => { | ||
this.active.value = evt.detail; | ||
}} | ||
> | ||
<span slot="logo">LOGO</span> | ||
<t-menu-item label="仪表盘" value="0" icon={<t-icon name="app" />} /> | ||
<t-menu-item label="资源列表" value="1" icon={<t-icon name="code" />} /> | ||
<t-menu-item label="调度平台" value="2" icon={<t-icon name="file" />} /> | ||
<t-menu-item label="精准监控" value="3" icon={<t-icon name="user" />} /> | ||
<t-menu-item label="根目录" value="4" icon={<t-icon name="rollback" />} /> | ||
<t-menu-item label="消息区" value="5" icon={<t-icon name="mail" />} /> | ||
<t-button | ||
slot="operations" | ||
variant="text" | ||
shape="square" | ||
icon={<t-icon name="view-list" />} | ||
onClick={() => { | ||
this.collapsed.value = !this.collapsed.value; | ||
}} | ||
/> | ||
</t-menu> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters