Repository: Tencent/tdesign-mobile-vue
Pull request #1032 (2023-08-16 11:40:22)

chore: update tsconfig.json and support npm run lint:tsc
- update tsconfig.json 
- support npm run lint:tsc

github-actions[bot]: **Size Change:** -100 B (0%) 

**Total Size:** 387 kB

| Filename | Size | Change |
| :--- | :---: | :---: |
| `./dist/tdesign.js` | 204 kB | -60 B (0%) |
| `./dist/tdesign.min.js` | 118 kB | -40 B (0%) |

<details><summary>ℹ️ <strong>View Unchanged</strong></summary>

| Filename | Size |
| :--- | :---: |
| `./dist/reset.css` | 672 B |
| `./dist/tdesign.css` | 37.6 kB |
| `./dist/tdesign.min.css` | 27.2 kB |

</details>


github-actions[bot]: **Size Change:** -80 B (0%) 

**Total Size:** 387 kB

| Filename | Size | Change |
| :--- | :---: | :---: |
| `./dist/tdesign.js` | 204 kB | -42 B (0%) |
| `./dist/tdesign.min.js` | 118 kB | -38 B (0%) |

<details><summary>ℹ️ <strong>View Unchanged</strong></summary>

| Filename | Size |
| :--- | :---: |
| `./dist/reset.css` | 672 B |
| `./dist/tdesign.css` | 37.6 kB |
| `./dist/tdesign.min.css` | 27.2 kB |

</details>



Patch:
diff --git a/package.json b/package.json
index d75e515d..bd29c28d 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,8 @@
     "test:e2e": "cypress run --config-file scripts/test/cypress.json",
     "test:e2e-gui": "cypress open --config-file scripts/test/cypress.json",
     "test:demo": "node scripts/test/generate-demo-test.js",
-    "lint": "eslint --ext .vue,.ts,.tsx ./ --max-warnings 0 --ignore-path .gitignore --ignore-path .eslintignore",
+    "lint": "npm run lint:tsc && eslint --ext .vue,.ts,.tsx ./ --max-warnings 0 --ignore-path .gitignore --ignore-path .eslintignore",
+    "lint:tsc": "vue-tsc --emitDeclarationOnly",
     "lint:fix": "npm run lint:fix-prettier && npm run lint:fix-eslint",
     "lint:fix-eslint": "eslint --ext .vue,.ts,.tsx ./ --max-warnings 0 --ignore-path .gitignore --ignore-path .eslintignore --fix",
     "lint:fix-prettier": "prettier ./ --ignore-path .gitignore --ignore-path .eslintignore --write './*.{vue,ts,tsx}' --ignore-unknown",
diff --git a/src/cascader/cascader.vue b/src/cascader/cascader.vue
index 83ba8612..7b456bd6 100644
--- a/src/cascader/cascader.vue
+++ b/src/cascader/cascader.vue
@@ -164,8 +164,8 @@ export default defineComponent({
         for (let i = 0, size = selectedIndexes.length; i < size; i += 1) {
           const index = selectedIndexes[i];
           const next = items[i]?.[index];
-          selectedValue.push(next[keys.value?.value ?? 'value']);
-          steps.push(next[keys.value?.label ?? 'label']);
+          selectedValue.push(next[(keys as Ref<KeysType>).value?.value ?? 'value']);
+          steps.push(next[(keys as Ref<KeysType>).value?.label ?? 'label']);
           if (next[(keys as Ref<KeysType>).value?.children ?? 'children']) {
             items.push(next[(keys as Ref<KeysType>).value?.children ?? 'children']);
           }
@@ -179,7 +179,7 @@ export default defineComponent({
 
     const getIndexesByValue = (options: any, value: any) => {
       for (let i = 0; i < options.length; i++) {
-        if (options[i][keys.value?.value ?? 'value'] === value) {
+        if (options[i][(keys as Ref<KeysType>).value?.value ?? 'value'] === value) {
           return [i];
         }
         if (options[i][(keys as Ref<KeysType>).value?.children ?? 'children']) {
@@ -193,18 +193,20 @@ export default defineComponent({
 
     const handleSelect = (e: string | number, level: number) => {
       const value = e;
-      const index = items[level].findIndex((item: any) => item[keys.value?.value ?? 'value'] === value);
+      const index = items[level].findIndex(
+        (item: any) => item[(keys as Ref<KeysType>).value?.value ?? 'value'] === value,
+      );
       const item = items[level][index];
       selectedIndexes[level] = index;
       selectedIndexes.length = level + 1;
       selectedValue[level] = String(e);
       selectedValue.length = level + 1;
-      steps[level] = item[keys.value?.label ?? 'label'] as string;
+      steps[level] = item[(keys as Ref<KeysType>).value?.label ?? 'label'] as string;
 
       if (item.disabled) {
         return;
       }
-      props.onPick?.({ level, value: item[keys.value?.value ?? 'value'], index });
+      props.onPick?.({ level, value: item[(keys as Ref<KeysType>).value?.value ?? 'value'], index });
 
       if (item[(keys as Ref<KeysType>).value?.children ?? 'children']?.length) {
         items[level + 1] = item[(keys as Ref<KeysType>).value?.children ?? 'children'];
@@ -216,9 +218,9 @@ export default defineComponent({
         childrenInfo.value = e;
         childrenInfo.level = level;
       } else {
-        setCascaderValue(item[keys.value?.value ?? 'value']);
+        setCascaderValue(item[(keys as Ref<KeysType>).value?.value ?? 'value']);
         props.onChange?.(
-          item[keys.value?.value ?? 'value'],
+          item[(keys as Ref<KeysType>).value?.value ?? 'value'],
           items.map((item, index) => toRaw(item?.[selectedIndexes[index]])),
         );
         close('finish');
diff --git a/src/dropdown-menu/dropdown-item.vue b/src/dropdown-menu/dropdown-item.vue
index be384ae5..674237ee 100644
--- a/src/dropdown-menu/dropdown-item.vue
+++ b/src/dropdown-menu/dropdown-item.vue
@@ -83,6 +83,7 @@ import { useVModel, uniqueFactory } from '../shared';
 import DropdownItemProps from './dropdown-item-props';
 import { DropdownMenuState, DropdownMenuControl } from './context';
 import { TdDropdownMenuProps, DropdownValue } from './type';
+import { KeysType } from '../common';
 
 const { prefix } = config;
 const name = `${prefix}-dropdown-item`;
@@ -121,8 +122,8 @@ export default defineComponent({
       options: computed(() => {
         if (props.keys) {
           return props.options?.map((item) => ({
-            value: item[props.keys?.value ?? 'value'],
-            label: item[props.keys?.label ?? 'label'],
+            value: item[(props.keys as KeysType)?.value ?? 'value'],
+            label: item[(props.keys as KeysType)?.label ?? 'label'],
             disabled: item.disabled,
           }));
         }
@@ -254,7 +255,7 @@ export default defineComponent({
       }
       if (props.multiple) return;
       if (!state.isShowItems) return;
-      const value = passInValue.value || [];
+      const value: any = passInValue.value || [];
       if (value[0] === val) return;
       props.onChange?.(val);
       setValue(val);
diff --git a/src/form/demos/horizontal.vue b/src/form/demos/horizontal.vue
index 9263e407..d4c0a465 100644
--- a/src/form/demos/horizontal.vue
+++ b/src/form/demos/horizontal.vue
@@ -121,7 +121,7 @@ const props = defineProps({
 const { disabled } = toRefs(props);
 
 // upload
-const onFail = ({ file, e }: { file: UploadFile; e: ProgressEvent }) => {
+const onFail = ({ file, e }: { file: UploadFile; e: ProgressEvent }): any => {
   console.log('---onFail', file, e);
   return null;
 };
diff --git a/src/form/demos/vertical.vue b/src/form/demos/vertical.vue
index 0426fe1b..ba2d2f0d 100644
--- a/src/form/demos/vertical.vue
+++ b/src/form/demos/vertical.vue
@@ -108,7 +108,7 @@ const props = defineProps({
 const { disabled } = toRefs(props);
 
 // upload
-const onFail = ({ file, e }: { file: UploadFile; e: ProgressEvent }) => {
+const onFail = ({ file, e }: { file: UploadFile; e: ProgressEvent }): any => {
   console.log('---onFail', file, e);
   return null;
 };
diff --git a/src/form/form-item.vue b/src/form/form-item.vue
index 37407749..7c1d46d4 100644
--- a/src/form/form-item.vue
+++ b/src/form/form-item.vue
@@ -210,7 +210,7 @@ export default defineComponent({
       }
       return emptyValue;
     };
-    const resetField = async (resetType: 'initial' | 'empty' | undefined = form?.resetType) => {
+    const resetField = async (resetType: 'initial' | 'empty' | undefined = form?.resetType): Promise<any> => {
       if (!props.name) return null;
 
       if (resetType === 'empty') {
diff --git a/src/grid/grid-item-props.ts b/src/grid/grid-item-props.ts
index d1d1f8a7..0b61e440 100644
--- a/src/grid/grid-item-props.ts
+++ b/src/grid/grid-item-props.ts
@@ -11,7 +11,6 @@ export default {
   /** 透传至 Badge 属性 */
   badge: {
     type: Object as PropType<TdGridItemProps['badge']>,
-    default: () => null,
   },
   /** 文本以外的更多描述，辅助信息。可以通过 Props 传入文本，也可以自定义标题节点 */
   description: {
diff --git a/src/message/index.ts b/src/message/index.ts
index 2187fa7c..87c9b304 100644
--- a/src/message/index.ts
+++ b/src/message/index.ts
@@ -29,6 +29,7 @@ function create(props: MessageActionOptionsType): void {
 
   const component = defineComponent({
     render: (): VNode =>
+      // @ts-ignore
       h(Message, {
         ...otherOptions,
         visible: visible.value,
diff --git a/src/message/message.vue b/src/message/message.vue
index 2787c10a..529c93d9 100644
--- a/src/message/message.vue
+++ b/src/message/message.vue
@@ -107,7 +107,7 @@ export default defineComponent({
 
     const rootStyles = computed(() => {
       const { offset } = props;
-      const offsetStyle = offset ? getMessageStylesOffset(offset) : [];
+      const offsetStyle: any = offset ? getMessageStylesOffset(offset) : [];
       return {
         zIndex: props.zIndex,
         ...offsetStyle,
@@ -146,7 +146,7 @@ export default defineComponent({
     const textDOM = ref();
 
     const handleScrolling = () => {
-      if (!props?.marquee || (props?.marquee as DrawMarquee)?.loop === 0) {
+      if (!props?.marquee || (isObject(props?.marquee) && (props?.marquee as DrawMarquee))?.loop === 0) {
         return;
       }
 
@@ -155,11 +155,26 @@ export default defineComponent({
       state.scroll = {
         marquee: true,
         // 负数统一当作循环播放
-        loop: Math.max(props.marquee === true || props.marquee?.loop == null ? loop : props.marquee?.loop, -1),
+        loop: Math.max(
+          props.marquee === true || (props.marquee as DrawMarquee)?.loop == null
+            ? loop
+            : (props.marquee as DrawMarquee)?.loop,
+          -1,
+        ),
         // 速度必须为正数
-        speed: Math.max(props.marquee === true || props.marquee?.speed == null ? speed : props.marquee?.speed, 1),
+        speed: Math.max(
+          props.marquee === true || (props.marquee as DrawMarquee)?.speed == null
+            ? speed
+            : (props.marquee as DrawMarquee)?.speed,
+          1,
+        ),
         // 延迟不可为负数
-        delay: Math.max(props.marquee === true || props.marquee?.delay == null ? delay : props.marquee?.delay, 0),
+        delay: Math.max(
+          props.marquee === true || (props.marquee as DrawMarquee)?.delay == null
+            ? delay
+            : (props.marquee as DrawMarquee)?.delay,
+          0,
+        ),
       };
       state.offset = 0;
 
diff --git a/src/picker/picker-item.vue b/src/picker/picker-item.vue
index c36e6cd1..f081108f 100644
--- a/src/picker/picker-item.vue
+++ b/src/picker/picker-item.vue
@@ -19,7 +19,6 @@ export default defineComponent({
   props: {
     options: {
       type: Array as PropType<PickerColumnItem[]>,
-      default: () => [],
     },
     value: {
       type: [String, Number] as PropType<PickerValue>,
@@ -42,7 +41,7 @@ export default defineComponent({
     const getIndexByValue = (val: number | string | undefined) => {
       let defaultIndex = 0;
       if (val !== undefined) {
-        defaultIndex = props.options.findIndex((item: any) => item.value === val);
+        defaultIndex = props.options?.findIndex((item: any) => item.value === val);
       }
       return defaultIndex < 0 ? 0 : defaultIndex;
     };
diff --git a/src/picker/picker.class.ts b/src/picker/picker.class.ts
index 4e766b9e..65f5a920 100644
--- a/src/picker/picker.class.ts
+++ b/src/picker/picker.class.ts
@@ -76,7 +76,7 @@ class Picker {
   constructor(options: PickerOptions) {
     if (!options.el) throw new Error('options el needed!');
     this.holder = options.el;
-    this.options = options || {};
+    this.options = options;
     this.onChange = options.onChange;
     this.init();
   }
diff --git a/src/popover/popover.vue b/src/popover/popover.vue
index 6273d33c..aa835992 100644
--- a/src/popover/popover.vue
+++ b/src/popover/popover.vue
@@ -55,6 +55,7 @@ export default defineComponent({
       placement: getPopperPlacement(props.placement),
     });
 
+    // @ts-ignore
     const updatePopper = () => {
       if (referenceRef.value && popoverRef.value) {
         popper = createPopper(referenceRef.value, popoverRef.value, getPopoverOptions());
diff --git a/src/radio/radio-group.vue b/src/radio/radio-group.vue
index 0e9d9fd7..e0af83b4 100644
--- a/src/radio/radio-group.vue
+++ b/src/radio/radio-group.vue
@@ -23,6 +23,7 @@ import RadioGroupProps from '../radio/radio-group-props';
 import { RadioOption, RadioOptionObj, RadioValue, TdRadioGroupProps } from '../radio/type';
 import Radio from './radio.vue';
 import config from '../config';
+import { KeysType } from '../common';
 
 const { prefix } = config;
 const componentName = `${prefix}-radio-group`;
@@ -39,6 +40,8 @@ export default defineComponent({
       'value',
       'change',
     );
+
+    const keys = computed((): KeysType => props.keys);
     const groupOptions = computed(() => {
       return props.options?.map((option: RadioOption) => {
         let opt = option as RadioOptionObj;
@@ -61,6 +64,7 @@ export default defineComponent({
     provide('rootGroupChange', handleRadioChange);
     return {
       ...toRefs(props),
+      keys,
       componentName,
       groupOptions,
     };
diff --git a/src/swipe-cell/swipe-cell.vue b/src/swipe-cell/swipe-cell.vue
index e6bbf87a..c3d220a3 100644
--- a/src/swipe-cell/swipe-cell.vue
+++ b/src/swipe-cell/swipe-cell.vue
@@ -263,7 +263,7 @@ export default defineComponent({
     const updateRightMenuPosStyle = (value?: number) => {
       if (!rightRef.value) return;
       const pos = value || initData.pos;
-      const children = rightRef.value.children || [];
+      const children: any = rightRef.value.children || [];
       const wArr: number[] = [];
       for (let i = 0, len = children.length - 2; i < len; ++i) {
         const el = children[i] as HTMLElement;
@@ -281,7 +281,7 @@ export default defineComponent({
     const updateLeftMenuPosStyle = (value?: number) => {
       if (!leftRef.value) return;
       const pos = value || initData.pos;
-      const children = leftRef.value.children || [];
+      const children: string | any[] | HTMLCollection = leftRef.value.children || [];
       const wArr: number[] = [];
       for (let i = 0, len = children.length - 2; i < len; ++i) {
         const el = children[i] as HTMLElement;
diff --git a/src/swiper/swiper.vue b/src/swiper/swiper.vue
index 249fbe57..edf8f96c 100644
--- a/src/swiper/swiper.vue
+++ b/src/swiper/swiper.vue
@@ -58,7 +58,7 @@ import isNumber from 'lodash/isNumber';
 
 import config from '../config';
 import SwiperProps from './props';
-import { SwiperChangeSource } from './type';
+import { SwiperChangeSource, SwiperNavigation } from './type';
 import { renderTNode, TNode, useVModel } from '../shared';
 import { preventDefault } from '../shared/dom';
 
@@ -98,9 +98,11 @@ const rootClass = computed(() => {
   return [`${name}`, `${name}--${props.type}`];
 });
 
+const navigation = computed((): SwiperNavigation => props.navigation);
+
 const enableNavigation = computed(() => {
   if (typeof props.navigation === 'object') {
-    return props.navigation?.minShowNum ? items.value.length >= props.navigation?.minShowNum : true;
+    return navigation.value?.minShowNum ? items.value.length >= navigation.value?.minShowNum : true;
   }
   return false;
 });
diff --git a/src/tab-bar/demos/text-spread.vue b/src/tab-bar/demos/text-spread.vue
index e245e00b..6edf9b07 100644
--- a/src/tab-bar/demos/text-spread.vue
+++ b/src/tab-bar/demos/text-spread.vue
@@ -12,13 +12,11 @@ const list = [
     value: 'home',
     label: '首页',
     icon: 'home',
-    children: [],
   },
   {
     value: 'app',
     label: '应用',
     icon: 'app',
-    children: [],
   },
   {
     value: 'user',
diff --git a/src/tab-bar/tab-bar-item.vue b/src/tab-bar/tab-bar-item.vue
index 9a11e192..e699e88d 100644
--- a/src/tab-bar/tab-bar-item.vue
+++ b/src/tab-bar/tab-bar-item.vue
@@ -17,15 +17,9 @@
       :aria-selected="(!hasChildren || !isSpread) && isChecked"
       :aria-expanded="hasChildren && isSpread"
       :role="hasChildren ? 'button' : 'tab'"
-      :aria-label="ariaLabel"
       @click="toggle"
     >
-      <div
-        v-if="!!iconContent"
-        :class="`${name}__icon`"
-        :style="{ height: `${iconOnly ? 24 : 20}px` }"
-        :aria-hidden="!!badgeProps?.dot || !!badgeProps?.count"
-      >
+      <div v-if="!!iconContent" :class="`${name}__icon`" :style="{ height: `${iconOnly ? 24 : 20}px` }">
         <t-badge
           v-if="badgeProps?.dot || badgeProps?.count"
           :count="badgeProps?.count || 0"
@@ -79,6 +73,7 @@ import {
 } from 'vue';
 import { ViewListIcon as TViewListIcon } from 'tdesign-icons-vue-next';
 import TBadge from '../badge';
+import { TdBadgeProps } from '../badge/type';
 import config from '../config';
 import { initName } from './useTabBar';
 import TabBarItemProps from './tab-bar-item-props';
@@ -97,8 +92,10 @@ export default defineComponent({
 
     const textNode = ref<HTMLElement>();
 
+    const badgeProps = computed((): TdBadgeProps => props.badgeProps);
+
     const getBadgeAriaLabel = () => {
-      const options = props.badgeProps;
+      const options = badgeProps.value;
       if (options?.dot || options?.count) {
         const maxCount = options.maxCount || 99;
         if (options.dot) {
@@ -188,6 +185,7 @@ export default defineComponent({
 
     return {
       ...toRefs(props),
+      badgeProps,
       name,
       split,
       shape,
diff --git a/src/table/base-table.vue b/src/table/base-table.vue
index 1d3beaa5..25639b6c 100644
--- a/src/table/base-table.vue
+++ b/src/table/base-table.vue
@@ -91,6 +91,7 @@ import useStyle, { formatCSSUnit } from './hooks/useStyle';
 import { renderTNode, TNode } from '../shared';
 import { TableRowData } from './type';
 import TLoading from '../loading';
+import { TdLoadingProps } from '../loading/type';
 
 const { prefix } = config;
 const name = `${prefix}-base-table`;
@@ -103,7 +104,7 @@ export default defineComponent({
   setup(props) {
     const { classPrefix, tableLayoutClasses, tableHeaderClasses, tableBaseClass, tdAlignClasses, tdEllipsisClass } =
       useClassName();
-    const defaultLoadingContent = h(TLoading, { ...props.loadingProps });
+    const defaultLoadingContent = h(TLoading, { ...(props.loadingProps as TdLoadingProps) });
     // 表格基础样式类
     const { tableClasses, tableContentStyles, tableElementStyles } = useStyle(props);
 
diff --git a/src/tabs/tab-panel-props.ts b/src/tabs/tab-panel-props.ts
index d58310b9..dc35c651 100644
--- a/src/tabs/tab-panel-props.ts
+++ b/src/tabs/tab-panel-props.ts
@@ -11,7 +11,6 @@ export default {
   /** 透传至 Badge 组件 */
   badgeProps: {
     type: Object as PropType<TdTabPanelProps['badgeProps']>,
-    default: () => null,
   },
   /** 选项卡内容隐藏时是否销毁 */
   destroyOnHide: {
diff --git a/src/tabs/tabs.vue b/src/tabs/tabs.vue
index fcc5caf4..70a776de 100644
--- a/src/tabs/tabs.vue
+++ b/src/tabs/tabs.vue
@@ -67,6 +67,7 @@ import { useVModel } from '../shared';
 import { preventDefault } from '../shared/dom';
 import CLASSNAMES from '../shared/constants';
 import TSticky from '../sticky';
+import { TdStickyProps } from '../sticky/type';
 
 const { prefix } = config;
 const name = `${prefix}-tabs`;
@@ -81,7 +82,7 @@ export default defineComponent({
     const spaceEvenly = computed(() => props.spaceEvenly);
     const showBottomLine = computed(() => props.showBottomLine);
     const swipeable = computed(() => props.swipeable);
-    const stickyProps = computed(() => ({ ...props.stickyProps, disabled: !props.sticky }));
+    const stickyProps = computed(() => ({ ...(props.stickyProps as TdStickyProps), disabled: !props.sticky }));
     const activeClass = `${name}__item--active`;
     const disabledClass = `${name}__item--disabled`;
     const classes = computed(() => [`${name}`, props.size && CLASSNAMES.SIZE[props.size]]);
diff --git a/src/upload/demos/multiple.vue b/src/upload/demos/multiple.vue
index ea4f9c23..307b14f9 100644
--- a/src/upload/demos/multiple.vue
+++ b/src/upload/demos/multiple.vue
@@ -22,7 +22,7 @@
 import { ref } from 'vue';
 import { UploadChangeContext, UploadFile, UploadRemoveContext, SuccessContext, ProgressContext } from '../type';
 
-const onFail = ({ file, e }: { file: UploadFile; e: ProgressEvent }) => {
+const onFail = ({ file, e }: { file: UploadFile; e: ProgressEvent }): any => {
   console.log('---onFail', file, e);
   return null;
 };
diff --git a/src/upload/upload.vue b/src/upload/upload.vue
index 5e8816e4..026c87aa 100644
--- a/src/upload/upload.vue
+++ b/src/upload/upload.vue
@@ -43,7 +43,7 @@
   </div>
 </template>
 <script lang="ts">
-import { defineComponent, getCurrentInstance, ref, Ref, toRefs, computed, ComputedRef } from 'vue';
+import { defineComponent, getCurrentInstance, ref, Ref, toRefs, computed, ComputedRef, PropType } from 'vue';
 import { AddIcon, LoadingIcon, CloseIcon, CloseCircleIcon } from 'tdesign-icons-vue-next';
 import findIndex from 'lodash/findIndex';
 import isFunction from 'lodash/isFunction';
@@ -52,7 +52,7 @@ import TImage from '../image';
 import TImageViewer from '../image-viewer';
 import xhr from '../_common/js/upload/xhr';
 import { useVModel, renderTNode, TNode } from '../shared';
-import { UploadFile, RequestMethodResponse, SizeLimitObj } from './type';
+import { UploadFile, RequestMethodResponse, SizeLimitObj, TdUploadProps } from './type';
 import { SuccessContext, InnerProgressContext } from './interface';
 import UploadProps from './props';
 import config from '../config';
@@ -330,7 +330,7 @@ export default defineComponent({
         const request = xhr;
         const data = {
           file: file.fileRaw,
-          ...props.data,
+          ...(props.data as PropType<TdUploadProps['data']>),
         };
         xhrReq.value = request({
           action: props.action,
diff --git a/tsconfig.json b/tsconfig.json
index 8e571afa..1ed2c9b4 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,12 +1,13 @@
 {
   "compilerOptions": {
     "target": "esnext",
+    "outDir": "lib",
     "module": "esnext",
     "strict": true,
     "declaration": true,
     "noImplicitAny": true,
     "noImplicitThis": true,
-    "strictNullChecks": true,
+    "strictNullChecks": false,
     "removeComments": true,
     "suppressImplicitAnyIndexErrors": true,
     "resolveJsonModule": true,
@@ -37,5 +38,6 @@
     "src/style/index.js",
     "scripts/rollup.config.js"
   ],
-  "exclude": ["node_modules", "src/_common", "dist", "es", "esm", "lib", "site"]
+  "exclude": ["node_modules", "src/_common", "dist", "es", "esm", "lib", "site"],
+  "compileOnSave": false
 }


Test patch:
diff --git a/src/tab-bar/__test__/__snapshots__/demo.test.jsx.snap b/src/tab-bar/__test__/__snapshots__/demo.test.jsx.snap
index 838c9944..57cd3d05 100644
--- a/src/tab-bar/__test__/__snapshots__/demo.test.jsx.snap
+++ b/src/tab-bar/__test__/__snapshots__/demo.test.jsx.snap
@@ -13,13 +13,11 @@ exports[`TabBar > TabBar badgePropsVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="有16条消息"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="true"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -70,13 +68,11 @@ exports[`TabBar > TabBar badgePropsVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="有新的消息"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="true"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -127,13 +123,11 @@ exports[`TabBar > TabBar badgePropsVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="New"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="true"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -184,13 +178,11 @@ exports[`TabBar > TabBar badgePropsVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="···"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="true"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -252,13 +244,11 @@ exports[`TabBar > TabBar baseVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -289,13 +279,11 @@ exports[`TabBar > TabBar baseVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -326,13 +314,11 @@ exports[`TabBar > TabBar baseVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -363,13 +349,11 @@ exports[`TabBar > TabBar baseVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -414,13 +398,11 @@ exports[`TabBar > TabBar customVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -451,13 +433,11 @@ exports[`TabBar > TabBar customVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -488,13 +468,11 @@ exports[`TabBar > TabBar customVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -525,13 +503,11 @@ exports[`TabBar > TabBar customVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--normal"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -612,7 +588,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
             role="tab"
@@ -634,7 +609,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
@@ -656,7 +630,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
@@ -678,7 +651,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
@@ -731,13 +703,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -768,13 +738,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -805,13 +773,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -842,13 +808,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -910,13 +874,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -945,13 +907,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -980,13 +940,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1015,13 +973,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1081,7 +1037,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
             role="tab"
@@ -1103,7 +1058,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
@@ -1125,7 +1079,6 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="button"
@@ -1194,13 +1147,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="有16条消息"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="true"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1251,13 +1202,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="有新的消息"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="true"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1308,13 +1257,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="New"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="true"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1365,13 +1312,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="···"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="true"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1452,13 +1397,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1487,13 +1430,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1522,13 +1463,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1557,13 +1496,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--tag"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1629,13 +1566,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="true"
             class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1666,13 +1601,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1703,13 +1636,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1740,13 +1671,11 @@ exports[`TabBar > TabBar mobileVue demo works fine 1`] = `
         >
           <div
             aria-expanded="false"
-            aria-label="TabBar"
             aria-selected="false"
             class="t-tab-bar-item__content t-tab-bar-item__content--normal"
             role="tab"
           >
             <div
-              aria-hidden="false"
               class="t-tab-bar-item__icon"
               style="height: 20px;"
             >
@@ -1792,13 +1721,11 @@ exports[`TabBar > TabBar pureIconVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -1827,13 +1754,11 @@ exports[`TabBar > TabBar pureIconVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -1862,13 +1787,11 @@ exports[`TabBar > TabBar pureIconVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -1897,13 +1820,11 @@ exports[`TabBar > TabBar pureIconVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -1944,13 +1865,11 @@ exports[`TabBar > TabBar roundVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -1979,13 +1898,11 @@ exports[`TabBar > TabBar roundVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -2014,13 +1931,11 @@ exports[`TabBar > TabBar roundVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -2049,13 +1964,11 @@ exports[`TabBar > TabBar roundVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
     >
       <div
-        aria-hidden="false"
         class="t-tab-bar-item__icon"
         style="height: 20px;"
       >
@@ -2096,7 +2009,6 @@ exports[`TabBar > TabBar textSpreadVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
       role="tab"
@@ -2118,7 +2030,6 @@ exports[`TabBar > TabBar textSpreadVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
@@ -2140,7 +2051,6 @@ exports[`TabBar > TabBar textSpreadVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="button"
@@ -2185,7 +2095,6 @@ exports[`TabBar > TabBar textVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="true"
       class="t-tab-bar-item__content t-tab-bar-item__content--checked t-tab-bar-item__content--tag"
       role="tab"
@@ -2207,7 +2116,6 @@ exports[`TabBar > TabBar textVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
@@ -2229,7 +2137,6 @@ exports[`TabBar > TabBar textVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"
@@ -2251,7 +2158,6 @@ exports[`TabBar > TabBar textVue demo works fine 1`] = `
   >
     <div
       aria-expanded="false"
-      aria-label="TabBar"
       aria-selected="false"
       class="t-tab-bar-item__content t-tab-bar-item__content--tag"
       role="tab"