2.1.0 • Published 11 months ago

vue-page-split v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Vue Page Split

Resizable splitted panels based on Vue2.

Vue3 Version

English | 简体中文

📦 Install

$ npm i vue-page-split -S

🔨 Usage

How to use in Vue project.

<template>
  <SplitPane
    :distribute="0.5"
    :lineThickness="6"
    :isVertical="false"
    @resizeLineStartMove="onresizeLineStartMove"
    @resizeLineMove="onResizeLineMove"
    @resizeLineEndMove="onresizeLineEndMove"
  >
    <template v-slot:first>
      <h1>A</h1>
    </template>
    <template v-slot:second>
      <h1>B</h1>
    </template>
  </SplitPane>
</template>
<script>
import PageSplit from "vue-page-split";

export default {
  components: {
    SplitPane
  },
  methods: {
    onresizeLineStartMove: function() {
      console.log("onresizeLineStartMove");
    },
    onResizeLineMove: function(e) {
      console.log("onResizeLineMove :>> ", e);
    },
    onresizeLineEndMove: function() {
      console.log("onresizeLineEndMove");
    }
  }
};
</script>

🔠 Properties

Property nametypeDefault valueDescription
distributeNumber0.5Panel ratio, between 0 and 1.
isVerticalBooleantrueSplit mode(true means vertical incision, otherwise horizontal incision).
lineThicknessNumber6Width of the split line.
hasLineTipBooleantrueThere are three short lines inside the split line or not.
backgroundColorString"#a0cfff"Background color of the split line.
hoverColorString"#409eff"Background color of the split line when mouse hovers over.
hasBoxShadowBooleantrueSplit line has box-shadow style or not.
firstMinValueNumber0Width of the first partition, must >= 0.
secondMinValueNumber0Width of the second partition, must >= 0.
isFirstComponentMaskedBooleanfalseIf there is transparent mask layer covered over the the first partition.
isSecondComponentMaskedBooleanfalseIf there is transparent mask layer covered over the the second partition.

Tip: Component Mask is for capturing mouse event.
It is necessary when there is an iframe inside the page, because iframe will hide the mouse event from the page.

🎺 Events

This component will trigger three events.

Event nameDescriptionReturn type
resizeLineStartMovestart move-
resizeLineMovemovingevent object
resizeLineEndMovefinish move-

📷 Sample Pictures

In case of missing sample pictures, please go to the Homepage or Repository and check.

GIF 1 GIF 2

2.0.3

12 months ago

2.0.2

12 months ago

2.1.0

11 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.2

2 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago