mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-17 00:44:35 +08:00
新增数学计算和随机数
This commit is contained in:
@@ -13,7 +13,6 @@ export const dataCommands = {
|
||||
label: "要编解码的文本",
|
||||
icon: "text_fields",
|
||||
type: "varInput",
|
||||
width: 8,
|
||||
},
|
||||
],
|
||||
functionSelector: {
|
||||
@@ -60,7 +59,6 @@ export const dataCommands = {
|
||||
icon: "html",
|
||||
},
|
||||
],
|
||||
width: 3,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -83,7 +81,6 @@ export const dataCommands = {
|
||||
label: "要计算哈希的文本",
|
||||
icon: "text_fields",
|
||||
type: "varInput",
|
||||
width: 8,
|
||||
},
|
||||
],
|
||||
functionSelector: {
|
||||
@@ -116,7 +113,118 @@ export const dataCommands = {
|
||||
},
|
||||
],
|
||||
},
|
||||
width: 3,
|
||||
},
|
||||
{
|
||||
value: "Math",
|
||||
label: "数学计算",
|
||||
desc: "数学函数计算",
|
||||
icon: "calculate",
|
||||
config: [
|
||||
{
|
||||
label: "要计算的数值",
|
||||
icon: "numbers",
|
||||
type: "numInput",
|
||||
},
|
||||
],
|
||||
functionSelector: {
|
||||
selectLabel: "计算方式",
|
||||
options: [
|
||||
{
|
||||
label: "正弦(sin)",
|
||||
value: "Math.sin",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "余弦(cos)",
|
||||
value: "Math.cos",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "正切(tan)",
|
||||
value: "Math.tan",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "反正弦(asin)",
|
||||
value: "Math.asin",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "反余弦(acos)",
|
||||
value: "Math.acos",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "反正切(atan)",
|
||||
value: "Math.atan",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "平方根(sqrt)",
|
||||
value: "Math.sqrt",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "自然对数(ln)",
|
||||
value: "Math.log",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "10对数(log10)",
|
||||
value: "Math.log10",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "绝对值(abs)",
|
||||
value: "Math.abs",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "向上取整(ceil)",
|
||||
value: "Math.ceil",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "向下取整(floor)",
|
||||
value: "Math.floor",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "四舍五入(round)",
|
||||
value: "Math.round",
|
||||
icon: "functions",
|
||||
},
|
||||
{
|
||||
label: "幂运算(pow)",
|
||||
value: "Math.pow",
|
||||
icon: "functions",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
value: "quickcomposer.data.random",
|
||||
label: "随机数",
|
||||
config: [
|
||||
{
|
||||
label: "整数",
|
||||
type: "switch",
|
||||
defaultValue: false,
|
||||
width: 1,
|
||||
},
|
||||
{
|
||||
label: "起始值",
|
||||
icon: "last_page",
|
||||
type: "numInput",
|
||||
width: 10,
|
||||
},
|
||||
{
|
||||
label: "结束值",
|
||||
icon: "first_page",
|
||||
type: "numInput",
|
||||
width: 10,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: "quickcomposer.data.reverseString",
|
||||
|
||||
Reference in New Issue
Block a user