mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-16 08:04:18 +08:00
支持在配置文件中为每一个函数指定特有参数
This commit is contained in:
@@ -34,8 +34,20 @@ export default defineComponent({
|
||||
localCommand() {
|
||||
return this.modelValue;
|
||||
},
|
||||
// 通用参数配置
|
||||
commonConfig() {
|
||||
return this.modelValue.config || [];
|
||||
},
|
||||
// 特定函数独有参数配置
|
||||
functionConfig() {
|
||||
return (
|
||||
this.modelValue.functionSelector?.options.find(
|
||||
(item) => item.value === this.funcName
|
||||
)?.config || []
|
||||
);
|
||||
},
|
||||
localConfig() {
|
||||
return (this.modelValue.config || []).map((item) => {
|
||||
return [...this.commonConfig, ...this.functionConfig].map((item) => {
|
||||
return {
|
||||
...item,
|
||||
value: item.defaultValue,
|
||||
|
||||
Reference in New Issue
Block a user