dv-scroll-board vue

1、npm安装 npm install @jiaminghi/data-view
2、main.js引入
import DataV from ‘@jiaminghi/data-view’
Vue.use(DataV)

 <dv-scroll-board :config="config" @click="boardClick" style="width: 100%; height: 200px" />
<script>
export default {
  data() {
    return {
      config: {
        indexHeader: "序号",
        oddRowBGC: "green", // 奇数行背景色
        evenRowBGC: "#000", // 偶数行背景色
        headerBGC: "#eb5a6d", // 表头背景色
        header: ["各省名称", "活动内容"],
        rowNum: 5, // 表行数
        headerHeight: 50,
        columnWidth: [280],
        waitTime: 1500, // 轮播时间间隔(ms)
        align: ["center", "center"],
        data: [
          ["<span style='cursor:pointer'>上海市</span>", 1111],
          ["<span style='cursor:pointer'>北京市</span>", "伟大的劳动人民"],
          ["<span style='cursor:pointer'>广西壮族自治区</span>", 9098],
          ["<span style='cursor:pointer'>广东省</span>", 8909099],
          [
            "<span style='cursor:pointer'>东北三省</span>",
            "<span style='color:yellow'>吉林省、黑龙江省、辽宁省</span>",
          ],
          ["<span style='cursor:pointer'>省略...</span>", "有很多活动写不完"],
        ],
      },
    };
  },
  methods: {
    boardClick(rows) {
      console.log(rows);
    },
  },
};
</script>

官网:DataV

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值