深色模式
Frame 面板分割
可调整面板大小容器,将一片区域分割为可以拖拽调整宽度或高度的两个或多个区域。
基本用法
FramePane
FramePane
点击查看代码
vue
<template>
<s-frame style="height: 90px;">
<s-frame-pane style="background: #f2f6fc;">
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane style="background: #f2f6fc;">
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
纵向排列
FramePane
FramePane
点击查看代码
vue
<template>
<s-frame style="height: 150px;" vertical>
<s-frame-pane style="background: #f2f6fc;">
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane style="background: #f2f6fc;">
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
显示边框
FramePane
FramePane
点击查看代码
vue
<template>
<s-frame style="height: 90px;" border>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
可折叠面板
FramePane
FramePane
点击查看代码
vue
<template>
<s-frame style="height: 120px;" collapsible border>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
面板默认尺寸
FramePane
FramePane
点击查看代码
vue
<template>
<s-form :column="2" :labelWidth="120" showColon>
<s-form-item label="面板默认尺寸">
<el-slider v-model="framePaneDefaultSize" style="margin: 0 10px;" :min="50" :max="300" />
</s-form-item>
</s-form>
<s-frame style="height: 90px;" border>
<s-frame-pane :defaultSize="framePaneDefaultSize">
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
import { ref } from "vue";
const framePaneDefaultSize = ref<number>(150);
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
面板最小尺寸
FramePane
FramePane
点击查看代码
vue
<template>
<s-frame style="height: 90px;" border>
<s-frame-pane :minSize="100">
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
更多面板
FramePane
FramePane
FramePane
点击查看代码
vue
<template>
<s-frame style="height: 90px;" border>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
<s-frame-pane>
<div class="custom-frame-pane">FramePane</div>
</s-frame-pane>
</s-frame>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
.custom-frame-pane {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25