diff --git a/components/shell/__tests__/index-spec.js b/components/shell/__tests__/index-spec.js index 0ed1ca85a0..4f46967b41 100644 --- a/components/shell/__tests__/index-spec.js +++ b/components/shell/__tests__/index-spec.js @@ -389,5 +389,48 @@ describe('Shell', () => { }); assert(wrapper.find('.next-shell-header').length === 1); }); + + // issue: + it('should hidden menu & menu-items-icon in phone', () => { + const div = document.createElement('div'); + document.body.appendChild(div); + wrapper = mount( + + + + + +
+ + + + + + + + + + + + + , + {attachTo: div} + ); + const element = wrapper.find('.next-aside-navigation').at(0).instance(); + assert(element.offsetWidth === 0); + assert(window.getComputedStyle(element).overflow === 'hidden'); + }); }); }); diff --git a/components/shell/main.scss b/components/shell/main.scss index 6b9036bb06..3081ef21b0 100644 --- a/components/shell/main.scss +++ b/components/shell/main.scss @@ -576,6 +576,7 @@ &#{$shell-prefix}-collapse { width: 0; + overflow: hidden; } } #{$shell-prefix}-header #{$shell-prefix}-navigation {