0.1.0 • Published 6 years ago

vue-layout-separator v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

vue-layout-separator

Installation

  //with yarn
  yarn add vue-layout-separator
  //with npm 
  npm install vue-layout-separator --save

Usage

Here's a quick example to get you started:

  // main.js
  import Vue from 'vue'
  import App from './App.vue'

  new Vue({
    render: h => h(App)
  }).$mount('#app')

 // App.vue
  <template>
  <div style="width:1000px; height:500px;">
    <separator>
      <separator-item :width="200"
                      :min-width="100">
        Content
      </separator-item>
    </separator>
  </div>
  </template>
  <script>
  import { Separator, SeparatorItem } from 'vue-layout-separator'
  import 'vue-layout-separator/dist/index.css'

  export default {
    name: 'app',
    components: {
      Separator,
      SeparatorItem
    }
  }
  </script>

Prpos

Separator:

nametypedefaultdescription
verticalBooleanfalsedirection of items.
widthString/Number100%container's width.
heightString/Number100%container's height.

SeparatorItem:

nametypedefaultdescription
widthString/Numberautoitem width(300, 10% or auto), works with parent's vertical with 'false'.
heightString/Numberautoitem height(same with width), works with parent's vertical width 'true'.
maxWidthNumber-item max width.
minWidthNumber34item min width.
maxHeightNumber-item max height.
minHeightNumber34item min height.
noresizeBooleanfalseevent 'resize' will not be triggered. if you do not need it, better to set 'true'.
resizeevent-Callback fired when the item size is changed.Signature: function(el) => void

Update

0.1.0

  • Added prop "vertical", "width", "height" in Container
  • Removed prop "direction" in Container

0.0.12

  • Added prop "noresize" in Item.

LICENSE

MIT

0.1.0

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago