mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-07 14:04:03 +08:00
修改不同界面子输入框内的提示文字
This commit is contained in:
parent
d73e9bb300
commit
2f4ec22e83
@ -6,6 +6,8 @@
|
||||
|
||||
以下均以外置手册`Java`为例
|
||||
|
||||
该外置下载地址 [百度网盘](https://pan.baidu.com/s/188sFN_oktGulGTdvnCQPqw) 提取码: `yfh7`
|
||||
|
||||
## 配置格式
|
||||
|
||||
增加外置手册需要填写的参数如下图所示
|
||||
|
11
README.md
11
README.md
@ -169,11 +169,9 @@
|
||||

|
||||

|
||||
|
||||
## 安装
|
||||
|
||||
|
||||
## 下载
|
||||
|
||||
[百度网盘](https://pan.baidu.com/s/188sFN_oktGulGTdvnCQPqw) 提取码: `yfh7`
|
||||
请直接在插件中心进行安装即可,或将本项目打包成`upx`安装
|
||||
|
||||
[项目地址](https://github.com/fofolee/uTools-Manuals)
|
||||
|
||||
@ -181,9 +179,7 @@
|
||||
|
||||
[外置手册教程](https://yuanliao.info/d/356/27)
|
||||
|
||||
## 安装方法
|
||||
|
||||
将`upx`文件拖入`uTools`输入框中安装即可,安装前最好先卸载旧版本的插件,如果安装过程较久,请耐心等待
|
||||
## 关键字
|
||||
|
||||
## 关键字
|
||||
|
||||
@ -199,6 +195,7 @@
|
||||
- 切换列表和手册视图 `tab` `🖱右键`
|
||||
- 发送选中的内容至上一个活动窗口 `⇪ + ⏎` `🖱中键`
|
||||
- 搜索下一个关键词 `⏎`
|
||||
- 选中文本后翻译 `T`
|
||||
- 退出插件 `esc`
|
||||
|
||||
## 手册一览
|
||||
|
@ -46,6 +46,27 @@ showList = (text, index, listnum) => {
|
||||
window.mouseLockTime = new Date().getTime();
|
||||
}
|
||||
|
||||
// 列表界面子输入框
|
||||
mainlistSubInput = () => {
|
||||
utools.removeSubInput();
|
||||
utools.setSubInput(({ text }) => {
|
||||
// 列表搜索
|
||||
showList(text.toUpperCase(), index, 300);
|
||||
// 高亮结果
|
||||
text.split(' ').forEach(keyword => {
|
||||
keyword && $(".name,.description").highlight(keyword, 'listFounds');
|
||||
});
|
||||
}, '空格→多关键词搜索;鼠标中键→发送选中条目到活动窗口');
|
||||
}
|
||||
|
||||
// 手册界面子输入框
|
||||
manualSubInput = () => {
|
||||
utools.removeSubInput();
|
||||
utools.setSubInput(({ text }) => {
|
||||
highlightManual("#manual", text);
|
||||
}, '空格→多关键词;选中文本→中键发送 T翻译 S收藏;Tab→切换界面');
|
||||
}
|
||||
|
||||
|
||||
// 显示手册
|
||||
showManual = path => {
|
||||
@ -77,7 +98,7 @@ showManual = path => {
|
||||
$("#manual").html(`<div id="manualBody">${data}</div>`).fadeIn();
|
||||
Prism.highlightAll();
|
||||
location.href = e ? id : '#manualBody';
|
||||
utools.setSubInputValue('');
|
||||
manualSubInput();
|
||||
});
|
||||
request.fail(function (xhr, err) {
|
||||
$(".load").html('404').fadeOut();
|
||||
@ -118,11 +139,13 @@ toggleView = () => {
|
||||
$("#manual").fadeIn();
|
||||
$("#mainlist").fadeOut();
|
||||
utools.setExpendHeight(550);
|
||||
manualSubInput();
|
||||
} else if ($("#manual").is(":visible") && $("#mainlist").is(":hidden")) {
|
||||
$("#manual").fadeOut();
|
||||
$("#mainlist").fadeIn();
|
||||
let num = $(".info").length
|
||||
utools.setExpendHeight(num > 11 ? 550 : 50 * num);
|
||||
mainlistSubInput();
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,14 +217,14 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
||||
// 读取目录文件
|
||||
try {
|
||||
if (window.dirs.idxFile) {
|
||||
var index = await readFile(window.dirs.idxFile);
|
||||
index = await readFile(window.dirs.idxFile);
|
||||
if (window.dirs.idxFile.includes('payload.json')) {
|
||||
index = JSON.parse(rc4(index, 'uTools'))
|
||||
} else {
|
||||
index = JSON.parse(index);
|
||||
}
|
||||
} else {
|
||||
var index = utools.db.get(code).data;
|
||||
index = utools.db.get(code).data;
|
||||
}
|
||||
if (type == 'over') {
|
||||
showList(payload, index, 300)
|
||||
@ -209,19 +232,11 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
||||
showList('', index, 300)
|
||||
}
|
||||
// 子输入框
|
||||
utools.setSubInput(({ text }) => {
|
||||
// 列表搜索
|
||||
if ($('#manual').is(':hidden')) {
|
||||
showList(text.toUpperCase(), index, 300);
|
||||
// 高亮结果
|
||||
text.split(' ').forEach(keyword => {
|
||||
keyword && $(".name,.description").highlight(keyword, 'listFounds');
|
||||
});
|
||||
// 手册搜索
|
||||
mainlistSubInput();
|
||||
} else {
|
||||
highlightManual("#manual", text);
|
||||
manualSubInput();
|
||||
}
|
||||
}, '输入名称或功能进行查询');
|
||||
if (type == 'window') {
|
||||
utools.hideMainWindow();
|
||||
copy();
|
||||
|
Loading…
x
Reference in New Issue
Block a user