Skip to content

Commit b7c3408

Browse files
committed
更新文档:1. 添加隐藏变量选择和隐藏虚拟键盘的配置项;2. 增加初始设置示例,便于用户理解;3. 更新接口文档以反映新选项。
--------------------- [deploy]
1 parent 175aefb commit b7c3408

File tree

2 files changed

+45
-13
lines changed

2 files changed

+45
-13
lines changed

README.en.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,28 @@ app.mount('#app')
142142
<ExpressionEditor
143143
v-model="expression"
144144
:variables="variables"
145-
:show-toolbar="true" <!-- Show toolbar -->
146-
:show-validate="true" <!-- Show validation button -->
147-
:show-info="true" <!-- Show information button -->
148-
:show-theme="true" <!-- Show theme toggle -->
149-
:show-settings="true" <!-- Show settings button -->
150-
:show-preview="true" <!-- Show preview button -->
151-
:show-copy="true" <!-- Show copy button -->
152-
:show-style-toggle="true" <!-- Show style toggle -->
153-
:readonly="false" <!-- Enable editing -->
154-
:disabled="false" <!-- Enable component -->
155-
:max-length="1000" <!-- Maximum input length -->
156-
:autofocus="false" <!-- Auto focus on mount -->
145+
:show-toolbar="true"
146+
:show-validate="true"
147+
:show-info="true"
148+
:show-theme="true"
149+
:show-settings="true"
150+
:show-preview="true"
151+
:show-copy="true"
152+
:show-style-toggle="true"
153+
:hide-variables="false"
154+
:hide-keyboard="false"
155+
:initial-settings="{
156+
autoCompleteBrackets: false,
157+
bracketColorEnabled: false,
158+
isDarkMode: false,
159+
horizontalLayout: false,
160+
hideVariables: false,
161+
hideKeyboard: false
162+
}"
163+
:readonly="false"
164+
:disabled="false"
165+
:max-length="1000"
166+
:autofocus="false"
157167
@update:modelValue="handleUpdate"
158168
@validation-change="handleValidationChange"
159169
@change="handleChange"
@@ -255,6 +265,8 @@ const insertAtCursor = (text) => {
255265
| showPreview | boolean | true | Show preview button |
256266
| showCopy | boolean | true | Show copy button |
257267
| showStyleToggle | boolean | true | Show style toggle button |
268+
| hideVariables | boolean | false | Whether to hide variable selection area |
269+
| hideKeyboard | boolean | false | Whether to hide virtual keyboard |
258270
| readonly | boolean | false | Read-only mode |
259271
| disabled | boolean | false | Disable component |
260272
| maxLength | number | 1000 | Maximum input length |
@@ -308,10 +320,14 @@ interface EditorSettings {
308320
autoCompleteBrackets: boolean;
309321
// Enable bracket colors
310322
bracketColorEnabled: boolean;
311-
// Dark mode
323+
// Dark theme
312324
isDarkMode: boolean;
313325
// Horizontal layout
314326
horizontalLayout: boolean;
327+
// Hide variable selection area
328+
hideVariables: boolean;
329+
// Hide virtual keyboard
330+
hideKeyboard: boolean;
315331
}
316332
```
317333

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@ app.mount('#app')
150150
:show-preview="true"
151151
:show-copy="true"
152152
:show-style-toggle="true"
153+
:hide-variables="false"
154+
:hide-keyboard="false"
155+
:initial-settings="{
156+
autoCompleteBrackets: false,
157+
bracketColorEnabled: false,
158+
isDarkMode: false,
159+
horizontalLayout: false,
160+
hideVariables: false,
161+
hideKeyboard: false
162+
}"
153163
:readonly="false"
154164
:disabled="false"
155165
:max-length="1000"
@@ -255,6 +265,8 @@ const insertAtCursor = (text) => {
255265
| showPreview | boolean | true | 是否显示预览按钮 |
256266
| showCopy | boolean | true | 是否显示复制按钮 |
257267
| showStyleToggle | boolean | true | 是否显示样式切换按钮 |
268+
| hideVariables | boolean | false | 是否隐藏变量选择区域 |
269+
| hideKeyboard | boolean | false | 是否隐藏虚拟键盘 |
258270
| readonly | boolean | false | 是否只读 |
259271
| disabled | boolean | false | 是否禁用 |
260272
| maxLength | number | 1000 | 最大长度 |
@@ -312,6 +324,10 @@ interface EditorSettings {
312324
isDarkMode: boolean;
313325
// 水平布局
314326
horizontalLayout: boolean;
327+
// 隐藏变量选择区域
328+
hideVariables: boolean;
329+
// 隐藏虚拟键盘
330+
hideKeyboard: boolean;
315331
}
316332
```
317333

0 commit comments

Comments
 (0)