Skip to content

Commit 908c912

Browse files
authored
Merge pull request #1575 from easyops-cn/steve/batch-agent
feat(): add eo-batch-agent
2 parents 364a98b + 5fe5c19 commit 908c912

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

bricks/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"start": "cross-env NODE_ENV=development build-next-bricks --watch",
3333
"build": "npm run build:main && npm run build:types",
3434
"build:main": "cross-env NODE_ENV=production build-next-bricks",
35-
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json && copy-jsx-d-ts",
35+
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist-types --project tsconfig.json",
3636
"build:manifest": "cross-env NODE_ENV=production build-next-bricks --manifest-only",
3737
"test": "cross-env NODE_ENV='test' test-next",
3838
"test:ci": "cross-env NODE_ENV='test' CI=true test-next",

bricks/basic/src/batch-agent/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const { defineElement, event, method } = createDecorators();
1818
*
1919
* 方法参数
2020
* - eo-event-agent trigger() 方法的参数会作为 EVENT.detail 传递给 trigger 事件。
21-
* - eo-batch-agent trigger() 方法的参数必须是字符串,表示事件类型,trigger 事件详情 为 { type: string } 形式。
21+
* - eo-batch-agent trigger() 方法的参数必须是字符串,表示事件类型,trigger 事件详情 为 `{ type: string }` 形式。
2222
* 因此,如果希望在事件回调时消费其他信息,需通过 context/state 进行传递。
2323
*/
2424
export

bricks/basic/src/bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ import "./viewport/index.js";
5353
import "./data-providers/require-modal-stack.js";
5454
import "./list/index.js";
5555
import "./toggle-link/index.js";
56+
import "./batch-agent/index.js";

bricks/icons/src/antd-icon/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,5 @@ export const WrappedAntdIcon = wrapLocalBrick<
147147

148148
function fixTheme(theme?: string) {
149149
// The icon theme for v2 is twoTone
150-
return (theme === "twoTone" ? "twotone" : theme) ?? "outlined";
150+
return (theme === "twoTone" ? "twotone" : theme) || "outlined";
151151
}

bricks/icons/src/easyops-icon/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class EasyOpsIcon extends NextElement implements EasyOpsIconProps {
6565
return;
6666
}
6767
const { category: _category, icon } = this;
68-
const category = _category ?? "default";
68+
const category = _category || "default";
6969
const url = icon
7070
? `${
7171
// istanbul ignore next

bricks/icons/src/fa-icon/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function FaIconComponent({
118118
gradientDirection,
119119
onIconFoundChange,
120120
}: FaIconComponentProps) {
121-
const prefix = _prefix ?? "fas";
121+
const prefix = _prefix || "fas";
122122
const [iconDefinition, setIconDefinition] = useState<IconDefinition | null>(
123123
null
124124
);

shared/common-bricks/common-bricks.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"eo-loading-container",
4242
"eo-viewport",
4343
"eo-list",
44-
"eo-toggle-link"
44+
"eo-toggle-link",
45+
"eo-batch-agent"
4546
],
4647
"icons": [
4748
"eo-antd-icon",

0 commit comments

Comments
 (0)