From a80a04deda6b03df0bc2a2b421b41b1b64a8fd85 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Thu, 11 Mar 2021 20:03:09 +0800 Subject: [PATCH] update --- .gitignore | 1 + README.md | 3 ++- depend.ts | 4 ---- gulpfile.js | 4 ++-- index.ts | 4 +--- package.json | 4 ++-- tsconfig.json | 3 +-- 7 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 depend.ts diff --git a/.gitignore b/.gitignore index 6238331..997c6eb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules /dist package-lock.json +yarn.lock # local env files .env.local diff --git a/README.md b/README.md index acaec65..c024b98 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # vxe-table-plugin-export-xlsx -[![gitee star](https://gitee.com/xuliangzhan_admin/vxe-table-plugin-export-xlsx/badge/star.svg?theme=dark)](https://gitee.com/xuliangzhan_admin/vxe-table-plugin-export-xlsx/stargazers) +[![gitee star](https://gitee.com/x-extends/vxe-table-plugin-export-xlsx/badge/star.svg?theme=dark)](https://gitee.com/x-extends/vxe-table-plugin-export-xlsx/stargazers) [![npm version](https://img.shields.io/npm/v/vxe-table-plugin-export-xlsx.svg?style=flat-square)](https://www.npmjs.com/package/vxe-table-plugin-export-xlsx) [![npm downloads](https://img.shields.io/npm/dm/vxe-table-plugin-export-xlsx.svg?style=flat-square)](http://npm-stat.com/charts.html?package=vxe-table-plugin-export-xlsx) [![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE) @@ -15,6 +15,7 @@ npm install xe-utils vxe-table vxe-table-plugin-export-xlsx exceljs ```javascript // ... +import VXETable from 'vxe-table' import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx' // ... diff --git a/depend.ts b/depend.ts deleted file mode 100644 index c38e278..0000000 --- a/depend.ts +++ /dev/null @@ -1,4 +0,0 @@ -import XEUtils from 'xe-utils/ctor' -import dependencies from 'vxe-table/lib/utils/dependencies' - -XEUtils.mixin(dependencies) diff --git a/gulpfile.js b/gulpfile.js index 921e14e..cf15080 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,7 +12,7 @@ const tsconfig = require('./tsconfig.json') const exportModuleName = 'VXETablePluginExportXLSX' gulp.task('build_commonjs', function () { - return gulp.src(['depend.ts', 'index.ts']) + return gulp.src(['index.ts']) .pipe(sourcemaps.init()) .pipe(ts(tsconfig.compilerOptions)) .pipe(babel({ @@ -27,7 +27,7 @@ gulp.task('build_commonjs', function () { }) gulp.task('build_umd', function () { - return gulp.src(['depend.ts', 'index.ts']) + return gulp.src(['index.ts']) .pipe(ts(tsconfig.compilerOptions)) .pipe(replace(`import XEUtils from 'xe-utils/ctor';`, `import XEUtils from 'xe-utils';`)) .pipe(babel({ diff --git a/index.ts b/index.ts index 354bd95..7686362 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,4 @@ -/* eslint-disable no-unused-vars */ -import XEUtils from 'xe-utils/ctor' +import XEUtils from 'xe-utils' import { VXETable, Table, @@ -10,7 +9,6 @@ import { ColumnAlign } from 'vxe-table/lib/vxe-table' import * as ExcelJS from 'exceljs' -/* eslint-enable no-unused-vars */ const defaultHeaderBackgroundColor = 'f8f8f9' const defaultCellFontColor = '606266' diff --git a/package.json b/package.json index 0c82e41..4a5f972 100644 --- a/package.json +++ b/package.json @@ -50,10 +50,10 @@ "typescript": "^4.0.5", "vue": "^2.6.12", "vxe-table": "^2.10.0", - "xe-utils": "^3.0.4" + "xe-utils": "^3.1.11" }, "peerDependencies": { - "vxe-table": ">= 2.10" + "vxe-table": "^2.10.0" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index 20c1921..930ecd6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,7 @@ { "files": [ "index.d.ts", - "index.ts", - "depend.ts" + "index.ts" ], "compilerOptions": { "strict": true,