Files
mes-ui-d2/static/md/组件 - 页面容器.md
liyang 8cc55e1bf7 no message
Former-commit-id: afef3af60139bd559aa150052fc3a72ec2f384a4
Former-commit-id: e2b324d8476ca2a52c625f2aee16972708a43bec
Former-commit-id: ab3a3d9097c684c0fb1b54b1a5f228157b2f81ff
2018-06-10 08:39:06 +08:00

36 lines
847 B
Markdown

页面容器组件是每个页面的基础,为了在整个项目中统一效果,它应该是 `<template>` 组件的直接子组件
## 参数
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| type | 容器类型 | 非 | String | card ghost card-full | card |
| responsive | 响应式宽度 | 非 | Boolean | | false |
> `responsive` 参数设置只在 `type` 等于 `card` 或 `ghost` 时生效
## 使用方法
一个基础单文件页面组件的示例
```
<template>
<d2-container>
<template slot="header">
可选的 header 内容 ...
</template>
主体内容 ...
</d2-container>
</template>
<script>
export default {
name: 'your-component-name'
}
</script>
<style lang="scss">
// 需要的话引入
@import '~@/assets/style/public.scss';
</style>
```