Skip to content
Promote Your Product

Layout

💡 Component: my-layout

Layout component. Global component, no additional dynamic import needed.

Use when the table needs to be fullscreen. The fullscreen element needs to add class="my-fill".

MyLayout Basic Usage

<my-layout>
  <el-card class="my-query-box mt8" shadow="never" :body-style="{ paddingBottom: '0' }">
    ...
  </el-card>
  <el-card class="my-fill mt8" shadow="never">
    ...
  </el-card>
</my-layout>

💡 Component: my-split-panes

Pane splitter component. Use when the interface needs a split layout.

Local import

import { defineAsyncComponent } from 'vue'
const MySplitPanes = defineAsyncComponent(() => import('/@/components/my-layout/split-panes.vue'))

MySplitPanes Basic Usage

Left-right layout

<MySplitPanes>
  <pane size="50" min-size="30" max-size="70">
  </pane>
  <pane>
  </pane>
</MySplitPanes>

MySplitPanes Props

PropDescriptionTypeDefaultAccepted Values
horizontalHorizontal layout, otherwise verticalBooleanfalse-
push-other-panesOther panes will be pushed accordinglyBooleantrue-
dbl-click-splitterDouble-clicking the splitter will maximize or restore the adjacent paneBooleantrue-
rtlLayout will be arranged from right to leftBooleanfalse-
first-splitterThe first splitter will be activated, allowing pane size adjustment from the startBooleanfalse-

MySplitPanes Events

EventDescriptionReturn Parameter
readyTriggered when MySplitPanes is ready
resizeResizingArray of all pane objects and their sizes
resizedDrag endedArray of all pane objects and their sizes
pane-clickPane clickedClicked pane object and its size
pane-maximizePane maximizedMaximized pane object and its size
pane-addPane addedIndex of the added pane and the resized new pane array
pane-removePane removedRemoved pane and all remaining pane objects with their sizes
splitter-clickSplitter clickedNext pane object (with size) immediately after the clicked splitter

Pane Props

PropDescriptionTypeDefaultAccepted Values
sizeSize[Number, String]--
minSizeMinimum size[Number, String]0-
maxSizeMaximum size[Number, String]100-