Files
Gnalvin d720e5c31c feat(components): [splitter] new component (#20145)
* feat(components): [splitter] new component

* docs(components): [splitter] update docs

* feat(components): [splitter] add export ElSplitter ElSplitterPanel types

* feat(components): [splitter] support touch even

* Update docs/.vitepress/crowdin/en-US/pages/component.json

Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>

* docs: update

* docs: update

* chore: update docs & code

* chore: update docs & fix code type error

* fix: use slot show error

* refactor(components): [splitter] modify props use

* refactor(components): [splitter] use native event listener to drag

* fix(components): [splitter] panel bind attrs

* refactor: use `useOrderedChildren`

* chore: fix types

* feat: add icon

* chore: translate comments and add beta tag

* docs: add default-size api

* docs: remove demo lang="scss"

* refactor: remove default-size api

---------

Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com>
Co-authored-by: warmthsea <2586244885@qq.com>
Co-authored-by: Dsaquel <291874700n@gmail.com>
Co-authored-by: kooriookami <bingshuanglingluo@163.com>
2025-06-03 23:01:28 +08:00

42 lines
871 B
Vue

<template>
<el-switch
v-model="resizable"
active-text="enable"
inactive-text="disable"
inline-prompt
class="mb-2"
/>
<div
style="height: 250px; box-shadow: var(--el-border-color-light) 0px 0px 10px"
>
<el-splitter>
<el-splitter-panel>
<div class="demo-panel">1</div>
</el-splitter-panel>
<el-splitter-panel :resizable="resizable">
<div class="demo-panel">
drag {{ resizable ? 'enable' : 'disable' }}
</div>
</el-splitter-panel>
<el-splitter-panel>
<div class="demo-panel">3</div>
</el-splitter-panel>
</el-splitter>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const resizable = ref(false)
</script>
<style scoped>
.demo-panel {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>