@teamias/pro-layout 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,9 +4,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
5
  import { LogoutOutlined, UserOutlined } from '@ant-design/icons';
6
6
  import { Avatar, Dropdown, Modal } from 'antd';
7
- import { LOCAL_STORAGE } from "../constant";
8
7
  import { useLayoutContext } from "../context";
9
- import { setLocalStorageItem } from "../utils";
10
8
  import { jsx as _jsx } from "react/jsx-runtime";
11
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
10
  export var AvatarItem = function AvatarItem(_ref) {
@@ -27,19 +25,21 @@ export var AvatarItem = function AvatarItem(_ref) {
27
25
  _context.next = 3;
28
26
  return onLogout();
29
27
  case 3:
30
- setLocalStorageItem(LOCAL_STORAGE.ACCESS_TOKEN, '');
28
+ // setLocalStorageItem(LOCAL_STORAGE.ACCESS_TOKEN, '');
29
+ localStorage.clear();
30
+ sessionStorage.clear();
31
31
  updateData({}, 'replace');
32
- _context.next = 10;
32
+ _context.next = 11;
33
33
  break;
34
- case 7:
35
- _context.prev = 7;
34
+ case 8:
35
+ _context.prev = 8;
36
36
  _context.t0 = _context["catch"](0);
37
37
  console.error(_context.t0);
38
- case 10:
38
+ case 11:
39
39
  case "end":
40
40
  return _context.stop();
41
41
  }
42
- }, _callee, null, [[0, 7]]);
42
+ }, _callee, null, [[0, 8]]);
43
43
  }));
44
44
  function onOk() {
45
45
  return _onOk.apply(this, arguments);
@@ -110,6 +110,10 @@ var InlineProLayout = function InlineProLayout(_ref) {
110
110
  return /*#__PURE__*/_jsxs(_Fragment, {
111
111
  children: [layoutContext.token ? /*#__PURE__*/_jsxs(_Fragment, {
112
112
  children: [/*#__PURE__*/_jsx(DocumentTitle, {}), /*#__PURE__*/_jsxs(Layout, {
113
+ style: {
114
+ '--header-height': layoutContext.headerHeight,
115
+ '--content-height': "calc(100vh - ".concat(layoutContext.headerHeight, ")")
116
+ },
113
117
  children: [/*#__PURE__*/_jsxs(Header, {
114
118
  children: [/*#__PURE__*/_jsxs(HeaderLogo, {
115
119
  "data-aside-width": layoutContext.defaultMaxAsideWidth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamias/pro-layout",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",