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": {