扩展浏览器标签页管理功能:实现创建新标签页和关闭标签页的命令,支持通过URL、标题和ID进行标签页操作

This commit is contained in:
fofolee
2025-01-22 22:14:55 +08:00
parent df709d9c72
commit 26360e9643
3 changed files with 116 additions and 1 deletions

View File

@@ -137,6 +137,45 @@ export const browserCommands = {
},
],
},
{
value: "quickcomposer.browser.createNewTab",
label: "创建新标签页",
icon: "tab",
config: [
{
label: "网址",
component: "VariableInput",
icon: "link",
width: 12,
placeholder: "留空则打开about:blank",
},
],
},
{
value: "quickcomposer.browser.closeTab",
label: "关闭标签页",
icon: "tab",
config: [
{
component: "QSelect",
icon: "tab",
width: 3,
options: [
{ label: "通过URL", value: "url" },
{ label: "通过标题", value: "title" },
{ label: "通过ID", value: "id" },
],
defaultValue: "url",
},
{
label: "搜索条件",
component: "VariableInput",
icon: "tab",
width: 9,
placeholder: "支持模糊匹配",
},
],
},
],
},
{