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.

69 lines
1.4 KiB

10 months 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: 57px;
  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: 57px;
  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. ${scrollbarBackground}
  43. }
  44. `
  45. const body = css`
  46. padding: 30px;
  47. flex: 1;
  48. `
  49. return {
  50. container: cx(prefix, props?.className, container),
  51. body,
  52. sider,
  53. }
  54. })