Skip to content

Commit a8c8553

Browse files
committed
fix: 修复类型引入问题
1 parent 3f60725 commit a8c8553

33 files changed

Lines changed: 58 additions & 54 deletions

packages/tdesign-uniapp-chat/global.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
declare module 'vue' {
22
export interface GlobalComponents {
3-
TAttachments: typeof import('tdesign-uniapp-chat/attachments/attachments.vue').default;
4-
TChatActionbar: typeof import('tdesign-uniapp-chat/chat-actionbar/chat-actionbar.vue').default;
5-
TChatContent: typeof import('tdesign-uniapp-chat/chat-content/chat-content.vue').default;
6-
TChatList: typeof import('tdesign-uniapp-chat/chat-list/chat-list.vue').default;
7-
TChatLoading: typeof import('tdesign-uniapp-chat/chat-loading/chat-loading.vue').default;
8-
TChatMarkdown: typeof import('tdesign-uniapp-chat/chat-markdown/chat-markdown.vue').default;
9-
TChatMessage: typeof import('tdesign-uniapp-chat/chat-message/chat-message.vue').default;
10-
TChatRecord: typeof import('tdesign-uniapp-chat/chat-record/chat-record.vue').default;
11-
TChatSender: typeof import('tdesign-uniapp-chat/chat-sender/chat-sender.vue').default;
12-
TChatThinking: typeof import('tdesign-uniapp-chat/chat-thinking/chat-thinking.vue').default;
3+
TAttachments: typeof import('@tdesign/uniapp-chat/attachments/attachments.vue').default;
4+
TChatActionbar: typeof import('@tdesign/uniapp-chat/chat-actionbar/chat-actionbar.vue').default;
5+
TChatContent: typeof import('@tdesign/uniapp-chat/chat-content/chat-content.vue').default;
6+
TChatList: typeof import('@tdesign/uniapp-chat/chat-list/chat-list.vue').default;
7+
TChatLoading: typeof import('@tdesign/uniapp-chat/chat-loading/chat-loading.vue').default;
8+
TChatMarkdown: typeof import('@tdesign/uniapp-chat/chat-markdown/chat-markdown.vue').default;
9+
TChatMessage: typeof import('@tdesign/uniapp-chat/chat-message/chat-message.vue').default;
10+
TChatRecord: typeof import('@tdesign/uniapp-chat/chat-record/chat-record.vue').default;
11+
TChatSender: typeof import('@tdesign/uniapp-chat/chat-sender/chat-sender.vue').default;
12+
TChatThinking: typeof import('@tdesign/uniapp-chat/chat-thinking/chat-thinking.vue').default;
1313
}
1414
}
1515

packages/tdesign-uniapp-chat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@
150150
"eslint --fix"
151151
]
152152
}
153-
}
153+
}

packages/tdesign-uniapp/eslintrc-uniapp.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const path = require('path');
1111
module.exports = function createUniappEslintConfig(rootDir) {
1212
const packagesDir = path.resolve(rootDir, '..');
1313
const uniappComponentsDir = path.join(packagesDir, 'uniapp-components');
14+
const uniappChatComponentsDir = path.join(packagesDir, 'tdesign-uniapp-chat');
1415

1516
return {
1617
root: true,
@@ -35,7 +36,10 @@ module.exports = function createUniappEslintConfig(rootDir) {
3536
settings: {
3637
'import/resolver': {
3738
alias: {
38-
map: [['@tdesign/uniapp', path.join(uniappComponentsDir, '')]],
39+
map: [
40+
['@tdesign/uniapp', path.join(uniappComponentsDir, '')],
41+
['@tdesign/uniapp-chat', path.join(uniappChatComponentsDir, '')],
42+
],
3943
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue', '.json', '.node'],
4044
},
4145
},

packages/tdesign-uniapp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,4 +597,4 @@
597597
"eslint --fix"
598598
]
599599
}
600-
}
600+
}

packages/uniapp-components/types/action-sheet.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { TdActionSheetProps } from '../action-sheet/type';
21
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2+
import type { TdActionSheetProps } from '../action-sheet/type';
33

44
export type ActionSheetProps = ExtractNonOnProps<TdActionSheetProps>;
55
export type ActionSheetEmits = TransformEventHandlers<TdActionSheetProps, true>;

packages/uniapp-components/types/avatar-group.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { TdAvatarGroupProps } from '../avatar-group/type';
21
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2+
import type { TdAvatarGroupProps } from '../avatar-group/type';
33

44
export type AvatarGroupProps = ExtractNonOnProps<TdAvatarGroupProps>;
55
export type AvatarGroupEmits = TransformEventHandlers<TdAvatarGroupProps, true>;

packages/uniapp-components/types/avatar.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { TdAvatarProps } from '../avatar/type';
21
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2+
import type { TdAvatarProps } from '../avatar/type';
33

44
export type AvatarProps = ExtractNonOnProps<TdAvatarProps>;
55
export type AvatarEmits = TransformEventHandlers<TdAvatarProps, true>;

packages/uniapp-components/types/back-top.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { TdBackTopProps } from '../back-top/type';
21
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2+
import type { TdBackTopProps } from '../back-top/type';
33

44
export type BackTopProps = ExtractNonOnProps<TdBackTopProps>;
55
export type BackTopEmits = TransformEventHandlers<TdBackTopProps, true>;

packages/uniapp-components/types/badge.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { TdBadgeProps } from '../badge/type';
21
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2+
import type { TdBadgeProps } from '../badge/type';
33

44
export type BadgeProps = ExtractNonOnProps<TdBadgeProps>;
55
export type BadgeEmits = TransformEventHandlers<TdBadgeProps, true>;

packages/uniapp-components/types/button.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { TdButtonProps } from '../button/type';
21
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
2+
import type { TdButtonProps } from '../button/type';
33

44
export type ButtonProps = ExtractNonOnProps<TdButtonProps>;
55
export type ButtonEmits = TransformEventHandlers<TdButtonProps, true>;

0 commit comments

Comments
 (0)