mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-17 17:24:27 +08:00
编排新增HTML解析、上传、下载
This commit is contained in:
@@ -440,5 +440,43 @@ export const dataCommands = {
|
||||
icon: "compress",
|
||||
isAsync: true,
|
||||
},
|
||||
{
|
||||
value: "quickcomposer.data.htmlParser",
|
||||
label: "HTML解析",
|
||||
desc: "解析 HTML 字符串",
|
||||
icon: "html",
|
||||
config: [
|
||||
{
|
||||
label: "要解析的 HTML",
|
||||
type: "varInput",
|
||||
icon: "html",
|
||||
placeholder: "例如:<div>Hello, World!</div>",
|
||||
width: 12,
|
||||
},
|
||||
{
|
||||
label: "CSS选择器",
|
||||
type: "varInput",
|
||||
icon: "css",
|
||||
placeholder: "例如:.class",
|
||||
width: 7,
|
||||
},
|
||||
{
|
||||
label: "属性",
|
||||
type: "varInput",
|
||||
icon: "colorize",
|
||||
options: {
|
||||
items: [
|
||||
{ label: "innerText", value: "innerText" },
|
||||
{ label: "innerHTML", value: "innerHTML" },
|
||||
{ label: "href", value: "href" },
|
||||
{ label: "src", value: "src" },
|
||||
{ label: "value", value: "value" },
|
||||
],
|
||||
},
|
||||
defaultValue: newVarInputVal("str"),
|
||||
width: 5,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { newVarInputVal } from "../varInputValManager";
|
||||
|
||||
export const networkCommands = {
|
||||
label: "网络操作",
|
||||
icon: "language",
|
||||
@@ -313,5 +315,63 @@ export const networkCommands = {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "quickcommand.downloadFile",
|
||||
label: "下载文件",
|
||||
desc: "下载文件",
|
||||
icon: "file_download",
|
||||
isAsync: true,
|
||||
config: [
|
||||
{
|
||||
label: "文件URL",
|
||||
type: "varInput",
|
||||
icon: "link",
|
||||
defaultValue: newVarInputVal("str", "https://"),
|
||||
width: 12,
|
||||
},
|
||||
{
|
||||
label: "保存路径",
|
||||
type: "varInput",
|
||||
icon: "folder",
|
||||
width: 12,
|
||||
placeholder: "留空则弹出对话框选择保存路径",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "quickcommand.uploadFile",
|
||||
label: "上传文件",
|
||||
desc: "上传文件",
|
||||
icon: "file_upload",
|
||||
isAsync: true,
|
||||
config: [
|
||||
{
|
||||
label: "上传接口地址",
|
||||
type: "varInput",
|
||||
icon: "link",
|
||||
defaultValue: newVarInputVal("str", "https://"),
|
||||
width: 12,
|
||||
},
|
||||
{
|
||||
label: "文件路径",
|
||||
type: "varInput",
|
||||
icon: "file_present",
|
||||
width: 12,
|
||||
placeholder: "留空则弹出对话框选择文件",
|
||||
},
|
||||
{
|
||||
label: "文件名",
|
||||
type: "varInput",
|
||||
icon: "text_fields",
|
||||
defaultValue: newVarInputVal("str", "file"),
|
||||
width: 12,
|
||||
},
|
||||
{
|
||||
label: "额外表单数据(可选)",
|
||||
type: "dictEditor",
|
||||
width: 12,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user