Compare commits
2 Commits
@egg/lark-
...
@egg/lark-
Author | SHA1 | Date | |
---|---|---|---|
6cc5313d2a | |||
3a783260b1 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -12122,7 +12122,7 @@
|
||||
},
|
||||
"packages/lark-msg-tool": {
|
||||
"name": "@egg/lark-msg-tool",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@egg/logger": "^1.4.4",
|
||||
|
@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.10.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.9.0...@egg/lark-msg-tool@1.10.0) (2024-10-15)
|
||||
|
||||
### Features
|
||||
|
||||
- **lark-msg:** genCard支持直接传入卡片定义 ([3a78326](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/3a783260b183d34f61464351da278cff94a9ec60))
|
||||
|
||||
# [1.9.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.8.0...@egg/lark-msg-tool@1.9.0) (2024-10-15)
|
||||
|
||||
### Features
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@egg/lark-msg-tool",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"description": "Lark Msg Tools for Egg projects",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import logger from "@egg/logger"
|
||||
import _ from "lodash"
|
||||
import _, { isObject } from "lodash"
|
||||
import { Logger } from "winston"
|
||||
|
||||
import { baseErrorCard, basePendingCard, baseSuccessCard } from "./component"
|
||||
@ -67,8 +67,8 @@ class LarkCard<
|
||||
)
|
||||
}
|
||||
|
||||
genCard(cardKey: keyof TCardMap, variables: { [key: string]: any }) {
|
||||
const card = this.cardMap[cardKey]
|
||||
genCard(cardKey: keyof TCardMap | object, variables: { [key: string]: any }) {
|
||||
const card = isObject(cardKey) ? cardKey : this.cardMap[cardKey]
|
||||
if (!card) {
|
||||
this.logger.error(`Card ${String(cardKey)} not found`)
|
||||
throw new Error(`Card ${String(cardKey)} not found`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user