0.1.7 • Published 6 years ago
component-ztj v0.1.7
Project setup
yarn installCompiles and hot-reloads for development
yarn run serveCompiles and minifies for production
yarn run buildRun your tests
yarn run testLints and fixes files
yarn run lintCustomize configuration
示例App.vue
AppChart组件介绍
v-chart的部分图表进行了拓展,定义了部分样式,可以参照v-chart和echart进行配置
图表类型
pie, line, histogram, bar, ring
type
Type: `String`
Default: `'pie'`图表标题
titleText
Type: String
Default: ''
图例图标
可传参数circle, rect, roundRect, triangle, diamond, pin, arrow, none
legendIcon
Type: `String`
Default: `'circle'`图例设置
legendSetting
Type: `Object`
Default: `{}`
设置了一定默认值,设置此属性以在默认值上进行拓展,具体设置参考(https://echarts.baidu.com/option.html#legend)图表设置
chartSetting
Type: `Object`
Default: `{}`
设置了一定默认值,设置此属性以在默认值上进行拓展,具体设置参考(https://v-charts.js.org/#/props)图表标题样式设置
titleStyleSet
Type: `Object`
Default: `{}`
设置了一定默认值,设置此属性以在默认值上进行拓展,具体设置参考(https://echarts.baidu.com/option.html#title)AppTable组件介绍
对el-table进行了拓展,可以增加分页组件,可以自适应容器高度。可以对分页组件和表格组件进行配置,可以传入elementUi的事件。使用currentChange事件时需要进行区别,详情如下。
表格数据
tableData
Type: `Array`
Default: `[]`表格列
columns
Type: `Array`
Default: `[]`斑马纹样式
stripe
Type: `Boolean`
Default: `false`复选框
selectTable
Type: `Boolean`
Default: `false`序号
indexed
Type: `Boolean`
Default: `false`序号起点
indexStart
Type: `Number`
Default: `0`边框
border
Type: `Boolean`
Default: `false`超出隐藏并显示tip
showTooltip
Type: `Boolean`
Default: `Boolean`自动展开树形结构
isExpand
Type: `Boolean`
Default: `false`目标页码
currentPage
Type: `Number`
Default: `0`分页页长
pageSize
Type: `Number`
Default: `10`总数
total
Type: `Number`
Default: `0`分页组件设置
pagationSet
Type: `any`
Default: `false`传入一个Obj以进行设置,不传入则无分页组件
{
"pos":"topRight", //"topRight","topLeft","bottomRight",不传入则默认位置左下
"pageSizes":[10,20],//分页页长选择设置默认[10, 20, 30, 50, 100]
"small":false,//默认正常大小
"layout":"total, sizes, prev, pager, next, jumper",//默认渲染顺序
"background":false,//默认无背景
}分页组件currentChange事件回调
currentChangeP
Type: `any`
Default: `false`表格组件currentChange事件回调
currentChangeT
Type: `any`
Default: `false`