2017-04-20 06:32:41 +00:00
|
|
|
<template>
|
2017-11-22 03:01:19 +00:00
|
|
|
<div class="components-container">
|
2017-12-29 08:07:42 +00:00
|
|
|
<code><strong>SplitPane</strong> If you've used
|
2019-04-11 01:42:44 +00:00
|
|
|
<a href="https://codepen.io/" target="_blank"> codepen</a>,
|
2017-12-29 08:07:42 +00:00
|
|
|
<a href="https://jsfiddle.net/" target="_blank"> jsfiddle </a>will not be unfamiliar.
|
2018-08-19 08:55:24 +00:00
|
|
|
<a href="https://github.com/PanJiaChen/vue-split-pane" target="_blank"> Github repository</a>
|
2017-11-22 03:01:19 +00:00
|
|
|
</code>
|
2018-08-19 08:55:24 +00:00
|
|
|
<split-pane split="vertical" @resize="resize">
|
2017-11-22 03:01:19 +00:00
|
|
|
<template slot="paneL">
|
2019-03-17 09:40:51 +00:00
|
|
|
<div class="left-container" />
|
2017-11-22 03:01:19 +00:00
|
|
|
</template>
|
|
|
|
<template slot="paneR">
|
|
|
|
<split-pane split="horizontal">
|
|
|
|
<template slot="paneL">
|
2019-03-17 09:40:51 +00:00
|
|
|
<div class="top-container" />
|
2017-11-22 03:01:19 +00:00
|
|
|
</template>
|
|
|
|
<template slot="paneR">
|
2019-03-17 09:40:51 +00:00
|
|
|
<div class="bottom-container" />
|
2017-11-22 03:01:19 +00:00
|
|
|
</template>
|
|
|
|
</split-pane>
|
|
|
|
</template>
|
|
|
|
</split-pane>
|
|
|
|
</div>
|
2017-04-20 06:32:41 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2017-08-23 03:39:16 +00:00
|
|
|
import splitPane from 'vue-splitpane'
|
2017-07-06 09:56:17 +00:00
|
|
|
|
2017-08-22 07:43:34 +00:00
|
|
|
export default {
|
2018-08-19 08:55:24 +00:00
|
|
|
name: 'SplitpaneDemo',
|
2017-08-22 07:43:34 +00:00
|
|
|
components: { splitPane },
|
|
|
|
methods: {
|
|
|
|
resize() {
|
|
|
|
console.log('resize')
|
2017-07-06 09:56:17 +00:00
|
|
|
}
|
2017-08-22 07:43:34 +00:00
|
|
|
}
|
|
|
|
}
|
2017-04-20 06:32:41 +00:00
|
|
|
</script>
|
2017-07-06 09:56:17 +00:00
|
|
|
|
2017-04-20 06:32:41 +00:00
|
|
|
<style scoped>
|
2018-03-20 09:21:39 +00:00
|
|
|
.components-container {
|
|
|
|
position: relative;
|
|
|
|
height: 100vh;
|
|
|
|
}
|
2017-04-20 06:32:41 +00:00
|
|
|
|
2018-03-20 09:21:39 +00:00
|
|
|
.left-container {
|
|
|
|
background-color: #F38181;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2017-04-20 06:32:41 +00:00
|
|
|
|
2018-03-20 09:21:39 +00:00
|
|
|
.right-container {
|
|
|
|
background-color: #FCE38A;
|
|
|
|
height: 200px;
|
|
|
|
}
|
2017-04-20 06:32:41 +00:00
|
|
|
|
2018-03-20 09:21:39 +00:00
|
|
|
.top-container {
|
|
|
|
background-color: #FCE38A;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2017-07-06 09:56:17 +00:00
|
|
|
|
2018-03-20 09:21:39 +00:00
|
|
|
.bottom-container {
|
|
|
|
width: 100%;
|
|
|
|
background-color: #95E1D3;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2017-04-20 06:32:41 +00:00
|
|
|
</style>
|