mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-04 21:57:05 +08:00
更新文字描述
This commit is contained in:
parent
97ed522f39
commit
16f907567e
@ -115,7 +115,7 @@ module.exports = configure(function(ctx) {
|
|||||||
type: 'http'
|
type: 'http'
|
||||||
},
|
},
|
||||||
port: 8080,
|
port: 8080,
|
||||||
open: true // opens browser window automatically
|
open: false // opens browser window automatically
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-framework
|
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js#Property%3A-framework
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
v-html="commandInfo.features.explain.trim() || '<br/>'"
|
v-html="commandInfo.features.explain.trim() || '<br/>'"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 配模式 -->
|
<!-- 匹配模式 -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
|
@ -339,7 +339,7 @@ export default {
|
|||||||
: this.action.data;
|
: this.action.data;
|
||||||
quickCommandInfo?.program &&
|
quickCommandInfo?.program &&
|
||||||
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
|
Object.assign(this.quickcommandInfo, _.cloneDeep(quickCommandInfo));
|
||||||
// 默认命令编辑
|
// 默认命令不可编辑
|
||||||
if (this.quickcommandInfo.tags?.includes("默认") && !utools.isDev()) {
|
if (this.quickcommandInfo.tags?.includes("默认") && !utools.isDev()) {
|
||||||
this.canCommandSave = false;
|
this.canCommandSave = false;
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ export default {
|
|||||||
// 等待编辑器内容加载完成后再保存
|
// 等待编辑器内容加载完成后再保存
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.saveToHistory();
|
this.saveToHistory();
|
||||||
}, 1000); // 给予足够的时间让编辑器载完成
|
}, 1000); // 给予足够的时间让编辑器加载完成
|
||||||
},
|
},
|
||||||
programChanged(value) {
|
programChanged(value) {
|
||||||
this.setLanguage(value);
|
this.setLanguage(value);
|
||||||
@ -386,12 +386,12 @@ export default {
|
|||||||
showHelp() {
|
showHelp() {
|
||||||
window.showUb.docs();
|
window.showUb.docs();
|
||||||
},
|
},
|
||||||
// 展开收起栏
|
// 展开收起侧栏
|
||||||
toggleSideBarWidth() {
|
toggleSideBarWidth() {
|
||||||
this.sideBarWidth = !!this.sideBarWidth ? 0 : defaultSideBarWidth;
|
this.sideBarWidth = !!this.sideBarWidth ? 0 : defaultSideBarWidth;
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
saveCurrentCommand(config = { silent: false }) {
|
saveCurrentCommand(message = "保存成功") {
|
||||||
let updatedData = this.$refs.sidebar?.SaveMenuData();
|
let updatedData = this.$refs.sidebar?.SaveMenuData();
|
||||||
if (!updatedData) return;
|
if (!updatedData) return;
|
||||||
Object.assign(this.quickcommandInfo, _.cloneDeep(updatedData));
|
Object.assign(this.quickcommandInfo, _.cloneDeep(updatedData));
|
||||||
@ -404,13 +404,13 @@ export default {
|
|||||||
type: "save",
|
type: "save",
|
||||||
data: newQuickcommandInfo,
|
data: newQuickcommandInfo,
|
||||||
});
|
});
|
||||||
if (!config.silent) {
|
this.saveToHistory(); // 保存时记录历史
|
||||||
this.saveToHistory(); // 保存时记录历史
|
if (!message) return;
|
||||||
}
|
quickcommand.showMessageBox(message, "success", 1000, "bottom-right");
|
||||||
},
|
},
|
||||||
// 运行
|
// 运行
|
||||||
runCurrentCommand(cmd) {
|
runCurrentCommand(cmd) {
|
||||||
this.saveToHistory(); // 运行时保存
|
this.saveCurrentCommand(null);
|
||||||
let command = _.cloneDeep(this.quickcommandInfo);
|
let command = _.cloneDeep(this.quickcommandInfo);
|
||||||
if (cmd) command.cmd = cmd;
|
if (cmd) command.cmd = cmd;
|
||||||
command.output =
|
command.output =
|
||||||
|
@ -235,7 +235,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<q-tooltip
|
<q-tooltip
|
||||||
>一个可以代码的代码编辑器<br />
|
>一个可以直接运行代码的代码编辑器<br />
|
||||||
也可在主输入框输入关键字「RunCode」进入
|
也可在主输入框输入关键字「RunCode」进入
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-field>
|
</q-field>
|
||||||
|
@ -120,7 +120,7 @@ export default {
|
|||||||
let keys = [];
|
let keys = [];
|
||||||
// fix getValue of undefined
|
// fix getValue of undefined
|
||||||
let tokens = getTokens(toRaw(editor).getModel()?.getValue());
|
let tokens = getTokens(toRaw(editor).getModel()?.getValue());
|
||||||
// 自定义量、字符串
|
// 自定义变量、字符串
|
||||||
for (const item of tokens) {
|
for (const item of tokens) {
|
||||||
if (item != curWord.word) {
|
if (item != curWord.word) {
|
||||||
keys.push({
|
keys.push({
|
||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 关键字、<EFBFBD><EFBFBD>数
|
// 关键字、函数
|
||||||
Object.keys(keyWords).forEach((ItemKind) => {
|
Object.keys(keyWords).forEach((ItemKind) => {
|
||||||
keyWords[ItemKind].forEach((item) => {
|
keyWords[ItemKind].forEach((item) => {
|
||||||
keys.push({
|
keys.push({
|
||||||
|
@ -46,6 +46,16 @@
|
|||||||
<div class="history-list-container">
|
<div class="history-list-container">
|
||||||
<q-card-section class="header-section row items-center q-pb-none">
|
<q-card-section class="header-section row items-center q-pb-none">
|
||||||
<div class="text-h6">历史记录</div>
|
<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-space />
|
||||||
<q-btn flat round dense icon="delete_sweep" @click="confirmClear">
|
<q-btn flat round dense icon="delete_sweep" @click="confirmClear">
|
||||||
<q-tooltip>清空历史</q-tooltip>
|
<q-tooltip>清空历史</q-tooltip>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
{{ tag }}
|
{{ tag }}
|
||||||
<q-tooltip v-if="tag === '未分类'">
|
<q-tooltip v-if="tag === '未分类'">
|
||||||
所有没有添加标签的命令都会归在未分类 <br />
|
所有没有添加标签的命令都会归在未分类 <br />
|
||||||
可以在新建命令时在标签选择或直接键入标签名来添加标签
|
可以在新建命令时在标签一栏选择或直接键入标签名来添加标签
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-tab>
|
</q-tab>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
@ -164,7 +164,7 @@
|
|||||||
<template v-slot:mini>
|
<template v-slot:mini>
|
||||||
<q-icon name="view_comfy" />
|
<q-icon name="view_comfy" />
|
||||||
<q-tooltip
|
<q-tooltip
|
||||||
>按四列的面板视图<br />
|
>按四列排列的面板视图<br />
|
||||||
老版本的「快捷面板」已被弃用,取而代之的是新版的「面板视图」<br />
|
老版本的「快捷面板」已被弃用,取而代之的是新版的「面板视图」<br />
|
||||||
注意:<br />
|
注意:<br />
|
||||||
1.未启用、匹配类型为窗口的命令在此视图下不显示<br />
|
1.未启用、匹配类型为窗口的命令在此视图下不显示<br />
|
||||||
@ -375,7 +375,7 @@ export default {
|
|||||||
: currentFts.push(x)
|
: currentFts.push(x)
|
||||||
);
|
);
|
||||||
this.activatedQuickCommandFeatureCodes = currentFts.map((f) => f.code);
|
this.activatedQuickCommandFeatureCodes = currentFts.map((f) => f.code);
|
||||||
// 启用的面板
|
// 已启用的面板
|
||||||
this.activatedQuickPanels = quickpanels;
|
this.activatedQuickPanels = quickpanels;
|
||||||
},
|
},
|
||||||
// 获取所有的命令(导出的格式)
|
// 获取所有的命令(导出的格式)
|
||||||
@ -397,7 +397,7 @@ export default {
|
|||||||
])
|
])
|
||||||
.filter((x) => x);
|
.filter((x) => x);
|
||||||
},
|
},
|
||||||
// 监听命令变更件
|
// 监听命令变更事件
|
||||||
commandChanged(event) {
|
commandChanged(event) {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case "remove":
|
case "remove":
|
||||||
@ -462,7 +462,7 @@ export default {
|
|||||||
};
|
};
|
||||||
this.isCommandEditorShow = true;
|
this.isCommandEditorShow = true;
|
||||||
},
|
},
|
||||||
// 是否为认命令
|
// 是否为默认命令
|
||||||
isDefaultCommand(code) {
|
isDefaultCommand(code) {
|
||||||
return code.slice(0, 8) === "default_";
|
return code.slice(0, 8) === "default_";
|
||||||
},
|
},
|
||||||
@ -581,7 +581,7 @@ export default {
|
|||||||
// 搜索时跳转到搜索结果标签
|
// 搜索时跳转到搜索结果标签
|
||||||
this.changeCurrentTag(searchTagName);
|
this.changeCurrentTag(searchTagName);
|
||||||
} else {
|
} else {
|
||||||
// 清空搜索回跳到前标签
|
// 清空搜索回跳到之前标签
|
||||||
if (this.allQuickCommandTags.slice(-1)[0] === searchTagName)
|
if (this.allQuickCommandTags.slice(-1)[0] === searchTagName)
|
||||||
this.allQuickCommandTags.pop();
|
this.allQuickCommandTags.pop();
|
||||||
if (this.currentTag !== this.lastTag)
|
if (this.currentTag !== this.lastTag)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user