Using IViewUI's Split Component for Panel Division

Integrating IViewUI in Main Application

To incorporate IViewUI into your Vue project, include the following in your main.js file:

import iView from 'iview';
import 'iview/dist/styles/iview.css';

Vue.use(iView);

Implementing the Split Component

The following template demosntrates how to use the Split component to divide a layout into two resizable panels:

<template>
  <div class="demo-split">
    <Split v-model="splitPosition">
      <div slot="left" class="demo-split-pane">
        Left Panel Content
      </div>
      <div slot="right" class="demo-split-pane">
        Right Panel Content
      </div>
    </Split>
  </div>
</template>

<script>
export default {
  data() {
    return {
      splitPosition: 0.5
    };
  }
};
</script>

<style>
.demo-split {
  height: 200px;
  border: 1px solid #dcdee2;
}

.demo-split-pane {
  padding: 10px;
}
</style>

API Documentation

Props

Property Description Type Default
value Position of the panel; can be a percentage (0–1) or pixel value. Supports双向 binding via v-model. Number String
mode Orientation of the split. Options: horizontal or vertical. String horizontal
min Minimum size threshold. Number String
max Maximum size threshold. Number String

Events

Event Name Description Return Value
on-move-start Triggered when dragging begins. -
on-moving Triggered during dragging. event
on-move-end Triggered when dragging ends. -

Slots

Name Description
left Available when mode is horizontal, defines the left panel.
right Available when mode is horizontal, defines the right panel.
top Available when mode is vertical, defines the top panel.
bottom Available when mode is vertical, defines the bottom panel.
trigger Allows customization of the drag handle element.

Tags: iview vue split Component UI

Posted on Sat, 03 Oct 2026 16:03:45 +0000 by jefftanner