mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 03:56:16 +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 { css } from '@emotion/css';
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useFormBlockContext } from '../../block-provider/FormBlockProvider';
|
||||
@ -47,7 +48,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
||||
blockCollectionName: collectionName,
|
||||
});
|
||||
const constantStyle = useMemo(() => {
|
||||
return { minWidth: 150, maxWidth: 430, marginLeft: 5 };
|
||||
return { minWidth: 150, maxWidth: 430 };
|
||||
}, []);
|
||||
const handleChangeOfConstant = useCallback(
|
||||
(value) => {
|
||||
@ -73,7 +74,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
||||
[collectionName, mode, setValue],
|
||||
);
|
||||
const textAreaStyle = useMemo(() => {
|
||||
return { minWidth: 460 };
|
||||
return { minWidth: 460, borderRadius: 0 };
|
||||
}, []);
|
||||
const compatScope = useMemo(() => {
|
||||
return compatOldVariables(scope, {
|
||||
@ -83,7 +84,16 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
||||
const modeMap = {
|
||||
// 常量
|
||||
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, {
|
||||
value: fieldValue?.value,
|
||||
schema,
|
||||
@ -140,7 +150,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
||||
onChange={(value) => {
|
||||
setMode(value);
|
||||
setValue({
|
||||
mode: value,
|
||||
mode: fieldValue?.mode,
|
||||
});
|
||||
}}
|
||||
>
|
||||
@ -150,7 +160,7 @@ export const ValueDynamicComponent = (props: ValueDynamicComponentProps) => {
|
||||
</Option>
|
||||
))}
|
||||
</Select>
|
||||
{modeMap[mode]}
|
||||
{modeMap[fieldValue?.mode || mode]}
|
||||
</Input.Group>
|
||||
);
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ const LinkageRulesTitle = (props) => {
|
||||
const value = array?.field?.value[index];
|
||||
return (
|
||||
<Input.TextArea
|
||||
value={value.title}
|
||||
value={value.title || t('Linkage rule')}
|
||||
defaultValue={t('Linkage rule')}
|
||||
onChange={(ev) => {
|
||||
ev.stopPropagation();
|
||||
|
Loading…
Reference in New Issue
Block a user