move dimensionMap from sider.vue to assist.js
This commit is contained in:
parent
cbba62aeda
commit
1a90ee6cb0
2 changed files with 9 additions and 8 deletions
|
@ -15,15 +15,8 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { on, off } from '../../utils/dom';
|
import { on, off } from '../../utils/dom';
|
||||||
import { oneOf } from '../../utils/assist';
|
import { oneOf, dimensionMap } from '../../utils/assist';
|
||||||
const prefixCls = 'ivu-layout-sider';
|
const prefixCls = 'ivu-layout-sider';
|
||||||
const dimensionMap = {
|
|
||||||
xs: '480px',
|
|
||||||
sm: '768px',
|
|
||||||
md: '992px',
|
|
||||||
lg: '1200px',
|
|
||||||
xl: '1600px',
|
|
||||||
};
|
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
const matchMediaPolyfill = mediaQuery => {
|
const matchMediaPolyfill = mediaQuery => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -278,3 +278,11 @@ export function removeClass(el, cls) {
|
||||||
el.className = trim(curClass);
|
el.className = trim(curClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const dimensionMap = {
|
||||||
|
xs: '480px',
|
||||||
|
sm: '768px',
|
||||||
|
md: '992px',
|
||||||
|
lg: '1200px',
|
||||||
|
xl: '1600px',
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue