From 6101460370627338c82bdc88f0e817bcfa07c830 Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Thu, 17 Feb 2022 13:43:41 +0800 Subject: [PATCH] fix(components): [draggable-modal] close after route switch --- .browserslistrc | 1 + package.json | 48 +- src/components/basic/excel/index.ts | 2 +- .../basic/excel/src/Export2Excel.ts | 4 +- .../basic/excel/src/ImportExcel.vue | 17 +- src/components/core/draggable-modal/index.vue | 4 + src/utils/Export2Excel.js | 14 +- yarn.lock | 811 ++++++++++-------- 8 files changed, 484 insertions(+), 417 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index dc3bc09a2..b133c4970 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -2,3 +2,4 @@ last 2 versions not dead not ie 11 +chrome 79 diff --git a/package.json b/package.json index de10a207a..860999087 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ }, "dependencies": { "@ant-design/icons-vue": "^6.0.1", - "@vueuse/core": "^7.5.5", + "@vueuse/core": "^7.6.2", "ant-design-vue": "3.0.0-beta.9", - "axios": "^0.25.0", - "core-js": "^3.21.0", + "axios": "^0.26.0", + "core-js": "^3.21.1", "dayjs": "^1.10.7", "file-saver": "^2.0.5", "lodash-es": "^4.17.21", @@ -41,47 +41,47 @@ "qs": "^6.10.3", "socket.io-client": "4.4.1", "sortablejs": "^1.14.0", - "vue": "^3.2.29", + "vue": "^3.2.31", "vue-i18n": "^9.2.0-beta.30", "vue-router": "^4.0.12", - "xlsx": "^0.18.0" + "xlsx": "^0.18.2" }, "devDependencies": { - "@commitlint/cli": "^16.1.0", - "@commitlint/config-conventional": "^16.0.0", - "@types/lodash-es": "^4.17.5", - "@types/node": "^17.0.14", + "@commitlint/cli": "^16.2.1", + "@commitlint/config-conventional": "^16.2.1", + "@types/lodash-es": "^4.17.6", + "@types/node": "^17.0.18", "@types/webpack-env": "^1.16.3", - "@typescript-eslint/eslint-plugin": "^5.10.2", - "@typescript-eslint/parser": "^5.10.2", - "@vue/cli-plugin-babel": "^5.0.0-rc.2", - "@vue/cli-plugin-eslint": "^5.0.0-rc.2", - "@vue/cli-plugin-router": "^5.0.0-rc.2", - "@vue/cli-plugin-typescript": "^5.0.0-rc.2", - "@vue/cli-plugin-vuex": "^5.0.0-rc.2", - "@vue/cli-service": "^5.0.0-rc.2", - "@vue/compiler-sfc": "^3.2.29", + "@typescript-eslint/eslint-plugin": "^5.12.0", + "@typescript-eslint/parser": "^5.12.0", + "@vue/cli-plugin-babel": "^5.0.0-rc.3", + "@vue/cli-plugin-eslint": "^5.0.0-rc.3", + "@vue/cli-plugin-router": "^5.0.0-rc.3", + "@vue/cli-plugin-typescript": "^5.0.0-rc.3", + "@vue/cli-plugin-vuex": "^5.0.0-rc.3", + "@vue/cli-service": "^5.0.0-rc.3", + "@vue/compiler-sfc": "^3.2.31", "@vue/eslint-config-typescript": "^10.0.0", "babel-plugin-import": "^1.13.3", "commitizen": "^4.2.4", "compression-webpack-plugin": "^9.2.0", "conventional-changelog-cli": "^2.2.2", - "eslint": "^8.8.0", + "eslint": "^8.9.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-vue": "^8.4.0", + "eslint-plugin-vue": "^8.4.1", "husky": "^7.0.4", "less": "^4.1.2", "less-loader": "10.2.0", - "lint-staged": "^12.3.3", + "lint-staged": "^12.3.4", "path-browserify": "^1.0.1", "postcss-html": "^1.3.0", "prettier": "^2.5.1", - "stylelint": "^14.3.0", + "stylelint": "^14.5.1", "stylelint-config-html": "^1.0.0", "stylelint-config-prettier": "^9.0.3", - "stylelint-config-recommended": "^6.0.0", - "stylelint-config-standard": "^24.0.0", + "stylelint-config-recommended": "^7.0.0", + "stylelint-config-standard": "^25.0.0", "stylelint-order": "^5.0.0", "svg-sprite-loader": "^6.0.11", "typescript": "^4.5.5", diff --git a/src/components/basic/excel/index.ts b/src/components/basic/excel/index.ts index 58bcae06f..563f5c80a 100644 --- a/src/components/basic/excel/index.ts +++ b/src/components/basic/excel/index.ts @@ -5,4 +5,4 @@ export { useExportExcelModal } from './src/ExportExcelModal'; export const ImpExcel = withInstall(impExcel); // export const ExpExcelModal = withInstall(expExcelModal); export * from './src/typing'; -export { jsonToSheetXlsx, aoaToSheetXlsx } from './src/Export2Excel'; +export * from './src/Export2Excel'; diff --git a/src/components/basic/excel/src/Export2Excel.ts b/src/components/basic/excel/src/Export2Excel.ts index 24f7f1cf0..c352c78e0 100644 --- a/src/components/basic/excel/src/Export2Excel.ts +++ b/src/components/basic/excel/src/Export2Excel.ts @@ -1,9 +1,7 @@ -import xlsx from 'xlsx'; +import { utils, writeFile } from 'xlsx'; import type { WorkBook } from 'xlsx'; import type { JsonToSheet, AoAToSheet } from './typing'; -const { utils, writeFile } = xlsx; - const DEF_FILE_NAME = 'excel-list.xlsx'; export function jsonToSheetXlsx({ diff --git a/src/components/basic/excel/src/ImportExcel.vue b/src/components/basic/excel/src/ImportExcel.vue index 7a741d9c8..d8b38f9c7 100644 --- a/src/components/basic/excel/src/ImportExcel.vue +++ b/src/components/basic/excel/src/ImportExcel.vue @@ -14,7 +14,8 @@