Comments (9)
please provide more detail
from ng-zorro-antd.
已更新
from ng-zorro-antd.
This code works fine in my browser, please check if there is other css affect this style
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<nz-root>
<nz-layout>
<nz-sider nzCollapsible [(nzCollapsed)]="isCollapsed" [nzTrigger]="null" nzCollapseChange="onCollapseChange" >
<div class="logo"></div>
<ul nz-menu [nzTheme]="'dark'" [nzMode]="isCollapsed?'vertical':'inline'">
<li nz-submenu>
<span title><i class="anticon anticon-user"></i><span class="nav-text">菜单</span></span>
<ul>
<li nz-menu-item>Tom</li>
<li nz-menu-item>Bill</li>
<li nz-menu-item>Alex</li>
</ul>
</li>
<li nz-submenu>
<span title><i class="anticon anticon-team"></i><span class="nav-text">菜单</span></span>
<ul>
<li nz-menu-item>Team 1</li>
<li nz-menu-item>Team 2</li>
</ul>
</li>
<li nz-menu-item><span><i class="anticon anticon-file"></i><span class="nav-text">File</span></span></li>
</ul>
</nz-sider>
<nz-layout>
<nz-header style="background: #fff; padding:0;"></nz-header>
<nz-content style="margin:0 16px;">
<nz-breadcrumb style="margin:12px 0;">
<nz-breadcrumb-item>User</nz-breadcrumb-item>
<nz-breadcrumb-item>Bill</nz-breadcrumb-item>
</nz-breadcrumb>
<div style="padding:24px; background: #fff; min-height: 360px;">
Bill is a cat.
</div>
</nz-content>
<nz-footer style="text-align: center;">Ant Design ©2017 Implement By Angular</nz-footer>
</nz-layout>
</nz-layout>
</nz-root>
`,
styles : [
`:host ::ng-deep .logo {
height: 32px;
background: #333;
border-radius: 6px;
margin: 16px;
}
:host ::ng-deep .ant-layout-sider-collapsed .nav-text {
display: none;
}
:host ::ng-deep .ant-layout-sider-collapsed .ant-menu-submenu-title:after {
display: none;
}
:host ::ng-deep .ant-layout-sider-collapsed .anticon {
font-size: 16px;
margin-left: 8px;
}
`
]
})
export class AppComponent implements OnInit {
isCollapsed = false;
constructor() {
}
ngOnInit() {
}
}
from ng-zorro-antd.
I'm so sorry, the right code should be
export class AppComponent implements OnInit {
isCollapsed = true;
constructor() {
}
ngOnInit() {
}
}
from ng-zorro-antd.
@david1025 still works fine
from ng-zorro-antd.
thanks, I will check my code
from ng-zorro-antd.
related #74
from ng-zorro-antd.
@david1025
bug confirm , sorry for misunderstand your code. we will try to fix it next version.
from ng-zorro-antd.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
from ng-zorro-antd.
Related Issues (20)
- nz-anchor invalid query selector '?' HOT 1
- Theme Customization: Dark mode using css custom properties:
- Time Range Picker component not provider for angular. But for react it is provided
- 希望nz-tree暴露cdkVirtualScrollViewport的scrolledIndexChange事件 HOT 2
- arrow of edges disapper in nz-graph
- Borderless tag with status(eg: warning) HOT 1
- Optional floating input placeholders when input focused or not empty
- The nzOnChange event of the ColorPicker component will run twice
- select 支持全局配置 nzOptionHeightPx HOT 1
- Time picker in nz-date-picker does not respect nzFormat for time HOT 1
- 是否可以提供一个大数据UI风格的主题 HOT 1
- Docs issue: sometimes changing components not work HOT 1
- ng-zorro live website not working HOT 1
- <nz-list-item-action> not visible HOT 1
- nzLoading is not working with nz-card on v17.4.0 HOT 2
- nz-select with ngModel to initialize the selected value, the dropdown does not automatically scroll to the selected item if a scrollbar is present.
- Docs not working HOT 1
- What hapened with your site?
- Site doesn't work correctly HOT 5
- nzBackIcon in NzPageHeaderModule behaviour based on browser history
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-zorro-antd.