Skip to content

Commit f61a343

Browse files
committed
更新版本号:将版本从 1.0.1 升级到 1.0.2
优化组件导出方式:将 install 方法直接绑定到 ExpressionEditor 组件上
1 parent 2246fb7 commit f61a343

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-expression-editor",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A powerful Vue 3 mathematical expression editor component",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { App } from 'vue'
22
import ExpressionEditor from './components/ExpressionEditor.vue'
33

4-
export { ExpressionEditor }
5-
6-
export default {
7-
install: (app: App) => {
8-
app.component('ExpressionEditor', ExpressionEditor)
9-
}
4+
const install = (app: App) => {
5+
app.component('ExpressionEditor', ExpressionEditor)
106
}
7+
8+
// 直接导出组件
9+
ExpressionEditor.install = install
10+
11+
export { ExpressionEditor }
12+
export default ExpressionEditor

0 commit comments

Comments
 (0)