Skip to content

Commit 7f86e39

Browse files
committed
更新 src/index.ts 文件:修复组件类型声明,调整组件导出方式,确保样式依赖正确加载。
1 parent 65ff446 commit 7f86e39

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/index.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { App } from 'vue';
2-
import ExpressionEditor from './components/ExpressionEditor.vue';
3-
import './styles/index.scss'; // 在入口文件中导入样式
1+
import { App } from 'vue'
2+
import ExpressionEditor from './components/ExpressionEditor.vue'
3+
import './styles/index.scss';
44

55
// 添加组件类型声明
66
declare module 'vue' {
@@ -9,10 +9,11 @@ declare module 'vue' {
99
}
1010
}
1111

12-
export { ExpressionEditor };
12+
const install = (app: App) => {
13+
app.component('ExpressionEditor', ExpressionEditor)
14+
}
15+
16+
ExpressionEditor.install = install
1317

14-
export default {
15-
install: (app: App) => {
16-
app.component('ExpressionEditor', ExpressionEditor);
17-
}
18-
};
18+
export { ExpressionEditor }
19+
export default ExpressionEditor

0 commit comments

Comments
 (0)