UNPKG

@ant-design/pro-layout

Version:
57 lines 2.77 kB
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import { useStyle as useAntdStyle } from '@ant-design/pro-provider'; var genProLayoutHeaderStyle = function genProLayoutHeaderStyle(token) { var _token$layout, _token$layout2, _token$layout3, _token$layout4; return _defineProperty({}, "".concat(token.proComponentsCls, "-layout"), _defineProperty({}, "".concat(token.antCls, "-layout-header").concat(token.componentCls), { height: ((_token$layout = token.layout) === null || _token$layout === void 0 || (_token$layout = _token$layout.header) === null || _token$layout === void 0 ? void 0 : _token$layout.heightLayoutHeader) || 56, lineHeight: "".concat(((_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.header) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.heightLayoutHeader) || 56, "px"), // hitu 用了这个属性,不能删除哦 @南取 zIndex: 19, width: '100%', paddingBlock: 0, paddingInline: 0, borderBlockEnd: "1px solid ".concat(token.colorSplit), backgroundColor: ((_token$layout3 = token.layout) === null || _token$layout3 === void 0 || (_token$layout3 = _token$layout3.header) === null || _token$layout3 === void 0 ? void 0 : _token$layout3.colorBgHeader) || 'rgba(255, 255, 255, 0.4)', WebkitBackdropFilter: 'blur(8px)', backdropFilter: 'blur(8px)', transition: 'background-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)', '&-fixed-header': { position: 'fixed', insetBlockStart: 0, width: '100%', zIndex: 100, insetInlineEnd: 0 }, '&-fixed-header-scroll': { backgroundColor: ((_token$layout4 = token.layout) === null || _token$layout4 === void 0 || (_token$layout4 = _token$layout4.header) === null || _token$layout4 === void 0 ? void 0 : _token$layout4.colorBgScrollHeader) || 'rgba(255, 255, 255, 0.8)' }, '&-header-actions': { display: 'flex', alignItems: 'center', fontSize: '16', cursor: 'pointer', '& &-item': { paddingBlock: 0, paddingInline: 8, '&:hover': { color: token.colorText } } }, '&-header-realDark': { boxShadow: '0 2px 8px 0 rgba(0, 0, 0, 65%)' }, '&-header-actions-header-action': { transition: 'width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)' } })); }; export function useStyle(prefixCls) { return useAntdStyle('ProLayoutHeader', function (token) { var ProLayoutHeaderToken = _objectSpread(_objectSpread({}, token), {}, { componentCls: ".".concat(prefixCls) }); return [genProLayoutHeaderStyle(ProLayoutHeaderToken)]; }); }