Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix 0802 #192

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/playground/src/helpers/mock-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ import { OutButton } from "../components";
class App extends React.Component {
render() {
return (
<Page title={tango.stores.app.title} subTitle={111}>
<Page title={tango.stores.app.title} subTitle={<><Button>hello</Button></>}>
<Section tid="section0" />
<Section tid="section1" title="Section Title">
your input: <Input tid="input1" defaultValue="hello" />
Expand Down
2 changes: 1 addition & 1 deletion packages/designer/src/workspace-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const WorkspaceView = observer((props: WorkspaceViewProps) => {
{children}
{/* 添加组件弹层 */}
{display === 'block' && <ComponentsPopover type="inner" isControlled />}
{mode === 'design' && <FileErrorsOverlay />}
{designer.activeView === 'design' && <FileErrorsOverlay />}
</Box>
);
});
2 changes: 1 addition & 1 deletion packages/helpers/src/helpers/code-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function isValidFunctionCode(str: string) {
}
}

const templatePattern = /^{{(.+)}}$/;
const templatePattern = /^{{([\s\S]+)}}$/;

/**
* 判断给定代码是否被双花括号包裹
Expand Down
13 changes: 13 additions & 0 deletions packages/helpers/tests/code-helper.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { isWrappedCode } from '../src/helpers';

describe('helpers/codeHelper', () => {
it('isWrappedCode', () => {
expect(isWrappedCode('{{[]}}')).toBeTruthy(); // true
expect(isWrappedCode('{{{}}}')).toBeTruthy(); // true
expect(isWrappedCode('{{this.foo}}')).toBeTruthy(); // true
expect(isWrappedCode('{{123}}')).toBeTruthy(); // true
expect(isWrappedCode('{{() => {}}}')).toBeTruthy(); // true
expect(isWrappedCode('{{<Button>button</Button>}}')).toBeTruthy(); // true
expect(isWrappedCode('{{<>\n<Button>hello</Button>\n</>}}')).toBeTruthy(); // true
});
});
2 changes: 1 addition & 1 deletion packages/setting-form/src/setters/text-setter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function TextSetter({

const autoSize = {
minRows: 2,
maxRows: 5,
maxRows: 6,
};

export function TextAreaSetter({
Expand Down
Loading