mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
d0483f07b3
@ -110,6 +110,9 @@ const CollectionFieldInternalField = (props) => {
|
|||||||
if (fieldSchema['x-read-pretty'] === true && !field.readPretty) {
|
if (fieldSchema['x-read-pretty'] === true && !field.readPretty) {
|
||||||
field.readPretty = true;
|
field.readPretty = true;
|
||||||
}
|
}
|
||||||
|
if (fieldSchema['x-disabled'] === true) {
|
||||||
|
field.disabled = true;
|
||||||
|
}
|
||||||
field.data = field.data || {};
|
field.data = field.data || {};
|
||||||
field.data.dataSource = uiSchema?.enum;
|
field.data.dataSource = uiSchema?.enum;
|
||||||
}, [field, fieldSchema]);
|
}, [field, fieldSchema]);
|
||||||
|
@ -45,16 +45,16 @@ describe('CollectionSelect', () => {
|
|||||||
expect(container).toMatchInlineSnapshot(`
|
expect(container).toMatchInlineSnapshot(`
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="css-dev-only-do-not-override-1rquknz ant-app"
|
class="css-dev-only-do-not-override-qu8jc9 ant-app"
|
||||||
style="height: 100%;"
|
style="height: 100%;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-label="block-item-demo title"
|
aria-label="block-item-demo title"
|
||||||
class="nb-block-item nb-form-item css-9qorhu ant-nb-block-item css-dev-only-do-not-override-1rquknz"
|
class="nb-block-item nb-form-item css-9qorhu ant-nb-block-item css-dev-only-do-not-override-qu8jc9"
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="css-1yh5po ant-formily-item ant-formily-item-layout-horizontal ant-formily-item-feedback-layout-loose ant-formily-item-label-align-right ant-formily-item-control-align-left css-dev-only-do-not-override-1rquknz"
|
class="css-vij405 ant-formily-item ant-formily-item-layout-horizontal ant-formily-item-feedback-layout-loose ant-formily-item-label-align-right ant-formily-item-control-align-left css-dev-only-do-not-override-qu8jc9"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-formily-item-label"
|
class="ant-formily-item-label"
|
||||||
@ -84,7 +84,7 @@ describe('CollectionSelect', () => {
|
|||||||
class="ant-formily-item-control-content-component"
|
class="ant-formily-item-control-content-component"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-select ant-select-outlined css-dev-only-do-not-override-1rquknz ant-select-focused ant-select-single ant-select-show-arrow ant-select-show-search"
|
class="ant-select css-dev-only-do-not-override-qu8jc9 ant-select-focused ant-select-single ant-select-show-arrow ant-select-show-search"
|
||||||
data-testid="select-collection"
|
data-testid="select-collection"
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
@ -98,31 +98,27 @@ describe('CollectionSelect', () => {
|
|||||||
class="ant-select-selector"
|
class="ant-select-selector"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-select-selection-wrap"
|
class="ant-select-selection-search"
|
||||||
>
|
>
|
||||||
<span
|
<input
|
||||||
class="ant-select-selection-search"
|
aria-autocomplete="list"
|
||||||
>
|
aria-controls="rc_select_TEST_OR_SSR_list"
|
||||||
<input
|
aria-expanded="false"
|
||||||
aria-autocomplete="list"
|
aria-haspopup="listbox"
|
||||||
aria-controls="rc_select_TEST_OR_SSR_list"
|
aria-owns="rc_select_TEST_OR_SSR_list"
|
||||||
aria-expanded="false"
|
autocomplete="off"
|
||||||
aria-haspopup="listbox"
|
class="ant-select-selection-search-input"
|
||||||
aria-owns="rc_select_TEST_OR_SSR_list"
|
id="rc_select_TEST_OR_SSR"
|
||||||
autocomplete="off"
|
role="button"
|
||||||
class="ant-select-selection-search-input"
|
type="search"
|
||||||
id="rc_select_TEST_OR_SSR"
|
value=""
|
||||||
role="button"
|
/>
|
||||||
type="search"
|
</span>
|
||||||
value=""
|
<span
|
||||||
/>
|
class="ant-select-selection-item"
|
||||||
</span>
|
title="Users"
|
||||||
<span
|
>
|
||||||
class="ant-select-selection-item"
|
Users
|
||||||
title="Users"
|
|
||||||
>
|
|
||||||
Users
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
@ -186,16 +182,16 @@ describe('CollectionSelect', () => {
|
|||||||
expect(container).toMatchInlineSnapshot(`
|
expect(container).toMatchInlineSnapshot(`
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="css-dev-only-do-not-override-1rquknz ant-app"
|
class="css-dev-only-do-not-override-qu8jc9 ant-app"
|
||||||
style="height: 100%;"
|
style="height: 100%;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-label="block-item-demo title"
|
aria-label="block-item-demo title"
|
||||||
class="nb-block-item nb-form-item css-9qorhu ant-nb-block-item css-dev-only-do-not-override-1rquknz"
|
class="nb-block-item nb-form-item css-9qorhu ant-nb-block-item css-dev-only-do-not-override-qu8jc9"
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="css-1yh5po ant-formily-item ant-formily-item-layout-horizontal ant-formily-item-feedback-layout-loose ant-formily-item-label-align-right ant-formily-item-control-align-left css-dev-only-do-not-override-1rquknz"
|
class="css-vij405 ant-formily-item ant-formily-item-layout-horizontal ant-formily-item-feedback-layout-loose ant-formily-item-label-align-right ant-formily-item-control-align-left css-dev-only-do-not-override-qu8jc9"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="ant-formily-item-label"
|
class="ant-formily-item-label"
|
||||||
@ -226,7 +222,7 @@ describe('CollectionSelect', () => {
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
class="ant-tag css-dev-only-do-not-override-1rquknz"
|
class="ant-tag css-dev-only-do-not-override-qu8jc9"
|
||||||
>
|
>
|
||||||
Users
|
Users
|
||||||
</span>
|
</span>
|
||||||
|
@ -37,6 +37,12 @@ const formItemWrapCss = css`
|
|||||||
.ant-description-textarea img {
|
.ant-description-textarea img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
&.ant-formily-item-layout-vertical .ant-formily-item-label {
|
||||||
|
display: inline;
|
||||||
|
.ant-formily-item-label-content {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const formItemLabelCss = css`
|
const formItemLabelCss = css`
|
||||||
@ -44,7 +50,7 @@ const formItemLabelCss = css`
|
|||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
}
|
}
|
||||||
> .ant-formily-item-label {
|
> .ant-formily-item-label {
|
||||||
display: none;
|
display: none !important;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -83,7 +89,7 @@ export const FormItem: any = withDynamicSchemaProps(
|
|||||||
[formItemLabelCss]: showTitle === false,
|
[formItemLabelCss]: showTitle === false,
|
||||||
});
|
});
|
||||||
}, [showTitle]);
|
}, [showTitle]);
|
||||||
|
console.log(className);
|
||||||
// 联动规则中的“隐藏保留值”的效果
|
// 联动规则中的“隐藏保留值”的效果
|
||||||
if (field.data?.hidden) {
|
if (field.data?.hidden) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user