mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:36:44 +00:00
Merge branch 'main' into next
Some checks are pending
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase Backend Test / sqlite-test (20, false) (push) Waiting to run
NocoBase Backend Test / sqlite-test (20, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, nocobase, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, nocobase, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, public, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, public, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, nocobase, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, nocobase, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, public, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, public, true) (push) Waiting to run
NocoBase Backend Test / mysql-test (20, false) (push) Waiting to run
NocoBase Backend Test / mysql-test (20, true) (push) Waiting to run
NocoBase Backend Test / mariadb-test (20, false) (push) Waiting to run
NocoBase Backend Test / mariadb-test (20, true) (push) Waiting to run
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run
Test on Windows / build (push) Waiting to run
Some checks are pending
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase Backend Test / sqlite-test (20, false) (push) Waiting to run
NocoBase Backend Test / sqlite-test (20, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, nocobase, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, nocobase, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, public, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (public, 20, public, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, nocobase, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, nocobase, true) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, public, false) (push) Waiting to run
NocoBase Backend Test / postgres-test (user_schema, 20, public, true) (push) Waiting to run
NocoBase Backend Test / mysql-test (20, false) (push) Waiting to run
NocoBase Backend Test / mysql-test (20, true) (push) Waiting to run
NocoBase Backend Test / mariadb-test (20, false) (push) Waiting to run
NocoBase Backend Test / mariadb-test (20, true) (push) Waiting to run
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run
Test on Windows / build (push) Waiting to run
This commit is contained in:
commit
4cb9d6b037
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Input, Select } from 'antd';
|
import { Input, Select } from 'antd';
|
||||||
|
import { css } from '@emotion/css';
|
||||||
import React, { useCallback, useMemo, useState } from 'react';
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useFormBlockContext } from '../../block-provider/FormBlockProvider';
|
import { useFormBlockContext } from '../../block-provider/FormBlockProvider';
|
||||||
@ -47,7 +48,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
|||||||
blockCollectionName: collectionName,
|
blockCollectionName: collectionName,
|
||||||
});
|
});
|
||||||
const constantStyle = useMemo(() => {
|
const constantStyle = useMemo(() => {
|
||||||
return { minWidth: 150, maxWidth: 430, marginLeft: 5 };
|
return { minWidth: 150, maxWidth: 430 };
|
||||||
}, []);
|
}, []);
|
||||||
const handleChangeOfConstant = useCallback(
|
const handleChangeOfConstant = useCallback(
|
||||||
(value) => {
|
(value) => {
|
||||||
@ -73,7 +74,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
|||||||
[collectionName, mode, setValue],
|
[collectionName, mode, setValue],
|
||||||
);
|
);
|
||||||
const textAreaStyle = useMemo(() => {
|
const textAreaStyle = useMemo(() => {
|
||||||
return { minWidth: 460 };
|
return { minWidth: 460, borderRadius: 0 };
|
||||||
}, []);
|
}, []);
|
||||||
const compatScope = useMemo(() => {
|
const compatScope = useMemo(() => {
|
||||||
return compatOldVariables(scope, {
|
return compatOldVariables(scope, {
|
||||||
@ -83,7 +84,16 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
|||||||
const modeMap = {
|
const modeMap = {
|
||||||
// 常量
|
// 常量
|
||||||
constant: (
|
constant: (
|
||||||
<div role="button" aria-label="dynamic-component-linkage-rules" style={constantStyle}>
|
<div
|
||||||
|
role="button"
|
||||||
|
aria-label="dynamic-component-linkage-rules"
|
||||||
|
style={constantStyle}
|
||||||
|
className={css`
|
||||||
|
.ant-input-affix-wrapper {
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
>
|
||||||
{React.createElement(DynamicComponent, {
|
{React.createElement(DynamicComponent, {
|
||||||
value: fieldValue?.value,
|
value: fieldValue?.value,
|
||||||
schema,
|
schema,
|
||||||
@ -140,7 +150,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
|||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
setMode(value);
|
setMode(value);
|
||||||
setValue({
|
setValue({
|
||||||
mode: value,
|
mode: fieldValue?.mode,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -150,7 +160,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
|||||||
</Option>
|
</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
{modeMap[mode]}
|
{modeMap[fieldValue?.mode || mode]}
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ const LinkageRulesTitle = (props) => {
|
|||||||
const value = array?.field?.value[index];
|
const value = array?.field?.value[index];
|
||||||
return (
|
return (
|
||||||
<Input.TextArea
|
<Input.TextArea
|
||||||
value={value.title}
|
value={value.title || t('Linkage rule')}
|
||||||
defaultValue={t('Linkage rule')}
|
defaultValue={t('Linkage rule')}
|
||||||
onChange={(ev) => {
|
onChange={(ev) => {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user