0.1.4 • Published 1 year ago

vue3-scroll-table v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vue3-scroll-table

模拟 Element 的 table 组件,添加了滚动功能

Demo: https://namewjp.github.io/vue3-scroll-table/

开始使用

安装

npm install -S vue3-scroll-table

全局注册

import vue3ScrollTable from 'vue3-scroll-table';
import 'vue3-scroll-table/dist/index.css';

app.use(vue3ScrollTable);

使用

<template>
  <scroll-table :data="tableData" hoverStop :height="200">
    <scroll-table-column prop="date" label="日期" />
    <scroll-table-column prop="name" label="姓名" />
    <scroll-table-column prop="address" label="地址" />
  </scroll-table>
</template>

API

ScrollTable

属性

名称类型描述默认值必填
dataDefaultRow[]表格数据[]
heightnumbertable 高,默认不滚动-
intervalnumber滚动间隔2
transitionnumber滚动过渡时间1
hoverStopbooleanhover 状态下是否停止滚动false
showHeaderboolean是否显示头部true
scrollCountnumber滚动个数1

事件

名称描述参数
click点击行回调row, column, event

ScrollTableColumn

属性

名称类型描述默认值必填
labelstring列名称-
propstring对应列内容的字段名-
widthstring/number列宽-

本地开发调试

  1. 在根目录依次执行
# 安装依赖
npm ci

# 实时编译代码
npm run dev
  1. 进入 example 目录依次执行
# 安装依赖
npm ci 

# 实时编译代码
npm run dev

此时,修改 根目录 或者 example目录 的任何代码都会导致项目重新打包构建。

0.1.4

1 year ago

0.1.3

1 year ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago