@king-design/intact 3.1.4-beta.1 → 3.1.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,7 +112,13 @@ export class Dropdown<
112
112
  }
113
113
  }
114
114
 
115
- const [trigger, menu] = children as DropdownChildren;
115
+ let [trigger, menu] = children as DropdownChildren;
116
+ /**
117
+ * In vue-legacy, if the menu is TooltipContent, the menu will be InUsed when update,
118
+ * so we clone it here, #954
119
+ */
120
+ menu = directClone(menu);
121
+
116
122
  const props = this.initEventCallbacks();
117
123
  let {className, value, container} = this.get();
118
124
  const { k } = this.config;
@@ -70,12 +70,15 @@ function pushTextContext(rows: string[], dom: HTMLElement, content: string | und
70
70
 
71
71
  export function download(content: string, filename: string) {
72
72
  if ((navigator as any).msSaveBlob) { // IE10+
73
- const blob = new Blob([content], { type: 'text/csv;charset=utf-8' });
73
+ const blob = new Blob(['\uFEFF' + content], { type: 'text/csv;charset=utf-8' });
74
74
  (navigator as any).msSaveBlob(blob, filename);
75
75
  } else {
76
76
  const link = document.createElement('a');
77
77
  if ('download' in link) {
78
- const blob = new Blob([content], { type: 'text/csv;charset=utf-8' });
78
+ /**
79
+ * should add \uFEFF, otherwise it will be error codes in MSExcel
80
+ */
81
+ const blob = new Blob(['\uFEFF' + content], { type: 'text/csv;charset=utf-8' });
79
82
  const url = URL.createObjectURL(blob);
80
83
  link.setAttribute('href', url);
81
84
  link.setAttribute('download', filename);
Binary file