<style lang="scss">
.kc-layout-single{
	margin-bottom: 50px;
	color: #fff;
	text-align: center;
	
	.layout-header,.layout-footer{
		background: #7cbce9;
		color: #fff;
	}
	.layout-sider{
		background: #3a9fe8;
		min-height: 120px;
		line-height: 120px;
	}
}
</style>
<script>
export default {
    data () {
        return {
            isCollapsed: false
        };
    },
    methods: {
        toggleCollapse () {
            this.$refs.side.toggleCollapse();
        },
        change () {
            this.isCollapsed = !this.isCollapsed;
        },
        changed (res) {
            console.log(res)
        }
    },
    watch: {
        isCollapsed (val) {
            // console.log(val)
        }
    }
};


</script>
## Layout 布局
-----------------------

协助进行页面级整体布局。

### 基础用法
:::demo
```html
<div class="kc-layout-single">
	<kc-layout>
    	<kc-header class="layout-header">Header</kc-header>
		<kc-content>Content</kc-content>
    	<kc-footer class="layout-footer">Footer</kc-footer>
    </kc-layout>
</div>

<div class="kc-layout-single">
	<kc-layout>
    	<kc-header class="layout-header">Header</kc-header>
    	<kc-layout>
    		<kc-sider :reverse-arrow="true" hide-trigger class="layout-sider">Sider</kc-sider>
    		<kc-content>Content</kc-content>
    	</kc-layout>
    	<kc-footer class="layout-footer">Footer</kc-footer>
    </kc-layout>
</div>

<div class="kc-layout-single">
 	<kc-layout>
     	<kc-header class="layout-header">Header</kc-header>
     	<kc-layout>
     		<kc-content>Content</kc-content>
     		<kc-sider hide-trigger class="layout-sider">Sider</kc-sider>
     	</kc-layout>
     	<kc-footer class="layout-footer">Footer</kc-footer>
    </kc-layout>
</div>
 
<div class="kc-layout-single">
   <kc-layout>
   	<kc-sider hide-trigger class="layout-sider" style="line-height: 253px">Sider</kc-sider>
   	<kc-layout>
   		<kc-header class="layout-header">Header</kc-header>
   		<kc-content>Content</kc-content>
   		<kc-footer class="layout-footer">Footer</kc-footer>
   	</kc-layout>
   </kc-layout>    
</div>

<style lang="scss">
.kc-layout-single{
	margin-bottom: 50px;
	color: #fff;
	text-align: center;
	
	.layout-header,.layout-footer{
		background: #7cbce9;
		color: #fff;
	}
	.layout-sider{
		background: #3a9fe8;
		min-height: 120px;
		line-height: 120px;
	}
}
</style>
```
:::

 ### Sider props
| 属性      | 说明    | 类型      | 默认值   |
|---------- |-------- |---------- |------- |
| breakpoint     | 触发响应式布局的断点，可选值为xs,sm,md,lg,xl或xxl，若不设此属性则不会触发响应式布局。  | string  |  — |
| value     | 侧边栏是否收起，可使用 v-model 双向绑定数据。 | Boolean | false |
| width  | 宽度 | Number | 200 |
| collapsible     | 是否可收起，设为false后，默认触发器会隐藏，且响应式布局不会触发  | Boolean  |  false |
| collapsed-width     | 收缩宽度，设置为 0 会出现特殊 trigger。 | Number | 64 |
| hide-trigger  | 隐藏默认触发器 | Boolean  |  false |
| default-collapsed | 是否默认收起，设置了collapsible后设置此属性侧边栏仍会收起 | Boolean  |  false |
| reverse-arrow | 改变侧边栏触发器箭头方向，和改变侧边栏收起方向，当Sider在右边时可以使用。| Boolean  |  false |
 ### Sider events
| 事件名      | 说明    | 返回值      |
|---------- |-------- |---------- |
| on-collapse | 展开-收起时的回调| true / false |
 ### Sider slot
 | 名称      | 说明    |
 |---------- |-------- |
 |trigger | 自定义触发器|
 
 ### Sider methods
 
 | 方法名      | 说明    |
 |---------- |-------- |
 |toggleCollapse | 改变Sider展开-收起状态。|
 
 ### breakpoint width
 ```json
	{
		xs: '480px',
		sm: '768px',
		md: '992px',
		lg: '1200px',
		xl: '1600px'
    }
```
