Giter Site home page Giter Site logo

Comments (9)

vthinkxie avatar vthinkxie commented on May 7, 2024

please provide more detail

from ng-zorro-antd.

david1025 avatar david1025 commented on May 7, 2024

已更新

from ng-zorro-antd.

vthinkxie avatar vthinkxie commented on May 7, 2024

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() {
  }
}

2017-08-16 4 33 25

from ng-zorro-antd.

david1025 avatar david1025 commented on May 7, 2024

I'm so sorry, the right code should be

export class AppComponent implements OnInit {

  isCollapsed = true;

  constructor() {
  }

  ngOnInit() {
  }
}

from ng-zorro-antd.

vthinkxie avatar vthinkxie commented on May 7, 2024

@david1025 still works fine

from ng-zorro-antd.

david1025 avatar david1025 commented on May 7, 2024

thanks, I will check my code

from ng-zorro-antd.

vthinkxie avatar vthinkxie commented on May 7, 2024

related #74

from ng-zorro-antd.

vthinkxie avatar vthinkxie commented on May 7, 2024

@david1025
bug confirm , sorry for misunderstand your code. we will try to fix it next version.

from ng-zorro-antd.

lock avatar lock commented on May 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.