vben
2021-10-26 a248e20013d83c4acf01b45816588cd9cf4b8fbd
chore: fix type
9个文件已修改
47 ■■■■ 已修改文件
src/components/CardList/src/CardList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Form/src/hooks/useFormEvents.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/src/components/editable/EditableCell.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Tree/src/Tree.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/web/useCopyToClipboard.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/default/setting/components/SettingFooter.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/file/download.ts 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/http/axios/Axios.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/http/axios/helper.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/CardList/src/CardList.vue
@@ -1,10 +1,10 @@
<template>
  <div class="p-2">
    <div class="bg-white mb-2 p-4">
    <div class="p-4 mb-2 bg-white">
      <BasicForm @register="registerForm" />
    </div>
    {{ sliderProp.width }}
    <div class="bg-white p-2">
    <div class="p-2 bg-white">
      <List
        :grid="{ gutter: 5, xs: 1, sm: 2, md: 4, lg: 4, xl: 6, xxl: grid }"
        :data-source="data"
@@ -167,7 +167,7 @@
    pageSize.value = pz;
    fetch();
  }
  function pageSizeChange(current, size) {
  function pageSizeChange(_current, size) {
    pageSize.value = size;
    fetch();
  }
src/components/Form/src/hooks/useFormEvents.ts
@@ -242,7 +242,7 @@
      const values = await validate();
      const res = handleFormValues(values);
      emit('submit', res);
    } catch (error) {
    } catch (error: any) {
      throw new Error(error);
    }
  }
src/components/Table/src/components/editable/EditableCell.vue
@@ -265,7 +265,7 @@
              result = await beforeEditSubmit({
                record: pick(record, keys),
                index,
                key,
                key: key as string,
                value,
              });
            } catch (e) {
src/components/Tree/src/Tree.vue
@@ -408,7 +408,7 @@
            <span class={unref(getBindValues)?.blockNode ? `${prefixCls}__content` : ''}>
              <span>{title.substr(0, searchIdx)}</span>
              <span style={highlightStyle}>{searchText}</span>
              <span>{title.substr(searchIdx + searchText.length)}</span>
              <span>{title.substr(searchIdx + (searchText as string).length)}</span>
            </span>
          ) : (
            title
src/hooks/web/useCopyToClipboard.ts
@@ -51,7 +51,7 @@
  let isSuccess = false;
  try {
    isSuccess = document.execCommand('copy');
  } catch (e) {
  } catch (e: any) {
    throw new Error(e);
  }
src/layouts/default/setting/components/SettingFooter.vue
@@ -65,7 +65,7 @@
          updateColorWeak(colorWeak);
          updateGrayMode(grayMode);
          createMessage.success(t('layout.setting.resetSuccess'));
        } catch (error) {
        } catch (error: any) {
          createMessage.error(error);
        }
      }
src/utils/file/download.ts
@@ -36,22 +36,19 @@
export function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart) {
  const blobData = typeof bom !== 'undefined' ? [bom, data] : [data];
  const blob = new Blob(blobData, { type: mime || 'application/octet-stream' });
  if (typeof window.navigator.msSaveBlob !== 'undefined') {
    window.navigator.msSaveBlob(blob, filename);
  } else {
    const blobURL = window.URL.createObjectURL(blob);
    const tempLink = document.createElement('a');
    tempLink.style.display = 'none';
    tempLink.href = blobURL;
    tempLink.setAttribute('download', filename);
    if (typeof tempLink.download === 'undefined') {
      tempLink.setAttribute('target', '_blank');
    }
    document.body.appendChild(tempLink);
    tempLink.click();
    document.body.removeChild(tempLink);
    window.URL.revokeObjectURL(blobURL);
  const blobURL = window.URL.createObjectURL(blob);
  const tempLink = document.createElement('a');
  tempLink.style.display = 'none';
  tempLink.href = blobURL;
  tempLink.setAttribute('download', filename);
  if (typeof tempLink.download === 'undefined') {
    tempLink.setAttribute('target', '_blank');
  }
  document.body.appendChild(tempLink);
  tempLink.click();
  document.body.removeChild(tempLink);
  window.URL.revokeObjectURL(blobURL);
}
/**
src/utils/http/axios/Axios.ts
@@ -81,6 +81,7 @@
    this.axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => {
      // If cancel repeat request is turned on, then cancel repeat request is prohibited
      const {
        // @ts-ignore
        headers: { ignoreCancelToken },
      } = config;
@@ -149,6 +150,7 @@
      data: formData,
      headers: {
        'Content-type': ContentTypeEnum.FORM_DATA,
        // @ts-ignore
        ignoreCancelToken: true,
      },
    });
src/utils/http/axios/helper.ts
@@ -35,7 +35,7 @@
      if (value) {
        try {
          params[key] = isString(value) ? value.trim() : value;
        } catch (error) {
        } catch (error: any) {
          throw new Error(error);
        }
      }