vue-self-adaption-view
v1.0.3
Published
vue自适应视图容器
Downloads
10
Readme
vue-self-adaption-view
self-adaption-view
Installation
npm install vue-self-adaption-view
import
import SelfAdaptionView from 'vue-self-adaption-view'
export default {
name: 'app',
components: {
SelfAdaptionView
},
data() {
return {
list: [1, 2, 3, 4, 5, 6, 7],
minWidth: 300,
width: 144,
paginationColor: 'red',
}
},
}
Use in template
<self-adaption-view
:list="list"
:minWidth="minWidth"
:paginationColor="paginationColor"
:width="width">
<template slot="source" slot-scope="{ source }">
</template>
</self-adaption-view>
Options
| Name | Description | type | default | require | | :---------- | :-------------------------------- | :----: | :------: | :----: | | backgroundColor | background color | String | #ffffff | false | | paginationColor | Page button color | String | #000000 | false | | list | data source | Array | | true | | width | the width of a single element | Number | | true | | min-width | the minimum width of the container| Number | | true |