Skip to content

Commit cd7c5a2

Browse files
authored
Merge pull request lowcoder-org#299 from lvhuichao/develop
PR 0309
2 parents 92e1c67 + bacbaec commit cd7c5a2

File tree

66 files changed

+1372
-384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1372
-384
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.6
1+
1.1.7

client/packages/openblocks-core/lib/index.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3338,7 +3338,8 @@ var MultiBaseComp = /** @class */ (function (_super) {
33383338
MultiBaseComp.prototype.reduce = function (action) {
33393339
var comp = this.reduceOrUndefined(action);
33403340
if (!comp) {
3341-
throw new Error("not supported action, should not happen");
3341+
console.warn("not supported action, should not happen, action:", action, "\ncurrent comp:", this);
3342+
return this;
33423343
}
33433344
return comp;
33443345
};

client/packages/openblocks-core/lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3330,7 +3330,8 @@ var MultiBaseComp = /** @class */ (function (_super) {
33303330
MultiBaseComp.prototype.reduce = function (action) {
33313331
var comp = this.reduceOrUndefined(action);
33323332
if (!comp) {
3333-
throw new Error("not supported action, should not happen");
3333+
console.warn("not supported action, should not happen, action:", action, "\ncurrent comp:", this);
3334+
return this;
33343335
}
33353336
return comp;
33363337
};

client/packages/openblocks-core/src/baseComps/multiBaseComp.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ export abstract class MultiBaseComp<
6363
override reduce(action: CompAction): this {
6464
const comp = this.reduceOrUndefined(action);
6565
if (!comp) {
66-
throw new Error("not supported action, should not happen");
66+
console.warn(
67+
"not supported action, should not happen, action:",
68+
action,
69+
"\ncurrent comp:",
70+
this
71+
);
72+
return this;
6773
}
6874
return comp;
6975
}

client/packages/openblocks-design/src/components/CustomModal.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const ModalHeaderTitle = styled.div`
4444
color: #222222;
4545
flex-grow: 1;
4646
min-width: 0;
47+
height: 16px;
4748
display: flex;
4849
align-items: center;
4950
@@ -58,6 +59,7 @@ const ModalCloseIcon = styled.div`
5859
margin-left: 16px;
5960
width: 16px;
6061
height: 16px;
62+
display: flex;
6163
cursor: pointer;
6264
color: ${GreyTextColor};
6365
@@ -101,8 +103,8 @@ export const ModalFooterWrapper = styled.div`
101103
height: 28px;
102104
margin-top: 12px;
103105
margin-left: 8px;
104-
padding-left: 12px;
105-
padding-right: 12px;
106+
padding-left: 11px;
107+
padding-right: 11px;
106108
}
107109
`;
108110

@@ -268,6 +270,7 @@ CustomModal.confirm = (props: {
268270
bodyStyle?: React.CSSProperties;
269271
footer?: ReactNode;
270272
type?: "info" | "warn" | "error" | "success";
273+
width?: number | string;
271274
}): any => {
272275
const defaultConfirmProps: ModalFuncProps = {
273276
...DEFAULT_PROPS,
@@ -317,6 +320,7 @@ CustomModal.confirm = (props: {
317320
okText={props.okText}
318321
bodyStyle={{ ...defaultConfirmProps.bodyStyle, ...props.bodyStyle }}
319322
footer={props.footer}
323+
width={props.width}
320324
/>
321325
),
322326
});

client/packages/openblocks-design/src/components/Menu.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ const StyledAntdMenu = styled(AntdMenu)`
7777
.ant-menu-item:focus-visible {
7878
box-shadow: unset;
7979
}
80+
81+
.ant-menu-item-disabled .text {
82+
color: #b8b9bf;
83+
& + span {
84+
opacity: 0.4;
85+
}
86+
}
8087
`;
8188

8289
const MenuItemContentWrapper = styled.div`

client/packages/openblocks-design/src/components/form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ const FormSelect = (props: any) => {
321321
return (
322322
<SelectWrapper>
323323
<CustomSelect
324+
open={props.open}
324325
mode={props.mode}
325326
value={value}
326327
style={{
@@ -352,7 +353,7 @@ const FormSelect = (props: any) => {
352353

353354
export interface FormSelectItemProps<T extends OptionsType>
354355
extends FormItemProps,
355-
Pick<SelectProps, "mode"> {
356+
Pick<SelectProps, "mode" | "open"> {
356357
options: T;
357358
afterChange?: (value: ValueFromOption<T>) => void;
358359
}
Lines changed: 18 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)