@@ -46,35 +46,36 @@ A powerful Vue 3 mathematical expression editor component that supports variable
46
46
### Requirements
47
47
48
48
This component depends on:
49
+
49
50
- Vue >= 3.3.0
50
51
- Element Plus >= 2.4.0
51
52
52
53
### Installation Steps
53
54
54
55
1 . First, ensure you have the required dependencies installed in your project:
55
56
56
- ``` bash
57
- npm install vue@^3.3.0 element-plus@^2.4.0
58
- ```
57
+ ``` bash
58
+ npm install vue@^3.3.0 element-plus@^2.4.0
59
+ ```
59
60
60
61
2 . Install vue-expression-editor:
61
62
62
- ``` bash
63
- npm install vue-expression-editor
64
- ```
63
+ ``` bash
64
+ npm install vue-expression-editor
65
+ ```
65
66
66
67
3 . Fully import Element Plus in your entry file (e.g., main.ts or main.js):
67
68
68
- ``` javascript
69
- import { createApp } from ' vue'
70
- import ElementPlus from ' element-plus'
71
- import ' element-plus/dist/index.css'
72
- import App from ' ./App.vue'
69
+ ``` javascript
70
+ import { createApp } from ' vue'
71
+ import ElementPlus from ' element-plus'
72
+ import ' element-plus/dist/index.css'
73
+ import App from ' ./App.vue'
73
74
74
- const app = createApp (App)
75
- app .use (ElementPlus)
76
- app .mount (' #app' )
77
- ```
75
+ const app = createApp (App)
76
+ app .use (ElementPlus)
77
+ app .mount (' #app' )
78
+ ```
78
79
79
80
If you're using on-demand importing, make sure to import the required components and their styles:
80
81
@@ -302,13 +303,15 @@ interface Variable {
302
303
The editor supports both Chinese and English interfaces:
303
304
304
305
1 . Set language via prop:
306
+
305
307
``` vue
306
308
<ExpressionEditor
307
309
:language="'en'" <!-- Set to English interface -->
308
310
/>
309
311
```
310
312
311
313
2 . Dynamic language switching:
314
+
312
315
``` vue
313
316
<script setup>
314
317
const currentLang = ref('zh')
@@ -322,6 +325,7 @@ The editor supports both Chinese and English interfaces:
322
325
```
323
326
324
327
3 . Switch in settings panel:
328
+
325
329
- Click the settings button to open settings panel
326
330
- Select desired language in language settings
327
331
- Settings will be automatically saved
0 commit comments