You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.8 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. import { createStyles } from '@/theme'
  2. import { useScrollStyle } from '@/hooks/useScrollStyle'
  3. export const useStyle = createStyles(({ token, css, cx, prefixCls }, props: any) => {
  4. const prefix = `${prefixCls}-${token?.proPrefix}-edit-component`
  5. const { scrollbarBackground } = useScrollStyle()
  6. const container = css`
  7. --heaer-height: 65px;
  8. --footer-height: 50px;
  9. position: relative!important;
  10. .ant-layout-sider-children{
  11. //display: flex;
  12. }
  13. .ant-menu{
  14. border-inline-end: none!important;
  15. }
  16. .ant-menu .ant-menu-item, .ant-menu .ant-menu-submenu, .ant-menu .ant-menu-submenu-title {
  17. border-radius: 0;
  18. margin: 0;
  19. width: 100%;
  20. flex: 1;
  21. min-width: 200px;
  22. }
  23. .ant-drawer-content{
  24. --heaer-height: 65px;
  25. --footer-height: 50px;
  26. }
  27. .ant-modal-content{
  28. --heaer-height: 57px;
  29. --footer-height: 50px;
  30. }
  31. `
  32. const sider = css`
  33. .ant-layout-sider-children {
  34. display: flex;
  35. overflow-y: auto;
  36. overflow-x: hidden;
  37. position: fixed !important;
  38. //top: 0;
  39. //bottom: 0;
  40. border-inline-end: 1px solid rgba(5, 5, 5, 0.06);
  41. height: calc(100% - var(--heaer-height, 0) - var(--footer-height, 0));
  42. z-index: 10;
  43. ${scrollbarBackground}
  44. }
  45. `
  46. const body = css`
  47. //padding: 30px;
  48. overflow-x: hidden;
  49. flex: 1;
  50. gap: 1px;
  51. .ant-pro-form-group-title{
  52. margin-block-end: 10px;
  53. font-size: 16px;
  54. border-bottom: 1px solid #f0f0f0;
  55. padding-block-end: 10px;
  56. }
  57. .ant-form-item-control-input{
  58. .ant-pro-card-body{
  59. padding: 0;
  60. }
  61. }
  62. `
  63. return {
  64. container: cx(prefix, props?.className, container),
  65. body,
  66. sider,
  67. }
  68. })