u
This commit is contained in:
1 parent
f572dce2f6
commit
e99a9fb274
356 files changed
+28877
-1055
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<script setup lang="ts">
|
||||
// 最基础:左右分栏。给了 defaultSize 的一侧固定,另一侧自动填充剩余空间
|
||||
import { ref } from 'vue'
|
||||
import { G3Splitter, G3SplitterPanel } from '@g3soft/ui'
|
||||
|
||||
const lastSizes = ref<number[]>([])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<G3Splitter
|
||||
style="height: 200px; border: 1px solid #d9d9d9; border-radius: 8px"
|
||||
@resize="(sizes: number[]) => (lastSizes = sizes)"
|
||||
>
|
||||
<G3SplitterPanel :default-size="240">
|
||||
<div class="pane">左侧 240px(可拖拽调整)</div>
|
||||
</G3SplitterPanel>
|
||||
<G3SplitterPanel>
|
||||
<div class="pane">右侧自动填充</div>
|
||||
</G3SplitterPanel>
|
||||
</G3Splitter>
|
||||
|
||||
<p style="margin: 8px 0 0; font-size: 12px; color: #6b7280">
|
||||
面板宽度:{{ lastSizes.join(' / ') || '(拖拽后显示)' }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.pane {
|
||||
padding: 16px;
|
||||
font-size: 13px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user