Skip to content

Commit

Permalink
fix: antd 变量
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Jan 17, 2024
1 parent 4e97d5f commit ae024fe
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -56,7 +56,7 @@ const useStyle = () => {
height: 100%;
cursor: pointer;
.ant-space-item:last-child {
${antCls}-space-item:last-child {
margin-left: -5px !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ',
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -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]: {
Expand All @@ -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',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ',
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ',
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -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]: {
Expand Down Expand Up @@ -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,
},
},
Expand Down Expand Up @@ -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 ',
},
};
Expand Down

0 comments on commit ae024fe

Please sign in to comment.