Commit a248e20013d83c4acf01b45816588cd9cf4b8fbd
1 parent
ed40b333
chore: fix type
Showing
9 changed files
with
23 additions
and
24 deletions
src/components/CardList/src/CardList.vue
1 | 1 | <template> |
2 | 2 | <div class="p-2"> |
3 | - <div class="bg-white mb-2 p-4"> | |
3 | + <div class="p-4 mb-2 bg-white"> | |
4 | 4 | <BasicForm @register="registerForm" /> |
5 | 5 | </div> |
6 | 6 | {{ sliderProp.width }} |
7 | - <div class="bg-white p-2"> | |
7 | + <div class="p-2 bg-white"> | |
8 | 8 | <List |
9 | 9 | :grid="{ gutter: 5, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: grid }" |
10 | 10 | :data-source="data" |
... | ... | @@ -167,7 +167,7 @@ |
167 | 167 | pageSize.value = pz; |
168 | 168 | fetch(); |
169 | 169 | } |
170 | - function pageSizeChange(current, size) { | |
170 | + function pageSizeChange(_current, size) { | |
171 | 171 | pageSize.value = size; |
172 | 172 | fetch(); |
173 | 173 | } | ... | ... |
src/components/Form/src/hooks/useFormEvents.ts
src/components/Table/src/components/editable/EditableCell.vue
src/components/Tree/src/Tree.vue
... | ... | @@ -408,7 +408,7 @@ |
408 | 408 | <span class={unref(getBindValues)?.blockNode ? `${prefixCls}__content` : ''}> |
409 | 409 | <span>{title.substr(0, searchIdx)}</span> |
410 | 410 | <span style={highlightStyle}>{searchText}</span> |
411 | - <span>{title.substr(searchIdx + searchText.length)}</span> | |
411 | + <span>{title.substr(searchIdx + (searchText as string).length)}</span> | |
412 | 412 | </span> |
413 | 413 | ) : ( |
414 | 414 | title | ... | ... |
src/hooks/web/useCopyToClipboard.ts
src/layouts/default/setting/components/SettingFooter.vue
src/utils/file/download.ts
... | ... | @@ -36,22 +36,19 @@ export function downloadByBase64(buf: string, filename: string, mime?: string, b |
36 | 36 | export function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart) { |
37 | 37 | const blobData = typeof bom !== 'undefined' ? [bom, data] : [data]; |
38 | 38 | const blob = new Blob(blobData, { type: mime || 'application/octet-stream' }); |
39 | - if (typeof window.navigator.msSaveBlob !== 'undefined') { | |
40 | - window.navigator.msSaveBlob(blob, filename); | |
41 | - } else { | |
42 | - const blobURL = window.URL.createObjectURL(blob); | |
43 | - const tempLink = document.createElement('a'); | |
44 | - tempLink.style.display = 'none'; | |
45 | - tempLink.href = blobURL; | |
46 | - tempLink.setAttribute('download', filename); | |
47 | - if (typeof tempLink.download === 'undefined') { | |
48 | - tempLink.setAttribute('target', '_blank'); | |
49 | - } | |
50 | - document.body.appendChild(tempLink); | |
51 | - tempLink.click(); | |
52 | - document.body.removeChild(tempLink); | |
53 | - window.URL.revokeObjectURL(blobURL); | |
39 | + | |
40 | + const blobURL = window.URL.createObjectURL(blob); | |
41 | + const tempLink = document.createElement('a'); | |
42 | + tempLink.style.display = 'none'; | |
43 | + tempLink.href = blobURL; | |
44 | + tempLink.setAttribute('download', filename); | |
45 | + if (typeof tempLink.download === 'undefined') { | |
46 | + tempLink.setAttribute('target', '_blank'); | |
54 | 47 | } |
48 | + document.body.appendChild(tempLink); | |
49 | + tempLink.click(); | |
50 | + document.body.removeChild(tempLink); | |
51 | + window.URL.revokeObjectURL(blobURL); | |
55 | 52 | } |
56 | 53 | |
57 | 54 | /** | ... | ... |
src/utils/http/axios/Axios.ts
... | ... | @@ -81,6 +81,7 @@ export class VAxios { |
81 | 81 | this.axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => { |
82 | 82 | // If cancel repeat request is turned on, then cancel repeat request is prohibited |
83 | 83 | const { |
84 | + // @ts-ignore | |
84 | 85 | headers: { ignoreCancelToken }, |
85 | 86 | } = config; |
86 | 87 | |
... | ... | @@ -149,6 +150,7 @@ export class VAxios { |
149 | 150 | data: formData, |
150 | 151 | headers: { |
151 | 152 | 'Content-type': ContentTypeEnum.FORM_DATA, |
153 | + // @ts-ignore | |
152 | 154 | ignoreCancelToken: true, |
153 | 155 | }, |
154 | 156 | }); | ... | ... |
src/utils/http/axios/helper.ts