@titaui/pc 1.9.96 → 1.9.100
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.
- package/lib/components/nav-top/constant.js +2 -2
- package/lib/components/nav-top/utils.js +8 -0
- package/lib/components/table/index.js +12 -3
- package/lib/utils/bs-global.js +1 -1
- package/package.json +1 -1
- package/src/components/nav-top/constant.ts +2 -2
- package/src/components/nav-top/utils.ts +6 -1
- package/src/components/table/index.js +2 -0
- package/src/utils/bs-global.js +1 -1
|
@@ -46,7 +46,7 @@ var DEMO_FREE_MENU_CONFIG = {
|
|
|
46
46
|
defaultExpand: false,
|
|
47
47
|
domain: "",
|
|
48
48
|
groupId: 0,
|
|
49
|
-
href: "#demofree/list
|
|
49
|
+
href: "#demofree/list",
|
|
50
50
|
iconName: "",
|
|
51
51
|
id: 99998,
|
|
52
52
|
labelName: null,
|
|
@@ -56,7 +56,7 @@ var DEMO_FREE_MENU_CONFIG = {
|
|
|
56
56
|
signUrl: "",
|
|
57
57
|
status: 0,
|
|
58
58
|
tenantId: 0,
|
|
59
|
-
title: "
|
|
59
|
+
title: "预约演示",
|
|
60
60
|
type: "hash"
|
|
61
61
|
};
|
|
62
62
|
exports.DEMO_FREE_MENU_CONFIG = DEMO_FREE_MENU_CONFIG;
|
|
@@ -9,6 +9,8 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
9
9
|
|
|
10
10
|
var _logoWhite = _interopRequireDefault(require("./images/logo-white.png"));
|
|
11
11
|
|
|
12
|
+
var _constant = require("./constant");
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
15
|
|
|
14
16
|
var getMenus = function getMenus() {
|
|
@@ -17,6 +19,12 @@ var getMenus = function getMenus() {
|
|
|
17
19
|
navs.sort(function (pre, next) {
|
|
18
20
|
return pre.orderId - next.orderId;
|
|
19
21
|
});
|
|
22
|
+
var isTita = (0, _bsGlobal.getTenantInfo)().Id === 352728;
|
|
23
|
+
|
|
24
|
+
if (isTita) {
|
|
25
|
+
navs = navs.concat(_constant.DEMO_FREE_MENU_CONFIG);
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
return navs;
|
|
21
29
|
};
|
|
22
30
|
|
|
@@ -23,6 +23,8 @@ require("rc-table/assets/index.css");
|
|
|
23
23
|
|
|
24
24
|
require("./index.css");
|
|
25
25
|
|
|
26
|
+
var _excluded = ["prefixCls", "columns", "tableData", "tableLayout", "total", "rowSelection", "pageNum", "setPageNum", "disablePagination", "pageSize", "setPageSize", "id", "setTableXScroll"];
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
29
|
|
|
28
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -31,6 +33,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
31
33
|
|
|
32
34
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
35
|
|
|
36
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
37
|
+
|
|
34
38
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
39
|
|
|
36
40
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -51,6 +55,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
55
|
|
|
52
56
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
57
|
|
|
58
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
59
|
+
|
|
60
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
61
|
+
|
|
54
62
|
var preCls = "tita-pc";
|
|
55
63
|
|
|
56
64
|
var initTableData = function initTableData(tableData) {
|
|
@@ -79,7 +87,8 @@ function _default(props) {
|
|
|
79
87
|
setPageSize = props.setPageSize,
|
|
80
88
|
_props$id = props.id,
|
|
81
89
|
id = _props$id === void 0 ? "" : _props$id,
|
|
82
|
-
setTableXScroll = props.setTableXScroll
|
|
90
|
+
setTableXScroll = props.setTableXScroll,
|
|
91
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
83
92
|
|
|
84
93
|
var _useState = (0, _react.useState)(function () {
|
|
85
94
|
return initTableData(tableData);
|
|
@@ -232,14 +241,14 @@ function _default(props) {
|
|
|
232
241
|
if (!tableData || !tableData.length) return null;
|
|
233
242
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
243
|
className: (0, _classnames["default"])("".concat(preCls, "__table"))
|
|
235
|
-
}, /*#__PURE__*/_react["default"].createElement(_rcTable["default"], {
|
|
244
|
+
}, /*#__PURE__*/_react["default"].createElement(_rcTable["default"], _extends({
|
|
236
245
|
id: id,
|
|
237
246
|
className: (0, _classnames["default"])("".concat(preCls, "__table")),
|
|
238
247
|
prefixCls: prefixCls || "rc-table",
|
|
239
248
|
columns: getColumns(),
|
|
240
249
|
data: tdata,
|
|
241
250
|
tableLayout: tableLayout || "auto"
|
|
242
|
-
}), !disablePagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
251
|
+
}, restProps)), !disablePagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
243
252
|
className: (0, _classnames["default"])("".concat(preCls, "__table-pagination"))
|
|
244
253
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
245
254
|
className: (0, _classnames["default"])("".concat(preCls, "__table-pagination-left"))
|
package/lib/utils/bs-global.js
CHANGED
|
@@ -19,7 +19,7 @@ var getTenantInfo = function getTenantInfo() {
|
|
|
19
19
|
exports.getTenantInfo = getTenantInfo;
|
|
20
20
|
|
|
21
21
|
var getBSGlobal = function getBSGlobal(key) {
|
|
22
|
-
return window.BSGlobal[key];
|
|
22
|
+
return window.BSGlobal && window.BSGlobal[key];
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
exports.getBSGlobal = getBSGlobal;
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ export const DEMO_FREE_MENU_CONFIG = {
|
|
|
29
29
|
defaultExpand: false,
|
|
30
30
|
domain: "",
|
|
31
31
|
groupId: 0,
|
|
32
|
-
href: "#demofree/list
|
|
32
|
+
href: "#demofree/list",
|
|
33
33
|
iconName: "",
|
|
34
34
|
id: 99998,
|
|
35
35
|
labelName: null,
|
|
@@ -39,6 +39,6 @@ export const DEMO_FREE_MENU_CONFIG = {
|
|
|
39
39
|
signUrl: "",
|
|
40
40
|
status: 0,
|
|
41
41
|
tenantId: 0,
|
|
42
|
-
title: "
|
|
42
|
+
title: "预约演示",
|
|
43
43
|
type: "hash",
|
|
44
44
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { getTenantInfo } from "../../utils/bs-global";
|
|
2
2
|
import { INavType } from "./interface";
|
|
3
3
|
import defaultLogo from "./images/logo-white.png";
|
|
4
|
+
import { DEMO_FREE_MENU_CONFIG } from "./constant";
|
|
4
5
|
|
|
5
6
|
export const getMenus = () => {
|
|
6
7
|
// @ts-ignore
|
|
7
|
-
|
|
8
|
+
let navs: INavType[] = window.BSGlobal.newNavigation;
|
|
8
9
|
navs.sort((pre, next) => pre.orderId - next.orderId);
|
|
10
|
+
const isTita = getTenantInfo().Id === 352728;
|
|
11
|
+
if (isTita) {
|
|
12
|
+
navs = navs.concat(DEMO_FREE_MENU_CONFIG);
|
|
13
|
+
}
|
|
9
14
|
return navs;
|
|
10
15
|
};
|
|
11
16
|
|
|
@@ -36,6 +36,7 @@ export default function (props) {
|
|
|
36
36
|
setPageSize,
|
|
37
37
|
id = "",
|
|
38
38
|
setTableXScroll,
|
|
39
|
+
...restProps
|
|
39
40
|
} = props;
|
|
40
41
|
|
|
41
42
|
const [tdata, setTdata] = useState(() => initTableData(tableData));
|
|
@@ -165,6 +166,7 @@ export default function (props) {
|
|
|
165
166
|
columns={getColumns()}
|
|
166
167
|
data={tdata}
|
|
167
168
|
tableLayout={tableLayout || "auto"}
|
|
169
|
+
{...restProps}
|
|
168
170
|
/>
|
|
169
171
|
{!disablePagination
|
|
170
172
|
&& (
|
package/src/utils/bs-global.js
CHANGED
|
@@ -2,7 +2,7 @@ export const getUserInfo = () => window.BSGlobal && window.BSGlobal.loginUserInf
|
|
|
2
2
|
|
|
3
3
|
export const getTenantInfo = () => window.BSGlobal && window.BSGlobal.tenantInfo;
|
|
4
4
|
|
|
5
|
-
export const getBSGlobal = (key) => window.BSGlobal[key];
|
|
5
|
+
export const getBSGlobal = (key) => window.BSGlobal && window.BSGlobal[key];
|
|
6
6
|
|
|
7
7
|
export const getOkrAdvancedSetting = () => window.BSGlobal.OkrAdvancedSetting;
|
|
8
8
|
|