mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-16 08:04:18 +08:00
添加函数返回、完善注入JS功能
This commit is contained in:
@@ -102,6 +102,9 @@ export default defineComponent({
|
||||
this.updateModelValue(this.funcName, newArgvs);
|
||||
},
|
||||
generateCode(funcName, argvs) {
|
||||
if (this.localCommand.isExpression) {
|
||||
return argvs.join("");
|
||||
}
|
||||
/**
|
||||
* 字符串模式stringfiy后,null会变成'"null"', ''变成'""'
|
||||
* 变量模式stringify后,null变成'null', ''保持''
|
||||
@@ -140,6 +143,10 @@ export default defineComponent({
|
||||
let argvs = window.lodashM.cloneDeep(this.defaultArgvs);
|
||||
if (!code) return argvs;
|
||||
|
||||
if (this.localCommand.isExpression) {
|
||||
return [code];
|
||||
}
|
||||
|
||||
const variableFormatPaths = [];
|
||||
|
||||
const addVariableFormatPath = (prefix, config) => {
|
||||
|
||||
Reference in New Issue
Block a user