0.1.7 • Published 4 years ago

cl-crud-export v0.1.7

Weekly downloads
14
License
ISC
Repository
-
Last release
4 years ago

cl-crud-export

依赖于 cl-crud,可导出当页表格的数据为Excel

Using npm

npm i cl-crud-export

Props

参数类型说明默认
filenameFunction, String导出文件名yyyy-MM-dd HH_mm_ss
autoWidthBoolean自动调节宽度true
bookTypeString类型xlsx
headerArray表头默认使用 table.columnlabel
fieldsArray字段默认使用 table.columnprop
dataFunction, Array数据默认使用 page 获取数据
maxExportLimitNumber最大导出条数,不传或者小于等于0为不限制0
sizeString按钮尺寸mini
disabledBoolean是否禁用false
typeString按钮类型default
plainBoolean按钮镂空false
roundBoolean按钮圆角false
circleBoolean按钮圆形false
iconString按钮图标null

Example

// 注入 

import Vue from 'vue'
import crud from 'cl-crud'
import ExportBtn from 'cl-crud-export'

Vue.use(crud, {
	components: {
		ExportBtn
	}
})
// 使用

// 方式一 
ctx.set('layout', [
	[..., 'export-btn'],
	...
])

// 方式二
ctx.set('layout', [
	[..., ({h}) => {
		return h('export-btn', {
			props: {
				maxExportLimit: 100
			}
		})
	}],
	...
])

// 方式三
ctx.set('layout', [
	[..., <export-btn maxExportLimit={100}>],
	...
])
0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago