diff --git a/components/table/exportTable.ts b/components/table/exportTable.ts index 2d33f8445..74965947a 100644 --- a/components/table/exportTable.ts +++ b/components/table/exportTable.ts @@ -70,12 +70,15 @@ function pushTextContext(rows: string[], dom: HTMLElement, content: string | und export function download(content: string, filename: string) { if ((navigator as any).msSaveBlob) { // IE10+ - const blob = new Blob([content], { type: 'text/csv;charset=utf-8' }); + const blob = new Blob(['\uFEFF' + content], { type: 'text/csv;charset=utf-8' }); (navigator as any).msSaveBlob(blob, filename); } else { const link = document.createElement('a'); if ('download' in link) { - const blob = new Blob([content], { type: 'text/csv;charset=utf-8' }); + /** + * should add \uFEFF, otherwise it will be error codes in MSExcel + */ + const blob = new Blob(['\uFEFF' + content], { type: 'text/csv;charset=utf-8' }); const url = URL.createObjectURL(blob); link.setAttribute('href', url); link.setAttribute('download', filename); diff --git a/index.ts b/index.ts index 67ee16f92..80c5ea4bd 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,5 @@ /*! - * @king-design v3.1.4-beta.1 + * @king-design v3.1.4-beta.2 * * Copyright (c) Kingsoft Cloud * Released under the MIT License @@ -65,6 +65,6 @@ export * from './components/treeSelect'; export * from './components/upload'; export * from './components/wave'; -export const version = '3.1.4-beta.1'; +export const version = '3.1.4-beta.2'; /* generate end */ diff --git a/lerna.json b/lerna.json index b0667a674..da5854dd3 100644 --- a/lerna.json +++ b/lerna.json @@ -3,6 +3,6 @@ "./", "packages/*" ], - "version": "3.1.4-beta.1", + "version": "3.1.4-beta.2", "npmClient": "yarn" } diff --git a/package.json b/package.json index 607e05584..6b0feb90f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@king-design/intact", - "version": "3.1.4-beta.1", + "version": "3.1.4-beta.2", "description": "A component library written in Intact for Intact, Vue, React and Angular", "main": "es/index.js", "engines": { @@ -179,7 +179,7 @@ "dependencies": { "@babel/runtime-corejs3": "^7.16.0", "@emotion/css": "^11.5.0", - "@king-design/react": "^3.1.4-beta.1", + "@king-design/react": "^3.1.4-beta.2", "dayjs": "^1.10.7", "enquire.js": "^2.1.6", "intact": "^3.0.25", diff --git a/packages/kpc-react/package.json b/packages/kpc-react/package.json index 6fea013fb..6b3e3c724 100644 --- a/packages/kpc-react/package.json +++ b/packages/kpc-react/package.json @@ -1,6 +1,6 @@ { "name": "@king-design/react", - "version": "3.1.4-beta.1", + "version": "3.1.4-beta.2", "description": "King-Design UI components for React.", "keywords": [ "component", diff --git a/packages/kpc-vue-next/package.json b/packages/kpc-vue-next/package.json index be46b6ae1..3e78d249b 100644 --- a/packages/kpc-vue-next/package.json +++ b/packages/kpc-vue-next/package.json @@ -1,6 +1,6 @@ { "name": "@king-design/vue", - "version": "3.1.4-beta.1", + "version": "3.1.4-beta.2", "description": "King-Design UI components for Vue3.0.", "keywords": [ "component", diff --git a/packages/kpc-vue/package.json b/packages/kpc-vue/package.json index 9ba89bf89..d99cc65c2 100644 --- a/packages/kpc-vue/package.json +++ b/packages/kpc-vue/package.json @@ -1,6 +1,6 @@ { "name": "@king-design/vue-legacy", - "version": "3.1.4-beta.1", + "version": "3.1.4-beta.2", "description": "King-Design UI components for Vue2.0.", "keywords": [ "component",