Skip to content

Commit

Permalink
fix: fixed the problem of missing reference files during default impo…
Browse files Browse the repository at this point in the history
…rt (#1492)
  • Loading branch information
anlyyao authored Jul 11, 2024
1 parent 19a2c68 commit 247a362
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"tdesign"
],
"title": "tdesign-mobile-vue",
"main": "lib/index-lib.js",
"main": "cjs/index-lib.js",
"module": "es/index.js",
"typings": "es/index.d.ts",
"unpkg": "dist/tdesign.min.js",
Expand Down
6 changes: 0 additions & 6 deletions src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,3 @@ export * from './toast';

// 全局配置
export * from './config-provider';

// 兼容原使用方式(2.x 移除)
export { default as Dialog } from './dialog';
export { default as ActionSheet } from './action-sheet';
export { default as Message } from './message';
export { default as Toast } from './toast';
2 changes: 1 addition & 1 deletion src/dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import './style';

export type DialogType = 'alert' | 'confirm' | 'show';

export const DialogPropsDefault = {
const DialogPropsDefault = {
title: '',
content: '',
confirmBtn: '',
Expand Down
4 changes: 4 additions & 0 deletions src/index-lib.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import './style';
import tdesign from './index';

const ENV = process.env.NODE_ENV;
if (
ENV !== 'test' &&
Expand All @@ -11,3 +14,4 @@ if (
}

export * from './index';
export default tdesign;
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ const version = typeof __VERSION__ === 'undefined' ? '' : __VERSION__;
export { install, version };
export * from './plugins';
export * from './components';
export * from './common';
export default { install, version };
6 changes: 6 additions & 0 deletions src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ export { MessagePlugin } from './message';
export { ToastPlugin } from './toast';
export { DrawerPlugin } from './drawer';
export { LoadingPlugin } from './loading';

// 兼容原使用方式(2.x 移除)
export { default as Dialog } from './dialog';
export { default as ActionSheet } from './action-sheet';
export { default as Message } from './message';
export { default as Toast } from './toast';

0 comments on commit 247a362

Please sign in to comment.