Commit 1a90ee6cb00520badd4d8b7d0bf27436ab747619

Authored by zhigang.li
1 parent cbba62ae

move dimensionMap from sider.vue to assist.js

Showing 2 changed files with 9 additions and 8 deletions   Show diff stats
src/components/layout/sider.vue
... ... @@ -15,15 +15,8 @@
15 15 </template>
16 16 <script>
17 17 import { on, off } from '../../utils/dom';
18   - import { oneOf } from '../../utils/assist';
  18 + import { oneOf, dimensionMap } from '../../utils/assist';
19 19 const prefixCls = 'ivu-layout-sider';
20   - const dimensionMap = {
21   - xs: '480px',
22   - sm: '768px',
23   - md: '992px',
24   - lg: '1200px',
25   - xl: '1600px',
26   - };
27 20 if (typeof window !== 'undefined') {
28 21 const matchMediaPolyfill = mediaQuery => {
29 22 return {
... ...
src/utils/assist.js
... ... @@ -278,3 +278,11 @@ export function removeClass(el, cls) {
278 278 el.className = trim(curClass);
279 279 }
280 280 }
  281 +
  282 +export const dimensionMap = {
  283 + xs: '480px',
  284 + sm: '768px',
  285 + md: '992px',
  286 + lg: '1200px',
  287 + xl: '1600px',
  288 +};
281 289 \ No newline at end of file
... ...