# vue-split-pane **Repository Path**: nymlc/vue-split-pane ## Basic Information - **Project Name**: vue-split-pane - **Description**: 处理下https://github.com/marshal-zheng/vue-split-pane.git的bug - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-02 - **Last Updated**: 2025-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Vue Split Pane A Vue 3 component for creating resizable split panes. This component allows you to easily create layouts with resizable panels, either horizontally or vertically. It supports various features such as initial size, minimum and maximum size constraints, and nested panes. See the example and associated code in [ExampleLayout](/example/example.js) [**[Demo](http://110.41.33.162:9005/) | [Changelog](/CHANGELOG.md) | [View Example](/example/example.js)**] ## Quick Start This package has two major exports: * [``](/lib/SplitPane.tsx): is used to create resizable panels within a layout. It supports both vertical and horizontal splits, allowing users to adjust the size of different sections of a page. * [``](/lib/Pane.tsx): is a part of the SplitPane layout system, representing an individual resizable panel. It supports both vertical and horizontal splits and allows for flexible sizing and styling. To quickly start using `@marsio/vue-split-pane`, follow the steps below: ### Step 1: Installation First, you need to install the package. Run the following command in your project directory: ```bash npm install @marsio/vue-split-pane ``` or if you prefer using Yarn: ```bash yarn add @marsio/vue-split-pane ``` or if you prefer using Pnpm: ```bash pnpm add @marsio/vue-split-pane ``` ### Step 2: Importing In your Vue component, import `@marsio/vue-split-pane`: ```javascript import SplitPane, { Pane } from '@marsio/vue-split-pane'; ``` ### Step 3: Using `@marsio/vue-split-pane` Now, you can use the `SplitPane` component in your Vue application ```vue ``` Or Hybrid ```vue ``` Or Nested ```vue ``` ### Step 4: Enjoy! That's it! You've successfully integrated split pane functionality into your Vue application. Customize it further according to your needs. #### `` Props: ```js // Determines if the pane is resizable. Default is true. allowResize: { type: Boolean, default: true }, // Size of the resizer in pixels. Default is 1. resizerSize: { type: Number, default: 1 }, // Direction of the split. Can be either 'vertical' or 'horizontal'. Default is 'vertical'. split: { type: String as PropType<"vertical" | "horizontal">, default: 'vertical' }, // Step size for resizing in pixels. Default is 1. step: { type: Number, default: 1 } ``` #### `` Props: ```js // The index of the pane. Typically used to identify the pane in a list. index: { type: Number as PropType }, // Custom CSS class for the pane. class: { type: String as PropType }, // Direction of the split. Can be either 'vertical' or 'horizontal'. split: { type: String as PropType<'vertical' | 'horizontal'> }, // Initial size of the pane. Can be a string (e.g., '50%') or a number (e.g., 200). initialSize: { type: [String, Number] as PropType, default: '1' }, // Minimum size of the pane. Can be a string (e.g., '10%') or a number (e.g., 100px). minSize: { type: String as PropType, default: '0' }, // Maximum size of the pane. Can be a string (e.g., '90%') or a number (e.g., 500px). maxSize: { type: String as PropType, default: '100%' }, // Current size of the pane. Can be a string (e.g., '50%') or a number (e.g., 200). size: { type: String as PropType }, // Reference to the inner element of the pane. Typically used for DOM manipulation. innerRef: { type: Function, default: () => () => {} }, // Size of the resizers in pixels. Default is 1. resizersSize: { type: Number, default: 1 } ``` ### Modern browsers. | [Edge](http://godban.github.io/browsers-support-badges/)
Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | | --- | --- | --- | --- | --- | | Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | ### Changelog. Detailed changes for each release are documented in the [release notes](CHANGELOG.md). ### Release checklist - Update CHANGELOG - `pnpm release` - `pnpm publish` ### License MIT