@titaui/pc 1.7.20 → 1.7.21

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.
@@ -25,6 +25,10 @@
25
25
  font-weight: 500;
26
26
  }
27
27
 
28
+ .titaui-menus-tree .rc-tree-treenode-selected .titaui-menus-tree__sub-menu-item-node-title {
29
+ color: #2879ff;
30
+ }
31
+
28
32
  .titaui-menus-tree .rc-tree-indent {
29
33
  display: none;
30
34
  }
@@ -38,7 +38,7 @@ var getOwnSet = function getOwnSet() {
38
38
  id: "role",
39
39
  url: "tu-icon-gongsi",
40
40
  title: "企业管理规定",
41
- objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home#/enterprise/manage")
41
+ objUrl: "".concat(apiServer, "/u/").concat(userId, "/Home#/enterprise/manage?reactRouterName=okr")
42
42
  }];
43
43
  var exit = [{
44
44
  id: "Logout",
@@ -1,34 +1,35 @@
1
- .rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
1
+ .titaui-select .rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
2
2
  border: 1px solid #DFE3EA;
3
3
  }
4
4
 
5
- .rc-select-focused .rc-select-selector {
5
+ .titaui-select .rc-select-focused .rc-select-selector {
6
6
  border: 1px solid #DFE3EA !important;
7
7
  }
8
8
 
9
- .rc-select-selection-item-remove {
9
+ .titaui-select .rc-select-selection-item-remove {
10
10
  display: flex;
11
11
  align-items: center;
12
12
  }
13
13
 
14
- .rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
14
+ .titaui-select .rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
15
15
  display: none;
16
16
  }
17
17
 
18
- .rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
18
+ .titaui-select .rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
19
19
  display: none;
20
20
  }
21
21
 
22
- .rc-select-single .rc-select-selector .rc-select-selection-item, .rc-select-single .rc-select-selector .rc-select-selection-placeholder {
22
+ .titaui-select .rc-select-single .rc-select-selector .rc-select-selection-item,
23
+ .titaui-select .rc-select-single .rc-select-selector .rc-select-selection-placeholder {
23
24
  top: unset;
24
25
  left: 12px;
25
26
  }
26
27
 
27
- .rc-select-single .rc-select-selector {
28
+ .titaui-select .rc-select-single .rc-select-selector {
28
29
  align-items: center;
29
30
  }
30
31
 
31
- .rc-select-selector {
32
+ .titaui-select .rc-select-selector {
32
33
  cursor: pointer;
33
34
  padding: 0 12px;
34
35
  background: #FFFFFF;
@@ -38,30 +39,30 @@
38
39
  box-sizing: border-box;
39
40
  }
40
41
 
41
- .rc-select-multiple .rc-select-selector {
42
+ .titaui-select .rc-select-multiple .rc-select-selector {
42
43
  height: unset;
43
44
  padding: 7px 12px 0;
44
45
  border: 1px solid #DFE3EA;
45
46
  }
46
47
 
47
- .rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
48
+ .titaui-select .rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
48
49
  display: flex;
49
50
  align-items: center;
50
51
  margin-bottom: 7px;
51
52
  }
52
53
 
53
- .rc-select-multiple .rc-select-selector .rc-select-selection-placeholder {
54
+ .titaui-select .rc-select-multiple .rc-select-selector .rc-select-selection-placeholder {
54
55
  line-height: 1;
55
56
  margin-bottom: 7px;
56
57
  position: relative;
57
58
  top: -2px;
58
59
  }
59
60
 
60
- .rc-select-selection-item-content {
61
+ .titaui-select .rc-select-selection-item-content {
61
62
  margin-right: 8px;
62
63
  }
63
64
 
64
- .rc-select-multiple .rc-select-selector .rc-select-selection-item {
65
+ .titaui-select .rc-select-multiple .rc-select-selector .rc-select-selection-item {
65
66
  font-size: 12px;
66
67
  flex: none;
67
68
  height: 20px;
@@ -73,17 +74,32 @@
73
74
  padding: 0 5px 0 10px;
74
75
  }
75
76
 
76
- .rc-select-multiple .rc-select-selector .rc-select-selection-item .tu-icon-cross {
77
+ .titaui-select .rc-select-multiple .rc-select-selector .rc-select-selection-item .tu-icon-cross {
77
78
  cursor: pointer;
78
79
  color: #a4acB9;
79
80
  font-size: 14px;
80
81
  }
81
82
 
82
- .rc-select-item {
83
- font-size: 14px;
83
+ .titaui-select .titaui-select-noborder .rc-select-selector {
84
+ border: none !important;
85
+ height: 22px;
86
+ line-height: 1;
87
+ }
88
+
89
+ .titaui-select .rc-select-arrow {
90
+ font-size: 16px;
91
+ transform: scale(0.5);
84
92
  }
85
93
 
86
- .rc-select-dropdown {
94
+ .titaui-select .rc-select-show-arrow .rc-select-arrow {
95
+ top: 0;
96
+ bottom: 0;
97
+ margin: auto;
98
+ right: 12px;
99
+ height: 22px;
100
+ }
101
+
102
+ .titaui-dropDown {
87
103
  z-index: 2000;
88
104
  box-sizing: border-box;
89
105
  padding: 16px 6px;
@@ -93,45 +109,36 @@
93
109
  border-radius: 8px;
94
110
  }
95
111
 
96
- .rc-select-item-option {
112
+ .titaui-dropDown .rc-select-item {
113
+ font-size: 14px;
114
+ padding: 7px 6px;
115
+ }
116
+
117
+ .titaui-dropDown .rc-select-item-option {
97
118
  height: 36px;
119
+ box-sizing: border-box;
98
120
  line-height: 36px;
99
121
  cursor: pointer;
100
122
  }
101
123
 
102
- .rc-select-item-option-selected {
124
+ .titaui-dropDown .rc-select-item-option-selected {
103
125
  color: #2879FF;
104
126
  }
105
127
 
106
- .rc-select-item-option-active {
128
+ .titaui-dropDown .rc-select-item-option-content {
129
+ line-height: 24px;
130
+ }
131
+
132
+ .titaui-dropDown .rc-select-item-option-active {
107
133
  border-radius: 8px;
108
134
  color: #2879FF;
109
135
  background: #F7F8FA;
110
136
  }
111
137
 
112
- .rc-select-arrow {
113
- font-size: 16px;
114
- transform: scale(0.5);
115
- }
116
-
117
- .rc-select-show-arrow .rc-select-arrow {
118
- top: 0;
119
- bottom: 0;
120
- margin: auto;
121
- right: 12px;
122
- height: 22px;
123
- }
124
-
125
- .rc-select-item-option-state {
138
+ .titaui-dropDown .rc-select-item-option-state {
126
139
  display: none;
127
140
  }
128
141
 
129
142
  .titaui-select-hasSelectItem .rc-select-item-option-state {
130
143
  display: block;
131
144
  }
132
-
133
- .titaui-select-noborder .rc-select-selector {
134
- border: none !important;
135
- height: 22px;
136
- line-height: 1;
137
- }
@@ -69,20 +69,18 @@ var SelectTags = function SelectTags(_ref) {
69
69
  var _useState = (0, _react.useState)(selected),
70
70
  _useState2 = _slicedToArray(_useState, 2),
71
71
  value = _useState2[0],
72
- setValue = _useState2[1]; // useEffect(()=>{
73
- // if(!selected) return
74
- // setValue(selected)
75
- // },[selected])
76
-
72
+ setValue = _useState2[1];
77
73
 
78
74
  var onhandleChange = function onhandleChange(value, options) {
79
75
  onChange && onChange(value, options, name);
80
76
  setValue(value);
81
77
  };
82
78
 
83
- return /*#__PURE__*/_react["default"].createElement(_rcSelect["default"], _extends({
84
- className: (0, _classnames["default"])(preCls, className, _defineProperty({}, "".concat(preCls, "-noborder"), noBorder)),
85
- dropdownClassName: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "-hasSelectItem"), mode === "multiple")),
79
+ return /*#__PURE__*/_react["default"].createElement("div", {
80
+ className: preCls
81
+ }, /*#__PURE__*/_react["default"].createElement(_rcSelect["default"], _extends({
82
+ className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(preCls, "-noborder"), noBorder)),
83
+ dropdownClassName: (0, _classnames["default"])("titaui-dropDown", _defineProperty({}, "".concat(preCls, "-hasSelectItem"), mode === "multiple")),
86
84
  value: value,
87
85
  style: style,
88
86
  mode: mode,
@@ -105,7 +103,7 @@ var SelectTags = function SelectTags(_ref) {
105
103
  key: key,
106
104
  value: item.value
107
105
  }, item.label);
108
- }));
106
+ })));
109
107
  };
110
108
 
111
109
  var _default = SelectTags;
@@ -31,12 +31,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
31
31
 
32
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
33
 
34
+ 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); }
35
+
34
36
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
35
37
 
36
38
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
37
39
 
38
- 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); }
39
-
40
40
  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; }
41
41
 
42
42
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -55,6 +55,20 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
55
55
 
56
56
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
57
57
 
58
+ var getBackgroundImage = function getBackgroundImage(type) {
59
+ var selected = _attitude["default"].find(function (a) {
60
+ return a.type == type;
61
+ });
62
+
63
+ if (selected) {
64
+ return {
65
+ backgroundImage: "url(".concat(selected.img, ")")
66
+ };
67
+ }
68
+
69
+ return {};
70
+ };
71
+
58
72
  function UpvoteButton(_ref) {
59
73
  var _classnames;
60
74
 
@@ -233,11 +247,7 @@ function UpvoteButton(_ref) {
233
247
  className: (0, _classnames2["default"])((_classnames = {
234
248
  "tu-icon-APP-zan1": !buttonType && upvoteState.type == 0
235
249
  }, _defineProperty(_classnames, customUpvoteBtnCls, customUpvoteBtnCls && upvoteState.type == 0), _defineProperty(_classnames, buttonType, buttonType && upvoteState.type == 0), _defineProperty(_classnames, "feed-upvote-button", true), _classnames)),
236
- style: {
237
- backgroundImage: "url(".concat((_attitude["default"].find(function (a) {
238
- return a.type == upvoteState.type;
239
- }) || {}).img, ")")
240
- }
250
+ style: getBackgroundImage(upvoteState.type)
241
251
  }))), /*#__PURE__*/_react["default"].createElement("a", {
242
252
  className: "feed-upvote-count",
243
253
  onClick: function onClick() {
@@ -269,14 +279,9 @@ var UpvoteButtonForFeed = function UpvoteButtonForFeed(props) {
269
279
  "tu-icon-APP-zan1": type == 0,
270
280
  "feed-upvote-button": true
271
281
  }),
272
- style: {
273
- backgroundImage: "url(".concat((_attitude["default"].find(function (a) {
274
- return a.type == type;
275
- }) || {
276
- img: ""
277
- }).img, ")"),
282
+ style: _objectSpread(_objectSpread({}, getBackgroundImage(type)), {}, {
278
283
  marginRight: 4
279
- }
284
+ })
280
285
  }), text);
281
286
  },
282
287
  renderCount: function renderCount(type, count) {
package/lib/index.js CHANGED
@@ -351,6 +351,12 @@ Object.defineProperty(exports, "RangePickerPop", {
351
351
  return _rangePickerPop["default"];
352
352
  }
353
353
  });
354
+ Object.defineProperty(exports, "Scrollbar", {
355
+ enumerable: true,
356
+ get: function get() {
357
+ return _scrollbar["default"];
358
+ }
359
+ });
354
360
  Object.defineProperty(exports, "SearchDropdown", {
355
361
  enumerable: true,
356
362
  get: function get() {
@@ -662,4 +668,6 @@ var _request = _interopRequireDefault(require("./utils/request"));
662
668
 
663
669
  var _pointDemo = _interopRequireDefault(require("./components/point-demo"));
664
670
 
671
+ var _scrollbar = _interopRequireDefault(require("./components/scrollbar"));
672
+
665
673
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -6,31 +6,25 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.hasWebHead = exports.getVersion = exports.getUserInfo = exports.getUploadMaxSize = exports.getTenantInfo = exports.getSource = exports.getOkrAdvancedSetting = exports.getBSGlobal = exports.getAppHead = exports.formatNum = void 0;
7
7
  exports.isWx = isWx;
8
8
 
9
- var _mockBsglobal = require("./mock-bsglobal");
10
-
11
9
  var getUserInfo = function getUserInfo() {
12
- if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal.loginUserInfo;
13
10
  return window.BSGlobal && window.BSGlobal.loginUserInfo;
14
11
  };
15
12
 
16
13
  exports.getUserInfo = getUserInfo;
17
14
 
18
15
  var getTenantInfo = function getTenantInfo() {
19
- if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal.tenantInfo;
20
16
  return window.BSGlobal && window.BSGlobal.tenantInfo;
21
17
  };
22
18
 
23
19
  exports.getTenantInfo = getTenantInfo;
24
20
 
25
21
  var getBSGlobal = function getBSGlobal(key) {
26
- if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal[key];
27
22
  return window.BSGlobal[key];
28
23
  };
29
24
 
30
25
  exports.getBSGlobal = getBSGlobal;
31
26
 
32
27
  var getOkrAdvancedSetting = function getOkrAdvancedSetting() {
33
- if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal["OkrAdvancedSetting"];
34
28
  return window.BSGlobal["OkrAdvancedSetting"];
35
29
  };
36
30
 
@@ -38,7 +32,6 @@ exports.getOkrAdvancedSetting = getOkrAdvancedSetting;
38
32
 
39
33
  var getVersion = function getVersion() {
40
34
  // version 1 试用版
41
- if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal["tenantAuthentication"].Version;
42
35
  return window.BSGlobal["tenantAuthentication"].Version;
43
36
  };
44
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.7.20",
3
+ "version": "1.7.21",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -23,6 +23,9 @@
23
23
  color: #2879ff;
24
24
  font-weight: 500;
25
25
  }
26
+ .titaui-menus-tree__sub-menu-item-node-title{
27
+ color: #2879ff;
28
+ }
26
29
  }
27
30
  .rc-tree-indent {
28
31
  display: none;
@@ -23,7 +23,7 @@ interface TreeNode {
23
23
 
24
24
  const preCls = "titaui-menus";
25
25
 
26
- const expandedKeys = ["okr"]
26
+ const expandedKeys = ["okr"];
27
27
 
28
28
  const ManageMenus = (props: Props) => {
29
29
  const { history } = props;
@@ -40,7 +40,7 @@ export const getOwnSet = () => {
40
40
  id: "role",
41
41
  url: "tu-icon-gongsi",
42
42
  title: "企业管理规定",
43
- objUrl: `${apiServer}/u/${userId}/Home#/enterprise/manage`,
43
+ objUrl: `${apiServer}/u/${userId}/Home#/enterprise/manage?reactRouterName=okr`,
44
44
  },
45
45
  ];
46
46
 
@@ -1,83 +1,111 @@
1
- .rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
2
- border: 1px solid #DFE3EA;
3
- }
1
+ .titaui-select {
2
+ .rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
3
+ border: 1px solid #DFE3EA;
4
+ }
4
5
 
5
- .rc-select-focused{
6
- .rc-select-selector{
7
- border: 1px solid #DFE3EA !important;
6
+ .rc-select-focused {
7
+ .rc-select-selector {
8
+ border: 1px solid #DFE3EA !important;
9
+ }
8
10
  }
9
- }
10
- .rc-select-selection-item-remove{
11
- display: flex;
12
- align-items: center;
13
- }
14
- .rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
15
- display: none;
16
- }
17
11
 
18
- .rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input{
19
- display: none;
20
- }
12
+ .rc-select-selection-item-remove {
13
+ display: flex;
14
+ align-items: center;
15
+ }
21
16
 
22
- .rc-select-single .rc-select-selector .rc-select-selection-item, .rc-select-single .rc-select-selector .rc-select-selection-placeholder{
23
- top: unset;
24
- left: 12px;
25
- }
17
+ .rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
18
+ display: none;
19
+ }
26
20
 
27
- .rc-select-single .rc-select-selector{
28
- align-items: center;
29
- }
21
+ .rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
22
+ display: none;
23
+ }
30
24
 
31
- .rc-select-selector{
32
- cursor: pointer;
33
- padding: 0 12px;
34
- background: #FFFFFF;
35
- border-radius: 8px;
36
- border: 1px solid #DFE3EA;
37
- height: 36px;
38
- box-sizing: border-box;
39
- }
40
- .rc-select-multiple .rc-select-selector {
41
- height: unset;
42
- padding: 7px 12px 0;
43
- border: 1px solid #DFE3EA;
44
- }
45
- .rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
46
- display: flex;
47
- align-items: center;
48
- margin-bottom: 7px;
49
- }
50
- .rc-select-multiple .rc-select-selector .rc-select-selection-placeholder{
51
- line-height: 1;
52
- margin-bottom: 7px;
53
- position: relative;
54
- top: -2px;
55
- }
25
+ .rc-select-single .rc-select-selector .rc-select-selection-item,
26
+ .rc-select-single .rc-select-selector .rc-select-selection-placeholder {
27
+ top: unset;
28
+ left: 12px;
29
+ }
56
30
 
57
- .rc-select-selection-item-content{
58
- margin-right: 8px;
59
- }
31
+ .rc-select-single .rc-select-selector {
32
+ align-items: center;
33
+ }
60
34
 
61
- .rc-select-multiple .rc-select-selector .rc-select-selection-item {
62
- font-size: 12px;
63
- flex: none;
64
- height: 20px;
65
- display: flex;
66
- align-items: center;
67
- background: #F0F4FA;
68
- border-radius: 10px;
69
- margin-right: 2px;
70
- padding: 0 5px 0 10px;
71
- .tu-icon-cross{
35
+ .rc-select-selector {
72
36
  cursor: pointer;
73
- color:#a4acB9;
74
- font-size: 14px;
37
+ padding: 0 12px;
38
+ background: #FFFFFF;
39
+ border-radius: 8px;
40
+ border: 1px solid #DFE3EA;
41
+ height: 36px;
42
+ box-sizing: border-box;
43
+ }
44
+
45
+ .rc-select-multiple .rc-select-selector {
46
+ height: unset;
47
+ padding: 7px 12px 0;
48
+ border: 1px solid #DFE3EA;
49
+ }
50
+
51
+ .rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
52
+ display: flex;
53
+ align-items: center;
54
+ margin-bottom: 7px;
55
+ }
56
+
57
+ .rc-select-multiple .rc-select-selector .rc-select-selection-placeholder {
58
+ line-height: 1;
59
+ margin-bottom: 7px;
60
+ position: relative;
61
+ top: -2px;
62
+ }
63
+
64
+ .rc-select-selection-item-content {
65
+ margin-right: 8px;
66
+ }
67
+
68
+ .rc-select-multiple .rc-select-selector .rc-select-selection-item {
69
+ font-size: 12px;
70
+ flex: none;
71
+ height: 20px;
72
+ display: flex;
73
+ align-items: center;
74
+ background: #F0F4FA;
75
+ border-radius: 10px;
76
+ margin-right: 2px;
77
+ padding: 0 5px 0 10px;
78
+
79
+ .tu-icon-cross {
80
+ cursor: pointer;
81
+ color: #a4acB9;
82
+ font-size: 14px;
83
+ }
84
+ }
85
+
86
+ .titaui-select-noborder {
87
+ .rc-select-selector {
88
+ border: none !important;
89
+ height: 22px;
90
+ line-height: 1;
91
+ }
92
+ }
93
+
94
+ .rc-select-arrow {
95
+ font-size: 16px;
96
+ transform: scale(0.5);
97
+ }
98
+
99
+ .rc-select-show-arrow .rc-select-arrow {
100
+ top: 0;
101
+ bottom: 0;
102
+ margin: auto;
103
+ right: 12px;
104
+ height: 22px;
75
105
  }
76
106
  }
77
- .rc-select-item {
78
- font-size: 14px;
79
- }
80
- .rc-select-dropdown{
107
+
108
+ .titaui-dropDown {
81
109
  z-index: 2000;
82
110
  box-sizing: border-box;
83
111
  padding: 16px 6px;
@@ -85,48 +113,43 @@
85
113
  box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
86
114
  border: 1px solid #F0F2F5;
87
115
  border-radius: 8px;
88
- }
89
116
 
90
- .rc-select-item-option{
91
- height: 36px;
92
- line-height: 36px;
93
- cursor: pointer;
94
- }
95
- .rc-select-item-option-selected {
117
+ .rc-select-item {
118
+ font-size: 14px;
119
+ padding: 7px 6px;
120
+ }
96
121
 
97
- color: #2879FF;
98
- }
99
- .rc-select-item-option-active {
100
- border-radius: 8px;
101
- color: #2879FF;
102
- background: #F7F8FA;
103
- }
122
+ .rc-select-item-option {
123
+ height: 36px;
124
+ box-sizing: border-box;
125
+ line-height: 36px;
126
+ cursor: pointer;
127
+ }
104
128
 
105
- .rc-select-arrow{
106
- font-size: 16px;
107
- transform: scale(0.5);
108
- }
109
- .rc-select-show-arrow .rc-select-arrow {
110
- top: 0;
111
- bottom: 0;
112
- margin: auto;
113
- right: 12px;
114
- height: 22px;
115
- }
129
+ .rc-select-item-option-selected {
116
130
 
117
- .rc-select-item-option-state{
118
- display: none;
119
- }
131
+ color: #2879FF;
132
+ }
120
133
 
121
- .titaui-select-hasSelectItem{
122
- .rc-select-item-option-state{
123
- display: block;
134
+ .rc-select-item-option-content {
135
+ line-height: 24px;
136
+ }
137
+
138
+ .rc-select-item-option-active {
139
+ border-radius: 8px;
140
+ color: #2879FF;
141
+ background: #F7F8FA;
142
+ }
143
+
144
+
145
+
146
+ .rc-select-item-option-state {
147
+ display: none;
124
148
  }
125
149
  }
126
- .titaui-select-noborder{
127
- .rc-select-selector{
128
- border: none !important;
129
- height: 22px;
130
- line-height: 1;
150
+
151
+ .titaui-select-hasSelectItem {
152
+ .rc-select-item-option-state {
153
+ display: block;
131
154
  }
132
155
  }
@@ -39,43 +39,43 @@ const SelectTags: FC<Props> = ({
39
39
 
40
40
  const [value, setValue] = useState(selected);
41
41
 
42
- // useEffect(()=>{
43
- // if(!selected) return
44
- // setValue(selected)
45
- // },[selected])
46
-
47
42
  const onhandleChange = (value, options) => {
48
43
  onChange && onChange(value, options,name);
49
44
  setValue(value);
50
45
  };
51
46
 
52
47
  return (
53
- <Select
54
- className={classNames(preCls, className,{[`${preCls}-noborder`]: noBorder},)}
55
- dropdownClassName={classNames({
56
- [`${preCls}-hasSelectItem`]: mode === "multiple",
57
- })}
58
- value={value}
59
- style={style}
60
- mode={mode}
61
- optionFilterProp="children"
62
- optionLabelProp="children"
63
- placeholder={placeholder}
64
- onChange={onhandleChange}
65
- showArrow={true}
66
- removeIcon={<span className="tu-icon-cross"></span>}
67
- inputIcon={<span className="tu-icon-caret-down" />}
68
- menuItemSelectedIcon={<span className="tu-icon-finished" />}
69
- {...restProps}
70
- >
71
- {data.map((item, key) => {
72
- return (
73
- <Option key={key} value={item.value}>
74
- {item.label}
75
- </Option>
76
- );
77
- })}
78
- </Select>
48
+ <div className={preCls}>
49
+ <Select
50
+ className={classNames(className,{[`${preCls}-noborder`]: noBorder},)}
51
+ dropdownClassName={classNames(
52
+ `titaui-dropDown`,
53
+ {
54
+ [`${preCls}-hasSelectItem`]: mode === "multiple",
55
+ })}
56
+ value={value}
57
+ style={style}
58
+ mode={mode}
59
+ optionFilterProp="children"
60
+ optionLabelProp="children"
61
+ placeholder={placeholder}
62
+ onChange={onhandleChange}
63
+ showArrow={true}
64
+ removeIcon={<span className="tu-icon-cross"></span>}
65
+ inputIcon={<span className="tu-icon-caret-down" />}
66
+ menuItemSelectedIcon={<span className="tu-icon-finished" />}
67
+ {...restProps}
68
+ >
69
+ {data.map((item, key) => {
70
+ return (
71
+ <Option key={key} value={item.value}>
72
+ {item.label}
73
+ </Option>
74
+ );
75
+ })}
76
+ </Select>
77
+ </div>
78
+
79
79
  );
80
80
  };
81
81
 
@@ -29,6 +29,16 @@ interface Props {
29
29
  handleRequest?: (type: number) => Promise<any>;
30
30
  }
31
31
 
32
+ const getBackgroundImage = (type) => {
33
+ let selected = attitudeArr.find((a) => a.type == type);
34
+ if (selected) {
35
+ return {
36
+ backgroundImage: `url(${selected.img})`,
37
+ };
38
+ }
39
+ return {};
40
+ };
41
+
32
42
  function UpvoteButton({
33
43
  type,
34
44
  count,
@@ -110,12 +120,7 @@ function UpvoteButton({
110
120
  [buttonType]: buttonType && upvoteState.type == 0,
111
121
  "feed-upvote-button": true,
112
122
  })}
113
- style={{
114
- backgroundImage: `url(${
115
- (attitudeArr.find((a) => a.type == upvoteState.type) || {})
116
- .img
117
- })`,
118
- }}
123
+ style={getBackgroundImage(upvoteState.type)}
119
124
  />
120
125
  )}
121
126
  </a>
@@ -156,9 +161,7 @@ export const UpvoteButtonForFeed = (props: Props) => {
156
161
  "feed-upvote-button": true,
157
162
  })}
158
163
  style={{
159
- backgroundImage: `url(${
160
- (attitudeArr.find((a) => a.type == type) || { img: "" }).img
161
- })`,
164
+ ...getBackgroundImage(type),
162
165
  marginRight: 4,
163
166
  }}
164
167
  />
package/src/index.js CHANGED
@@ -77,8 +77,9 @@ export { default as LikeRankingPage } from "./pages/like-ranking";
77
77
  export { default as NewOkrListPage } from "./pages/new-okr-list";
78
78
  export { default as PersonalInfoPage } from "./pages/personal-info";
79
79
  export { default as ErrorBoundary } from "./components/error-boundary";
80
- export { ERROR_LEVEL } from "./utils/error-level";
80
+ export { ERROR_LEVEL as ERROR_LEVEL } from "./utils/error-level";
81
81
  export { default as SelectTags } from "./components/select-tags";
82
82
  export { default as Cascader } from "./components/cascader";
83
83
  export { default as requestApi } from "./utils/request";
84
84
  export { default as PointDemo} from './components/point-demo'
85
+ export { default as Scrollbar } from './components/scrollbar'
@@ -1,32 +1,22 @@
1
- import { BSGlobal } from "./mock-bsglobal";
2
1
 
3
2
  export const getUserInfo = () => {
4
- if (window.location.host.indexOf("127.0.0.1") !== -1)
5
- return BSGlobal.loginUserInfo;
6
3
  return window.BSGlobal && window.BSGlobal.loginUserInfo;
7
4
  };
8
5
 
9
6
  export const getTenantInfo = () => {
10
- if (window.location.host.indexOf("127.0.0.1") !== -1)
11
- return BSGlobal.tenantInfo;
12
7
  return window.BSGlobal && window.BSGlobal.tenantInfo;
13
8
  };
14
9
 
15
10
  export const getBSGlobal = (key) => {
16
- if (window.location.host.indexOf("127.0.0.1") !== -1) return BSGlobal[key];
17
11
  return window.BSGlobal[key];
18
12
  };
19
13
 
20
14
  export const getOkrAdvancedSetting = () => {
21
- if (window.location.host.indexOf("127.0.0.1") !== -1)
22
- return BSGlobal["OkrAdvancedSetting"];
23
15
  return window.BSGlobal["OkrAdvancedSetting"];
24
16
  };
25
17
 
26
18
  export const getVersion = () => {
27
19
  // version 1 试用版
28
- if (window.location.host.indexOf("127.0.0.1") !== -1)
29
- return BSGlobal["tenantAuthentication"].Version;
30
20
  return window.BSGlobal["tenantAuthentication"].Version;
31
21
  };
32
22