@zhibi/vue-auto-sizer
v1.0.0
Published
A Vue AutoSizer component clone by react-virtualized AutoSizer component.
Downloads
43
Maintainers
Readme
vue-auto-sizer
A Vue component that automatically adjusts the width and height of its children to fill the available space.Clone of react-virtualized-auto-sizer.
一个自动调整其子组件的宽度和高度以填充可用空间的Vue组件。react-virtualized-auto-sizer的复制版。
Install
npm install --save vue-auto-sizer
Usage
<template>
<div>
<vue-auto-sizer>
<template slot-scope="{ width, height }">
<div :style="{ width: width + 'px', height: height + 'px' }">
<div>Width: {{ width }}</div>
<div>Height: {{ height }}</div>
</div>
</template>
</vue-auto-sizer>
</div>
</template>
<script>
import VueAutoSizer from 'vue-auto-sizer'
export default {
components: {
VueAutoSizer
}
}
</script>
Documentation
Please see API documentation of "AutoSizer" in react-virtualized
package here.
License
MIT © bvaughn