feat(lark-msg): genCard支持给value字段注入公共变量
All checks were successful
/ release (push) Successful in 23s
All checks were successful
/ release (push) Successful in 23s
This commit is contained in:
parent
6cc5313d2a
commit
d25208182b
@ -100,6 +100,13 @@ class LarkCard<
|
||||
} else if (_.isArray(obj)) {
|
||||
return obj.map(traverseAndReplace)
|
||||
} else if (_.isObject(obj)) {
|
||||
// 给 value 字段注入公共变量
|
||||
if ((obj as any).value && variables.commonValue) {
|
||||
;(obj as any).value = {
|
||||
...variables.commonValue,
|
||||
...((obj as any).value || {}),
|
||||
}
|
||||
}
|
||||
return _.mapValues(obj, traverseAndReplace)
|
||||
}
|
||||
return obj
|
||||
|
Loading…
x
Reference in New Issue
Block a user