|
- import scroll from 'vue-seamless-scroll'
- export default {
- components: {
- scroll
- },
- data () {
- return {
- };
- },
- props: {
- width: {
- type: [String, Number],
- default: '100%'
- },
- height: {
- type: [String, Number],
- default: '100'
- },
- headers: {
- type: Array,
- default: function () {
- return ['表头1', '表头2', '表头3']
- }
- },
- data: {
- type: Array,
- default: function () {
- return [
- ['表头1', '表头2', '表头3'],
- ['表头1', '表头2', '表头3'],
- ['表头1', '表头2', '表头3'],
- ['表头1', '表头2', '表头3'],
- ['表头1', '表头2', '表头3'],
- ['表头1', '表头2', '表头3'],
- ['表头1', '表头2', '表头3'],
- ['表头11', '表头22', '表头33']
- ]
- }
- }
- },
- computed: {
- dataLength: function () {
- return this.dataList.length;
- },
- style: function () {
- return {
- height: this.height,
- width: this.width
- };
- },
- // 如果数据不足5条则不滚动
- swiperOption: function () {
- return {
- step: 0.4,
- limitMoveNum: 1,
- hoverStop: true,
- direction: 1,
- openWatch: true,
- singleHeight: 0,
- singleHeight: 0,
- waitTime: 1000
- }
- }
- },
- created () {
- },
- methods: {
- }
- };
|