diff --git a/examples/builder/src/constans/projects.ts b/examples/builder/src/constans/projects.ts index d9fa1053..90902270 100644 --- a/examples/builder/src/constans/projects.ts +++ b/examples/builder/src/constans/projects.ts @@ -484,7 +484,7 @@ const DEFAULT_ANALYSIS_APP: Application = { select: { fillColor: false, strokeColor: 'red' }, }, label: { - field: '', + field: undefined, visible: false, style: { fill: '#454d64', diff --git a/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.less b/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.less index 3560e77f..33217c60 100644 --- a/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.less +++ b/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.less @@ -51,30 +51,18 @@ text-align: center; } - &__selected-option { - display: flex; - align-items: center; - width: 100%; - height: 100%; - margin: 0; - } - &__selected-icon { - width: 22px; - height: 22px; + width: 15px; + height: 15px; color: @primary-color-1; background-image: url(@layer-icon-bg); background-repeat: no-repeat; - background-size: 22px 22px; + background-size: 15px 15px; border-radius: @border-radius; svg { - width: 22px; - height: 22px; + width: 15px; + height: 15px; } } - - &__selected-label { - margin-left: 12px; - } } diff --git a/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.tsx b/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.tsx index 22888326..50287f9a 100644 --- a/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.tsx +++ b/packages/li-editor/src/widgets/LayersPanel/LayerAttribute/BaseFormSchemaField/VisTypeSelect/VisTypeSelect.tsx @@ -44,12 +44,8 @@ const VisTypeSelect: React.FC> = (props) => { {options?.map((item: Record, index) => { return ( -
-
- -
- {item.label} -
+ + {item.label}
); })} diff --git a/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/index.tsx b/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/index.tsx index c99c24bc..29f75c17 100644 --- a/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/index.tsx +++ b/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/index.tsx @@ -61,19 +61,18 @@ const Internal = (props: ColorRangeSelectorProps) => { return ( -
- {colorList.map((color) => ( - - ))} -
+ {colorList.map((color) => ( + + ))}
); })} diff --git a/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/style.ts b/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/style.ts index 917074a8..4b74863f 100644 --- a/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/style.ts +++ b/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/style.ts @@ -7,6 +7,12 @@ export default genStyleHook('color-range-selector', (token) => { [componentCls]: { maxWidth: 260, + [`${antCls}-select-selection-item`]: { + span: { + marginTop: 10, + }, + }, + [`${componentCls}__selection-item`]: { display: 'flex', alignItems: 'center', diff --git a/packages/li-p2/src/components/Formily/ControlPositionSelect/Select/index.tsx b/packages/li-p2/src/components/Formily/ControlPositionSelect/Select/index.tsx index 8a607377..2e71ad7b 100644 --- a/packages/li-p2/src/components/Formily/ControlPositionSelect/Select/index.tsx +++ b/packages/li-p2/src/components/Formily/ControlPositionSelect/Select/index.tsx @@ -1,30 +1,13 @@ /* eslint-disable react/no-array-index-key */ -import { usePrefixCls } from '@formily/antd-v5/esm/__builtins__'; import type { SelectProps } from 'antd'; import { Select } from 'antd'; -import cls from 'classnames'; import React from 'react'; import { POSITION } from './contants'; -import useStyle from './style'; const PositionSelect: React.FC = (props) => { const { options, ...prop } = props; - const prefixCls = usePrefixCls('formily-position-select'); - const [wrapSSR, hashId] = useStyle(prefixCls); - return wrapSSR( - , - ); + return