Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ksc-fe/kpc
Browse files Browse the repository at this point in the history
  • Loading branch information
Javey committed Jan 25, 2024
2 parents 12d17f1 + e50fb53 commit d3cb7ae
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions components/table/exportTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"./",
"packages/*"
],
"version": "3.1.4-beta.1",
"version": "3.1.4-beta.2",
"npmClient": "yarn"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kpc-react/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kpc-vue-next/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kpc-vue/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit d3cb7ae

Please sign in to comment.