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