diff --git a/packages/li-editor/src/widgets/LayersPanel/LayerList/LayerItem/style.ts b/packages/li-editor/src/widgets/LayersPanel/LayerList/LayerItem/style.ts index d1814b7d..864c6673 100644 --- a/packages/li-editor/src/widgets/LayersPanel/LayerList/LayerItem/style.ts +++ b/packages/li-editor/src/widgets/LayersPanel/LayerList/LayerItem/style.ts @@ -3,7 +3,7 @@ import { useAntdToken } from '../../../../hooks'; import { LayerIconBg } from './constant'; const useStyle = () => { - const { colorBgContainer, colorSplit, colorPrimary, borderRadius } = useAntdToken(); + const { antCls, colorBgContainer, colorSplit, colorPrimary, borderRadius } = useAntdToken(); return { layerItem: css` @@ -56,7 +56,7 @@ const useStyle = () => { height: 100%; cursor: pointer; - .ant-space-item:last-child { + ${antCls}-space-item:last-child { margin-left: -5px !important; } diff --git a/packages/li-p2/src/LayerAttribute/components/ResterScaleSelector/CustomMappingColors/CustomCat/CustomItem/style.ts b/packages/li-p2/src/LayerAttribute/components/ResterScaleSelector/CustomMappingColors/CustomCat/CustomItem/style.ts index 0a1b9019..92816529 100644 --- a/packages/li-p2/src/LayerAttribute/components/ResterScaleSelector/CustomMappingColors/CustomCat/CustomItem/style.ts +++ b/packages/li-p2/src/LayerAttribute/components/ResterScaleSelector/CustomMappingColors/CustomCat/CustomItem/style.ts @@ -43,14 +43,14 @@ export default genStyleHook('rester-scale-selector__custom-input', (token) => { zIndex: 1, }, - '.ant-popover': { + [`${antCls}-popover`]: { zIndex: '4 !important', - '.ant-color-picker-presets .ant-collapse-item .ant-collapse-header': { + [`${antCls}-color-picker-presets ${antCls}-collapse-item ${antCls}-collapse-header`]: { display: 'none', }, }, - '.ant-color-picker .ant-color-picker-panel .ant-color-picker-inner-panel-divider': { + [`${antCls}-color-picker ${antCls}-color-picker-panel ${antCls}-color-picker-inner-panel-divider`]: { margin: '3px 8px ', }, }; diff --git a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/InputNumber/style.ts b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/InputNumber/style.ts index 258f89b8..fc3bfc03 100644 --- a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/InputNumber/style.ts +++ b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/InputNumber/style.ts @@ -1,7 +1,7 @@ import { genStyleHook } from '@formily/antd-v5/esm/__builtins__'; export default genStyleHook('scale-selector__custom-input__number', (token) => { - const { componentCls } = token; + const { componentCls, antCls } = token; return { [componentCls]: { @@ -17,7 +17,7 @@ export default genStyleHook('scale-selector__custom-input__number', (token) => { width: '50px', }, - '.ant-input-number-input-wrap': { + [`${antCls}-input-number-input-wrap`]: { input: { fontSize: '12px', }, diff --git a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/style.ts b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/style.ts index ec677b9e..818ec631 100644 --- a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/style.ts +++ b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomNumber/CustomItem/style.ts @@ -43,14 +43,14 @@ export default genStyleHook('scale-selector__custom-content__custom-number__inpu zIndex: 1, }, - '.ant-popover': { + [`${antCls}-popover`]: { zIndex: '4 !important', - '.ant-color-picker-presets .ant-collapse-item .ant-collapse-header': { + [`${antCls}-color-picker-presets ${antCls}-collapse-item ${antCls}-collapse-header`]: { display: 'none', }, }, - '.ant-color-picker .ant-color-picker-panel .ant-color-picker-inner-panel-divider': { + [`${antCls}-color-picker ${antCls}-color-picker-panel ${antCls}-color-picker-inner-panel-divider`]: { margin: '3px 8px ', }, }; diff --git a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/CustomItem/style.ts b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/CustomItem/style.ts index 52fae478..6ec4a782 100644 --- a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/CustomItem/style.ts +++ b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/CustomItem/style.ts @@ -44,14 +44,14 @@ export default genStyleHook('scale-selector__custom-string', (token) => { zIndex: 1, }, - '.ant-popover': { + [`${antCls}-popover`]: { zIndex: '4 !important', - '.ant-color-picker-presets .ant-collapse-item .ant-collapse-header': { + [`${antCls}-color-picker-presets ${antCls}-collapse-item ${antCls}-collapse-header`]: { display: 'none', }, }, - '.ant-color-picker .ant-color-picker-panel .ant-color-picker-inner-panel-divider': { + [`${antCls}-color-picker ${antCls}-color-picker-panel ${antCls}-color-picker-inner-panel-divider`]: { margin: '3px 8px ', }, }; diff --git a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/UnknownItem/style.ts b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/UnknownItem/style.ts index e84a732a..cebe9ec7 100644 --- a/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/UnknownItem/style.ts +++ b/packages/li-p2/src/LayerAttribute/components/ScaleSelector/CustomMappingColors/CustomString/UnknownItem/style.ts @@ -41,14 +41,13 @@ export default genStyleHook('scale-selector__custom-string-unknown', (token) => zIndex: 1, }, - '.ant-popover': { + [`${antCls}-popover`]: { zIndex: '4 !important', - '.ant-color-picker-presets .ant-collapse-item .ant-collapse-header': { + [`${antCls}-color-picker-presets ${antCls}-collapse-item ${antCls}-collapse-header`]: { display: 'none', }, }, - - '.ant-color-picker .ant-color-picker-panel .ant-color-picker-inner-panel-divider': { + [`${antCls}-color-picker ${antCls}-color-picker-panel ${antCls}-color-picker-inner-panel-divider`]: { margin: '3px 8px ', }, }; diff --git a/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/CustomRange/RangeItem/style.ts b/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/CustomRange/RangeItem/style.ts index 5f981aa7..a2274c00 100644 --- a/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/CustomRange/RangeItem/style.ts +++ b/packages/li-p2/src/components/Formily/ColorRangeSelector/Internal/CustomRange/RangeItem/style.ts @@ -1,7 +1,15 @@ import { genStyleHook } from '@formily/antd-v5/esm/__builtins__'; export default genStyleHook('color-range-selector__custom-range__range-item', (token) => { - const { componentCls, antCls, colorTextSecondary, colorBorder, colorInfoTextHover, controlItemBgHover } = token; + const { + componentCls, + antCls, + colorTextSecondary, + colorBorder, + colorInfoTextHover, + controlItemBgHover, + borderRadius, + } = token; return { [componentCls]: { @@ -30,7 +38,7 @@ export default genStyleHook('color-range-selector__custom-range__range-item', (t paddingLeft: '3px', '&:hover': { - borderRadius: 4, + borderRadius: `${borderRadius}px`, background: controlItemBgHover, }, }, @@ -75,14 +83,14 @@ export default genStyleHook('color-range-selector__custom-range__range-item', (t }, }, - '.ant-popover': { + [`${antCls}-popover`]: { zIndex: '4 !important', - '.ant-color-picker-presets .ant-collapse-item .ant-collapse-header': { + [`${antCls}-color-picker-presets ${antCls}-collapse-item ${antCls}-collapse-header`]: { display: 'none', }, }, - '.ant-color-picker .ant-color-picker-panel .ant-color-picker-inner-panel-divider': { + [`${antCls}-color-picker ${antCls}-color-picker-panel ${antCls}-color-picker-inner-panel-divider`]: { margin: '3px 8px ', }, };