diff --git a/.gitignore b/.gitignore index 997c6eb..47bdecd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.history node_modules /dist package-lock.json diff --git a/gulpfile.js b/gulpfile.js index ffb48bc..f1067ce 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,6 +4,11 @@ const uglify = require('gulp-uglify') const babel = require('gulp-babel') const rename = require('gulp-rename') const replace = require('gulp-replace') +const dartSass = require('sass') +const gulpSass = require('gulp-sass') +const sass = gulpSass(dartSass) +const cleanCSS = require('gulp-clean-css') +const prefixer = require('gulp-autoprefixer') const sourcemaps = require('gulp-sourcemaps') const ts = require('gulp-typescript') const pack = require('./package.json') diff --git a/index.ts b/index.ts index a0f1ef5..decb736 100644 --- a/index.ts +++ b/index.ts @@ -59,7 +59,7 @@ function exportPDF (params: VxeGlobalInterceptorHandles.InterceptorExportParams) const { type, filename, isHeader, isFooter, original } = options const footList: { [key: string]: any }[] = [] const headers: any[] = columns.map((column) => { - const title = XEUtils.toValueString(original ? column.property : column.getTitle()) + const title = XEUtils.toValueString(original ? column.field : column.getTitle()) const width = column.renderWidth / ratio colWidth += width return { diff --git a/package.json b/package.json index 728d20f..503a41b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table-plugin-export-pdf", - "version": "3.0.3", + "version": "3.0.4", "description": "基于 vxe-table 的表格插件,支持导出 pdf 格式", "scripts": { "lib": "gulp build" @@ -36,23 +36,24 @@ "eslint-plugin-standard": "^4.0.2", "eslint-plugin-typescript": "^0.14.0", "gulp": "^4.0.2", - "gulp-autoprefixer": "^7.0.1", + "gulp-autoprefixer": "^8.0.0", "gulp-babel": "^8.0.0", "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.6.1", "gulp-rename": "^2.0.0", - "gulp-replace": "^1.0.0", - "gulp-sass": "^4.1.0", - "gulp-sourcemaps": "^2.6.5", + "gulp-replace": "^1.1.3", + "gulp-sass": "^5.1.0", + "gulp-sourcemaps": "^3.0.0", "gulp-typescript": "^5.0.1", "gulp-uglify": "^3.0.2", - "jspdf": "^2.1.1", + "jspdf": "^2.5.1", "markdown-doctest": "^1.1.0", "prettier": "^2.1.2", - "typescript": "^4.0.5", - "vue": "^3.2.14", - "vxe-table": "^4.0.28", - "xe-utils": "^3.4.0" + "sass": "^1.55.0", + "typescript": "^4.6.4", + "vue": "^3.2.39", + "vxe-table": "^4.3.5", + "xe-utils": "^3.5.6" }, "peerDependencies": { "vxe-table": "^4.0.27"