12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <template>
- <view
- :class="{
- 'zj-page-container': true,
- 'zj-page-container-row': direction === 'row',
- 'zj-page-container-column': direction === 'column'
- }"
- :style="{
- width: width,
- height: height
- }"
- >
- <slot></slot>
- </view>
- </template>
- <script>
- export default {
- name: 'ZjPageContainer',
- props: {
- width: {
- type: String,
- default: '100%'
- },
- height: {
- type: String,
- default: '100%'
- },
- direction: {
- type: String,
- default: 'column'
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .zj-page-container {
- display: flex;
- }
- .zj-page-container-row {
- flex-direction: row;
- }
- .zj-page-container-column {
- flex-direction: column;
- }
- </style>
|