From ca43110d34f0777b02fe444d4e72dda37dcf3dd6 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Wed, 7 Apr 2021 19:35:51 +0800 Subject: [PATCH] fix --- README.md | 17 +++++++---------- index.ts | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e031807..a671989 100644 --- a/README.md +++ b/README.md @@ -77,10 +77,10 @@ VXETablePluginExportPDF.setup({ ref="xTable" height="600" :data="tableData"> - - - - + + + + ``` @@ -89,12 +89,9 @@ export default { data () { return { tableData: [ - { - id: 100, - name: 'test', - age: 26, - date: null - } + { id: 100, name: 'test', age: 26, date: null }, + { id: 101, name: 'test1', age: 30, date: null }, + { id: 102, name: 'test2', age: 34, date: null } ] } }, diff --git a/index.ts b/index.ts index 6d6b85f..1276991 100644 --- a/index.ts +++ b/index.ts @@ -195,7 +195,7 @@ export const VXETablePluginExportPDF = { } } -if (typeof window !== 'undefined' && window.VXETable) { +if (typeof window !== 'undefined' && window.VXETable && window.VXETable.use) { window.VXETable.use(VXETablePluginExportPDF) } diff --git a/package.json b/package.json index 111cb16..ea2f72b 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "prettier": "^2.1.2", "typescript": "^4.0.5", "vue": "^3.0.6", - "vxe-table": "^4.0.3", + "vxe-table": "^4.0.5", "xe-utils": "^3.1.11" }, "peerDependencies": {