mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 04:53:31 +08:00
更新文字描述
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
v-html="commandInfo.features.explain.trim() || '<br/>'"
|
||||
/>
|
||||
</div>
|
||||
<!-- 配模式 -->
|
||||
<!-- 匹配模式 -->
|
||||
<div class="row">
|
||||
<div
|
||||
:class="
|
||||
|
@@ -339,7 +339,7 @@ export default {
|
||||
: this.action.data;
|
||||
quickCommandInfo?.program &&
|
||||
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
|
||||
// 默认命令编辑
|
||||
// 默认命令不可编辑
|
||||
if (this.quickcommandInfo.tags?.includes("默认") && !utools.isDev()) {
|
||||
this.canCommandSave = false;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ export default {
|
||||
// 等待编辑器内容加载完成后再保存
|
||||
setTimeout(() => {
|
||||
this.saveToHistory();
|
||||
}, 1000); // 给予足够的时间让编辑器载完成
|
||||
}, 1000); // 给予足够的时间让编辑器加载完成
|
||||
},
|
||||
programChanged(value) {
|
||||
this.setLanguage(value);
|
||||
@@ -386,12 +386,12 @@ export default {
|
||||
showHelp() {
|
||||
window.showUb.docs();
|
||||
},
|
||||
// 展开收起栏
|
||||
// 展开收起侧栏
|
||||
toggleSideBarWidth() {
|
||||
this.sideBarWidth = !!this.sideBarWidth ? 0 : defaultSideBarWidth;
|
||||
},
|
||||
// 保存
|
||||
saveCurrentCommand(config = { silent: false }) {
|
||||
saveCurrentCommand(message = "保存成功") {
|
||||
let updatedData = this.$refs.sidebar?.SaveMenuData();
|
||||
if (!updatedData) return;
|
||||
Object.assign(this.quickcommandInfo, _.cloneDeep(updatedData));
|
||||
@@ -404,13 +404,13 @@ export default {
|
||||
type: "save",
|
||||
data: newQuickcommandInfo,
|
||||
});
|
||||
if (!config.silent) {
|
||||
this.saveToHistory(); // 保存时记录历史
|
||||
}
|
||||
this.saveToHistory(); // 保存时记录历史
|
||||
if (!message) return;
|
||||
quickcommand.showMessageBox(message, "success", 1000, "bottom-right");
|
||||
},
|
||||
// 运行
|
||||
runCurrentCommand(cmd) {
|
||||
this.saveToHistory(); // 运行时保存
|
||||
this.saveCurrentCommand(null);
|
||||
let command = _.cloneDeep(this.quickcommandInfo);
|
||||
if (cmd) command.cmd = cmd;
|
||||
command.output =
|
||||
|
@@ -235,7 +235,7 @@
|
||||
/>
|
||||
</template>
|
||||
<q-tooltip
|
||||
>一个可以代码的代码编辑器<br />
|
||||
>一个可以直接运行代码的代码编辑器<br />
|
||||
也可在主输入框输入关键字「RunCode」进入
|
||||
</q-tooltip>
|
||||
</q-field>
|
||||
|
@@ -120,7 +120,7 @@ export default {
|
||||
let keys = [];
|
||||
// fix getValue of undefined
|
||||
let tokens = getTokens(toRaw(editor).getModel()?.getValue());
|
||||
// 自定义量、字符串
|
||||
// 自定义变量、字符串
|
||||
for (const item of tokens) {
|
||||
if (item != curWord.word) {
|
||||
keys.push({
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
// 关键字、<EFBFBD><EFBFBD>数
|
||||
// 关键字、函数
|
||||
Object.keys(keyWords).forEach((ItemKind) => {
|
||||
keyWords[ItemKind].forEach((item) => {
|
||||
keys.push({
|
||||
|
@@ -46,6 +46,16 @@
|
||||
<div class="history-list-container">
|
||||
<q-card-section class="header-section row items-center q-pb-none">
|
||||
<div class="text-h6">历史记录</div>
|
||||
<q-icon name="help_outline" class="q-ml-sm">
|
||||
<q-tooltip>
|
||||
在初次进入编辑器、点击运行、保存按钮以及在此处进行恢复操作后,会自动保存当时的命令,方便进行回溯。<br />
|
||||
注意:<br />
|
||||
1.超过5k的内容不会保存;<br />
|
||||
2.数据是临时保存的,且不会多端同步;<br />
|
||||
3.数据会在uTools重启后清除;<br />
|
||||
4.不要依赖此功能保存重要数据或者进行版本管理。
|
||||
</q-tooltip>
|
||||
</q-icon>
|
||||
<q-space />
|
||||
<q-btn flat round dense icon="delete_sweep" @click="confirmClear">
|
||||
<q-tooltip>清空历史</q-tooltip>
|
||||
|
Reference in New Issue
Block a user