Skip to content

Commit

Permalink
perf: fs-page恢复回absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Oct 25, 2022
1 parent 87e475d commit d38f5ad
Showing 1 changed file with 33 additions and 41 deletions.
74 changes: 33 additions & 41 deletions packages/fast-crud/src/components/container/fs-page.vue
@@ -1,16 +1,14 @@
<template>
<div class="fs-page-container">
<div class="fs-page">
<div v-if="$slots.header != null" class="fs-page-header">
<slot name="header"></slot>
</div>
<div class="fs-page">
<div v-if="$slots.header != null" class="fs-page-header">
<slot name="header"></slot>
</div>

<div class="fs-page-content">
<slot></slot>
</div>
<div v-if="$slots.footer != null" class="fs-page-footer">
<slot name="footer"></slot>
</div>
<div class="fs-page-content">
<slot></slot>
</div>
<div v-if="$slots.footer != null" class="fs-page-footer">
<slot name="footer"></slot>
</div>
</div>
</template>
Expand All @@ -22,40 +20,34 @@ export default {
</script>

<style lang="less">
.fs-page-container {
.fs-page {
width: 100%;
height: 100%;
min-height: 300px;
position: relative;
.fs-page {
width: 100%;
top: 0;
bottom: 0;
position: absolute;
display: flex;
flex-direction: column;
top: 0;
bottom: 0;
position: absolute;
display: flex;
flex-direction: column;
.fs-page-header {
display: flex;
align-items: center;
border-bottom: 1px solid #ddd;
> .title {
flex: 1;
justify-self: flex-start;
padding: 18px;
font-size: 16px;
font-weight: bold;
color: #444;
}
> .more {
justify-self: flex-end;
margin-right: 18px;
}
}
.fs-page-content {
.fs-page-header {
display: flex;
align-items: center;
border-bottom: 1px solid #ddd;
> .title {
flex: 1;
overflow-y: auto;
justify-self: flex-start;
padding: 18px;
font-size: 16px;
font-weight: bold;
color: #444;
}
> .more {
justify-self: flex-end;
margin-right: 18px;
}
}
.fs-page-content {
flex: 1;
overflow-y: auto;
}
}
</style>

0 comments on commit d38f5ad

Please sign in to comment.