@chaoswise/business 0.0.9 → 0.0.10

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.
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Icon/Fill/Close-Circle-Fill</title>
4
+ <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="聚合搜索框" transform="translate(-1278.000000, -2867.000000)">
6
+ <rect fill="#FFFFFF" x="0" y="0" width="1920" height="3346"></rect>
7
+ <g id="7" opacity="0.800000012" transform="translate(120.000000, 2665.000000)">
8
+ <g id="搜索框备份-2" transform="translate(0.000000, 194.000000)">
9
+ <path d="M1214.00697,0.5 C1214.41913,0.5 1214.7922,0.667699564 1215.06223,0.938862019 C1215.33288,1.21063804 1215.5,1.58624721 1215.5,2.00138927 L1215.5,2.00138927 L1215.5,45.9986107 C1215.5,46.4131621 1215.33227,46.7885021 1215.0616,47.0603047 C1214.79133,47.3317133 1214.41826,47.5 1214.00697,47.5 L1214.00697,47.5 L1.99303181,47.5 C1.58086837,47.5 1.20779551,47.3323004 0.937765379,47.061138 C0.667124252,46.789362 0.5,46.4137528 0.5,45.9986107 L0.5,45.9986107 L0.5,2.00138927 C0.5,1.58683787 0.667729281,1.2114979 0.938396858,0.939695326 C1.20867209,0.668286734 1.58174111,0.5 1.99303181,0.5 L1.99303181,0.5 L1214.00697,0.5 Z" id="Rectangle-26-Copy-23备份" stroke="#FF4D4F" fill="#FFFFFF"></path>
10
+ <g id="Icon/Fill/Close-Circle-Fill" transform="translate(1158.000000, 8.000000)" fill="#000000">
11
+ <rect id="矩形" fill-rule="nonzero" opacity="0" x="0" y="0" width="12" height="12"></rect>
12
+ <path d="M6,0.75 C3.10078125,0.75 0.75,3.10078125 0.75,6 C0.75,8.89921875 3.10078125,11.25 6,11.25 C8.89921875,11.25 11.25,8.89921875 11.25,6 C11.25,3.10078125 8.89921875,0.75 6,0.75 Z M7.93828125,7.99453125 L7.16484375,7.99101563 L6,6.60234375 L4.83632812,7.98984375 L4.06171875,7.99335937 C4.01015625,7.99335937 3.96796875,7.95234375 3.96796875,7.89960937 C3.96796875,7.87734375 3.97617188,7.85625 3.99023438,7.83867187 L5.51484375,6.02226562 L3.99023438,4.20703125 C3.97617188,4.18945312 3.96796875,4.16835937 3.96796875,4.14609375 C3.96796875,4.09453125 4.01015625,4.05234375 4.06171875,4.05234375 L4.83632813,4.05585938 L6,5.44453125 L7.16367187,4.05703125 L7.93710937,4.05351563 C7.98867187,4.05351563 8.03085937,4.09453125 8.03085937,4.14726563 C8.03085937,4.16953125 8.02265625,4.190625 8.00859375,4.20820313 L6.48632812,6.0234375 L8.00976562,7.83984375 C8.02382813,7.85742188 8.03203125,7.87851562 8.03203125,7.90078125 C8.03203125,7.95234375 7.98984375,7.99453125 7.93828125,7.99453125 Z" id="形状" fill-opacity="0.25"></path>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </svg>
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import CloseAllIconSvg from "./assets/Close-Circle-Fill.svg";
3
+ var CloseAllIcon = function CloseAllIcon() {
4
+ return /*#__PURE__*/React.createElement(CloseAllIconSvg, null);
5
+ };
6
+ export default CloseAllIcon;
@@ -411,7 +411,10 @@ var DropDown = function DropDown(props) {
411
411
  return _historyDelete.apply(this, arguments);
412
412
  }
413
413
  var menu = /*#__PURE__*/React.createElement("div", {
414
- className: "aggregate-drop-down-wrap"
414
+ className: "aggregate-drop-down-wrap",
415
+ onClick: function onClick(e) {
416
+ e.stopPropagation();
417
+ }
415
418
  }, /*#__PURE__*/React.createElement("div", {
416
419
  className: "aggregate-drop-down"
417
420
  }, keyOptionValueNotEmpty && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
@@ -1,7 +1,7 @@
1
1
  .aggregate-search-switch-btn {
2
2
  border: @border-width-base @border-style-base @input-border-color;
3
3
  border-left: none;
4
- min-height: 26px;
4
+ min-height: 28px;
5
5
  cursor: pointer;
6
6
  background: rgba(0, 0, 0, 0.02);
7
7
  border-radius: 0 2px 2px 0;
@@ -10,6 +10,6 @@
10
10
  align-items: flex-start;
11
11
  align-self: stretch; // 使得高度和父元素一致
12
12
  img{
13
- transform: translateY(7px);
13
+ transform: translateY(8px);
14
14
  }
15
15
  }
@@ -71,7 +71,8 @@ var AggregateSearch = function AggregateSearch(_ref) {
71
71
  onHelpClick = _ref$onHelpClick === void 0 ? function () {} : _ref$onHelpClick,
72
72
  mode = _ref.mode,
73
73
  _ref$defaultMode = _ref.defaultMode,
74
- defaultMode = _ref$defaultMode === void 0 ? "tag" : _ref$defaultMode;
74
+ defaultMode = _ref$defaultMode === void 0 ? "tag" : _ref$defaultMode,
75
+ placeholder = _ref.placeholder;
75
76
  // 输入模式
76
77
  var _useState = useState(defaultMode),
77
78
  _useState2 = _slicedToArray(_useState, 2),
@@ -87,6 +88,11 @@ var AggregateSearch = function AggregateSearch(_ref) {
87
88
  setSelValue = _useState4[1];
88
89
  var container = useRef(null);
89
90
  var containerWrapperRef = useRef(null);
91
+ // 是否可编辑,若点击编辑区域外内容则不可编辑 todo:用于修复聚焦bug
92
+ var _useState5 = useState(true),
93
+ _useState6 = _slicedToArray(_useState5, 2),
94
+ contentEditable = _useState6[0],
95
+ setContentEditable = _useState6[1];
90
96
  // 是否正在输入中文
91
97
  var isComposing = useRef(false);
92
98
  var handleSyntaxCheck = /*#__PURE__*/function () {
@@ -167,7 +173,12 @@ var AggregateSearch = function AggregateSearch(_ref) {
167
173
  // 计算当前光标位置(纯文本模式)
168
174
  planeTextPosition = getCursorPosition(container.current); // 将纯文本模式转为html模式(语法解析器)
169
175
  htmlString = genHtmlAndSyntaxCheckResByString(inputStr);
170
- container.current.innerHTML = htmlString;
176
+ if (!htmlString.trim()) {
177
+ // 修复空状态placeholder
178
+ container.current.innerHTML = "";
179
+ } else {
180
+ container.current.innerHTML = htmlString;
181
+ }
171
182
  // 找到格式化后的光标位置
172
183
  if (planeTextPosition !== null) {
173
184
  _getCursorNodeAndInde3 = getCursorNodeAndIndex(container.current, planeTextPosition), targetNode = _getCursorNodeAndInde3.targetNode, targetIndex = _getCursorNodeAndInde3.targetIndex; // 设置光标位置
@@ -227,8 +238,14 @@ var AggregateSearch = function AggregateSearch(_ref) {
227
238
  // 监听点击事件(container以外的地方)
228
239
  useEffect(function () {
229
240
  var handleClick = function handleClick(e) {
230
- if (container.current && !container.current.contains(e.target)) {
241
+ // 可编辑文本框边框线e.target !== containerWrapperRef.current
242
+ if (container.current && !container.current.contains(e.target) && e.target !== containerWrapperRef.current) {
231
243
  setVisible(false);
244
+ setContentEditable(false);
245
+ } else {
246
+ var _container$current;
247
+ setContentEditable(true);
248
+ (_container$current = container.current) === null || _container$current === void 0 || _container$current.focus();
232
249
  }
233
250
  };
234
251
  document.addEventListener("click", handleClick);
@@ -250,9 +267,18 @@ var AggregateSearch = function AggregateSearch(_ref) {
250
267
  }
251
268
  handleValueChange(container.current.innerText, mode);
252
269
  };
270
+ var onKeyDown = function onKeyDown(e) {
271
+ var keyCode = e.keyCode;
272
+ if (keyCode === 13) {
273
+ // 回车阻止默认的换行行为
274
+ e.preventDefault();
275
+ onChange(e.target.innerText);
276
+ setVisible(false);
277
+ }
278
+ };
253
279
  return /*#__PURE__*/React.createElement(DropDown, {
254
280
  onHelpClick: onHelpClick,
255
- visible: visible && curMode === "tag",
281
+ visible: contentEditable && visible && curMode === "tag",
256
282
  keyOption: {
257
283
  value: dropStatus.key.isShow ? dropStatus.key.value : null,
258
284
  fetchFuc: fetchKeyList,
@@ -297,8 +323,11 @@ var AggregateSearch = function AggregateSearch(_ref) {
297
323
  ref: containerWrapperRef
298
324
  }, /*#__PURE__*/React.createElement("div", {
299
325
  spellCheck: false,
300
- onCompositionEnd: function onCompositionEnd() {
301
- return isComposing.current = false;
326
+ onCompositionEnd: function onCompositionEnd(e) {
327
+ isComposing.current = false;
328
+ // 输入中文结束再触发一次,保证文本框对应内容与当前返回值一致,选项效果不会丢失
329
+ handleValueChange(e.target.innerText);
330
+ onChange(e.target.innerText);
302
331
  },
303
332
  onCompositionStart: function onCompositionStart() {
304
333
  return isComposing.current = true;
@@ -306,12 +335,14 @@ var AggregateSearch = function AggregateSearch(_ref) {
306
335
  className: "aggregate-search-input",
307
336
  ref: container,
308
337
  "data-attr": "container",
309
- contentEditable: true,
338
+ "data-placeholder": placeholder,
339
+ contentEditable: contentEditable,
310
340
  suppressContentEditableWarning: true,
311
341
  onPaste: textInit // 只粘贴纯文本 去除html标签
312
342
  ,
313
343
  onInput: onInput,
314
- onFocus: onFocus
344
+ onFocus: onFocus,
345
+ onKeyDown: onKeyDown
315
346
  }), /*#__PURE__*/React.createElement(SwitchBtn, {
316
347
  onChange: onModeChange,
317
348
  mode: mode || selMode
@@ -345,6 +376,10 @@ AggregateSearch.propTypes = {
345
376
  /**
346
377
  * 删除历史记录回调,需要返回promise,async(id)=>Boolean
347
378
  */
348
- onHistoryDelete: PropTypes.func
379
+ onHistoryDelete: PropTypes.func,
380
+ /**
381
+ * 内容为空提示
382
+ */
383
+ placeholder: PropTypes.string
349
384
  };
350
385
  export default AggregateSearch;
@@ -25,8 +25,8 @@
25
25
  position: relative;
26
26
  padding: 0 10px;
27
27
  flex: 1;
28
- min-height: 26px;
29
- line-height: 24px;
28
+ min-height: 28px;
29
+ line-height: 26px;
30
30
  border: @border-width-base @border-style-base @input-border-color;
31
31
  border-radius: @border-radius-base 0 0 @border-radius-base;
32
32
 
@@ -41,20 +41,20 @@
41
41
  }
42
42
 
43
43
  &:empty:before {
44
- content: '搜索指标标识、维度、或通过筛选区筛选指标';
44
+ content: attr(data-placeholder);
45
45
  font-size: 12px;
46
46
  color: rgba(0, 0, 0, 0.45);
47
47
  line-height: 20px;
48
48
  }
49
49
 
50
- &:focus:before {
51
- content: none;
50
+ &:not(.syntax-error):focus:before { // 需要排除掉syntax-error的样式不然报错内容丢失
51
+ content: ""; // 不能为none,否则placeholder不显示
52
52
  }
53
53
 
54
54
  .tag-box {
55
55
  position: relative;
56
56
  background: #FFFFFF;
57
- border: 1px solid #E3E3E3;
57
+ border: @border-width-base @border-style-base #E3E3E3;
58
58
  border-radius: 2px;
59
59
  height: 18px;
60
60
  line-height: 16px;
@@ -92,6 +92,9 @@
92
92
  .tag-con-match {
93
93
  color: #FA8C16;
94
94
  }
95
+ &:not(.syntax-error):has(.tag-con-keyword_AND_OR:only-child){
96
+ border-color: transparent;
97
+ }
95
98
  }
96
99
  }
97
100
  }
@@ -99,8 +102,8 @@
99
102
 
100
103
  .syntax-error {
101
104
  // 语法错误,高亮样式
102
- border: 1px solid #FF4D4F !important;
103
-
105
+ border: @border-width-base @border-style-base @red-5 !important;
106
+ box-shadow: none !important;
104
107
  &:hover {
105
108
 
106
109
  // 伪类展示属性值
@@ -108,16 +111,17 @@
108
111
  content: attr(data-error);
109
112
  position: absolute;
110
113
  white-space: nowrap;
111
- bottom: 26px;
114
+ bottom: 28px;
112
115
  left: -1px;
113
116
  height: 20px;
114
117
  line-height: 20px;
115
118
  background: #FFF1F0;
116
- border: 1px solid #FF4D4F;
119
+ border: @border-width-base @border-style-base @red-5;
117
120
  border-radius: 0 0 2px 2px;
118
121
  font-size: 12px;
119
- color: #FF4D4F;
122
+ color: @red-5;
120
123
  padding: 0 10px;
124
+ min-width: 100px;
121
125
  }
122
126
  }
123
127
  }
@@ -122,9 +122,13 @@ export var genHtmlAndSyntaxCheckResByString = function genHtmlAndSyntaxCheckResB
122
122
  var hasMatch = matchIndex !== -1;
123
123
  html = tokenList.map(function (token, index) {
124
124
  var genClassName = function genClassName(typeClass) {
125
- return classNames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
126
- "tag-con": true
127
- }, typeClass, true), "tag-con-key", hasMatch ? index < matchIndex : false), "tag-con-key-last", matchIndex ? index === matchIndex - 1 : false), "tag-con-value", hasMatch ? index > matchIndex : false));
125
+ return classNames(typeClass, {
126
+ "tag-con": true,
127
+ // [typeClass]: true,
128
+ "tag-con-key": hasMatch ? index < matchIndex : false,
129
+ "tag-con-key-last": matchIndex ? index === matchIndex - 1 : false,
130
+ "tag-con-value": hasMatch ? index > matchIndex : false
131
+ });
128
132
  };
129
133
  var genDataType = function genDataType(index) {
130
134
  if (hasMatch) {
@@ -139,7 +143,7 @@ export var genHtmlAndSyntaxCheckResByString = function genHtmlAndSyntaxCheckResB
139
143
  return "key";
140
144
  };
141
145
  var dataType = genDataType(index);
142
- var getEleProps = function getEleProps(type) {
146
+ var getEleProps = function getEleProps(type, text) {
143
147
  var typeMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TOKEN_TYPES.MATCH, {
144
148
  tagName: "span",
145
149
  props: {
@@ -150,7 +154,7 @@ export var genHtmlAndSyntaxCheckResByString = function genHtmlAndSyntaxCheckResB
150
154
  }), TOKEN_TYPES.KEYWORD, {
151
155
  tagName: "span",
152
156
  props: {
153
- "class": genClassName("tag-con-keyword"),
157
+ "class": genClassName(text === "AND" || text === "OR" ? "tag-con-keyword tag-con-keyword_AND_OR" : "tag-con-keyword"),
154
158
  "data-attr": "keyword",
155
159
  "data-type": dataType
156
160
  }
@@ -173,7 +177,7 @@ export var genHtmlAndSyntaxCheckResByString = function genHtmlAndSyntaxCheckResB
173
177
  };
174
178
  var type = token.type,
175
179
  text = token.text;
176
- var curProps = getEleProps(type);
180
+ var curProps = getEleProps(type, text);
177
181
  var elePropsString = Object.entries(curProps.props).map(function (_ref) {
178
182
  var _ref2 = _slicedToArray(_ref, 2),
179
183
  key = _ref2[0],
@@ -1,79 +1,75 @@
1
- .wrapper {
2
- // width: 150px;
3
- height: 20px;
4
- font-size: 12px;
5
-
6
- .wrapper-inner {
7
- float: left;
8
- max-width: 85px;
1
+ .form-properties-box {
2
+ .wrapper {
9
3
  height: 20px;
10
- line-height: 18px;
11
- margin-right: 2px;
12
- margin-bottom: 4px;
13
- padding: 0 5px;
14
- background: #fafafa;
15
- border: 1px solid #d9d9d9;
16
- border-radius: 2px;
17
- cursor: pointer;
18
- overflow: hidden;
19
- text-overflow: ellipsis;
20
- white-space: nowrap;
21
- }
4
+ font-size: 12px;
22
5
 
23
- .wrapper-inner:last-child {
24
- margin-right: 0;
25
- }
6
+ .wrapper-inner {
7
+ float: left;
8
+ max-width: 85px;
9
+ height: 20px;
10
+ line-height: 18px;
11
+ margin-right: 2px;
12
+ margin-bottom: 4px;
13
+ padding: 0 5px;
14
+ background: #fafafa;
15
+ border: 1px solid #d9d9d9;
16
+ border-radius: 2px;
17
+ cursor: pointer;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap;
21
+ }
26
22
 
27
- .wrapper-inner-fixed {
28
- float: left;
29
- // width: 30px;
30
- height: 20px;
31
- line-height: 18px;
32
- margin-right: 2px;
33
- padding: 0 6px;
34
- background: #fafafa;
35
- border: 1px solid #d9d9d9;
36
- border-radius: 2px;
37
- cursor: pointer;
23
+ .wrapper-inner:last-child {
24
+ margin-right: 0;
25
+ }
26
+
27
+ .wrapper-inner-fixed {
28
+ float: left;
29
+ height: 20px;
30
+ line-height: 18px;
31
+ margin-right: 2px;
32
+ padding: 0 6px;
33
+ background: #fafafa;
34
+ border: 1px solid #d9d9d9;
35
+ border-radius: 2px;
36
+ cursor: pointer;
37
+ }
38
38
  }
39
- }
40
39
 
41
- .ant-popover-inner-content:nth-child(4n) {
42
- margin-right: 0px;
43
- }
40
+ .@{ant-prefix}-popover-inner-content:nth-child(4n) {
41
+ margin-right: 0px;
42
+ }
44
43
 
45
- .inner {
46
- max-width: 450px;
47
- font-size: 12px;
44
+ .inner {
45
+ max-width: 450px;
46
+ font-size: 12px;
48
47
 
49
- .ant-popover-inner-content {
50
- float: left;
51
- // max-width: 85px;
52
- height: 20px;
53
- line-height: 18px;
54
- background: #fafafa;
55
- border: 1px solid #d9d9d9;
56
- border-radius: 2px;
57
- padding: 0 6px;
58
- margin: 0 2px 4px 0;
59
- cursor: pointer;
60
- // overflow: hidden;
61
- // text-overflow: ellipsis;
62
- // white-space: nowrap;
48
+ .@{ant-prefix}-popover-inner-content {
49
+ float: left;
50
+ height: 20px;
51
+ line-height: 18px;
52
+ background: #fafafa;
53
+ border: 1px solid #d9d9d9;
54
+ border-radius: 2px;
55
+ padding: 0 6px;
56
+ margin: 0 2px 4px 0;
57
+ cursor: pointer;
58
+ }
63
59
  }
64
- }
65
60
 
66
- .inner:after {
67
- /*伪元素是行内元素 正常浏览器清除浮动方法*/
68
- content: "";
69
- display: block;
70
- height: 0;
71
- clear: both;
72
- visibility: hidden;
73
- }
61
+ .inner:after {
62
+ /*伪元素是行内元素 正常浏览器清除浮动方法*/
63
+ content: "";
64
+ display: block;
65
+ height: 0;
66
+ clear: both;
67
+ visibility: hidden;
68
+ }
74
69
 
75
70
  .tag-wrapper-inner {
76
71
  .@{ant-prefix}-popover-inner-content {
77
72
  padding: 8px !important;
78
73
  }
74
+ }
79
75
  }
@@ -1,81 +1,74 @@
1
- .ciWrapper {
2
- // width: 150px;
3
- height: 28px;
4
- font-size: 12px;
5
- display: flex;
6
- // align-items: center;
7
- // margin-left: -6px;
1
+ .form-properties-box {
2
+ .ciWrapper {
3
+ height: 28px;
4
+ font-size: 12px;
5
+ display: flex;
8
6
 
9
- .wrapper-inner {
10
- float: left;
11
- max-width: 85px;
12
- height: 20px;
13
- line-height: 18px;
14
- margin-right: 2px;
15
- // margin-bottom: 4px;
16
- background: #fafafa;
17
- border: 1px solid #d9d9d9;
18
- border-radius: 2px;
19
- cursor: pointer;
20
- overflow: hidden;
21
- text-overflow: ellipsis;
22
- white-space: nowrap;
23
- }
7
+ .wrapper-inner {
8
+ float: left;
9
+ max-width: 85px;
10
+ height: 20px;
11
+ line-height: 18px;
12
+ margin-right: 2px;
13
+ background: #fafafa;
14
+ border: 1px solid #d9d9d9;
15
+ border-radius: 2px;
16
+ cursor: pointer;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ white-space: nowrap;
20
+ }
24
21
 
25
- .wrapper-inner:last-child {
26
- margin-right: 0;
27
- }
22
+ .wrapper-inner:last-child {
23
+ margin-right: 0;
24
+ }
28
25
 
29
- .wrapper-inner-fixed {
30
- float: left;
31
- // width: 30px;
32
- height: 20px;
33
- line-height: 18px;
34
- margin-right: 2px;
35
- padding: 0 6px;
36
- background: #fafafa;
37
- border: 1px solid #d9d9d9;
38
- border-radius: 2px;
39
- cursor: pointer;
26
+ .wrapper-inner-fixed {
27
+ float: left;
28
+ height: 20px;
29
+ line-height: 18px;
30
+ margin-right: 2px;
31
+ padding: 0 6px;
32
+ background: #fafafa;
33
+ border: 1px solid #d9d9d9;
34
+ border-radius: 2px;
35
+ cursor: pointer;
36
+ }
40
37
  }
41
- }
42
38
 
43
- .ant-popover-inner-content:nth-child(4n) {
44
- margin-right: 0px;
45
- }
39
+ .@{ant-prefix}-popover-inner-content:nth-child(4n) {
40
+ margin-right: 0px;
41
+ }
46
42
 
47
- .inner {
48
- max-width: 450px;
49
- font-size: 12px;
43
+ .inner {
44
+ max-width: 450px;
45
+ font-size: 12px;
50
46
 
51
- .ant-popover-inner-content {
52
- float: left;
53
- // max-width: 85px;
54
- height: 20px;
55
- line-height: 18px;
56
- background: #fafafa;
57
- border: 1px solid #d9d9d9;
58
- border-radius: 2px;
59
- padding: 0 6px;
60
- margin: 0 2px 4px 0;
61
- cursor: pointer;
62
- // overflow: hidden;
63
- // text-overflow: ellipsis;
64
- // white-space: nowrap;
47
+ .@{ant-prefix}-popover-inner-content {
48
+ float: left;
49
+ height: 20px;
50
+ line-height: 18px;
51
+ background: #fafafa;
52
+ border: 1px solid #d9d9d9;
53
+ border-radius: 2px;
54
+ padding: 0 6px;
55
+ margin: 0 2px 4px 0;
56
+ cursor: pointer;
57
+ }
65
58
  }
66
- }
67
59
 
68
- .inner:after {
69
- /*伪元素是行内元素 正常浏览器清除浮动方法*/
70
- content: "";
71
- display: block;
72
- height: 0;
73
- clear: both;
74
- visibility: hidden;
75
- }
60
+ .inner:after {
61
+ /*伪元素是行内元素 正常浏览器清除浮动方法*/
62
+ content: "";
63
+ display: block;
64
+ height: 0;
65
+ clear: both;
66
+ visibility: hidden;
67
+ }
76
68
 
77
69
  .tag-wrapper-inner {
78
70
  .@{ant-prefix}-popover-inner-content {
79
71
  padding: 8px !important;
80
72
  }
81
- }
73
+ }
74
+ }
@@ -1,94 +1,93 @@
1
- .ci-detail-user {
2
- width: 100%;
3
- display: flex;
4
- flex-wrap: wrap;
5
- // line-height: 28px;
1
+ @uploda-card-width : 88px;
2
+ @uploda-card-height : 88px;
6
3
 
7
- .ci-detail-user-item {
4
+ .form-properties-box {
5
+ .ci-detail-user {
6
+ width: 100%;
8
7
  display: flex;
9
- // align-items: center;
8
+ flex-wrap: wrap;
9
+
10
+ .ci-detail-user-item {
11
+ display: flex;
12
+ }
13
+
14
+ .ci-detail-user-name {
15
+ width: calc(100% - 32px);
16
+ white-space: nowrap;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ }
20
+
21
+ .ci-detail-avatar {
22
+ color: #fff;
23
+ background-color: #008dff;
24
+ margin-right: 8px;
25
+ }
26
+ }
27
+
28
+ .ci-detail-user-group {
29
+ width: 100%;
30
+
31
+ .user-group-item {
32
+ font-weight: 600;
33
+ background: #008dff;
34
+ color: #fff;
35
+ display: inline-block;
36
+ height: 25px;
37
+ padding: 0 5px;
38
+ border-radius: 10px;
39
+ margin-right: 5px;
40
+ }
10
41
  }
11
42
 
12
- .ci-detail-user-name {
13
- width: calc(100% - 32px);
43
+ .desBox {
44
+ width: 100%;
45
+ height: 100%;
14
46
  white-space: nowrap;
15
47
  overflow: hidden;
16
48
  text-overflow: ellipsis;
17
49
  }
18
50
 
19
- .ci-detail-avatar {
20
- color: #fff;
21
- background-color: #008dff;
22
- margin-right: 8px;
23
- }
24
- }
25
-
26
- .ci-detail-user-group {
27
- width: 100%;
28
-
29
- .user-group-item {
30
- font-weight: 600;
31
- background: #008dff;
32
- color: #fff;
33
- display: inline-block;
34
- height: 25px;
35
- padding: 0 5px;
36
- // line-height: 25px;
37
- border-radius: 10px;
38
- margin-right: 5px;
51
+ .doTextArea {
52
+ width: 100%;
53
+ line-height: 20px;
54
+ min-height: 50;
39
55
  }
40
- }
41
-
42
- .desBox {
43
- width: 100%;
44
- height: 100%;
45
- white-space: nowrap;
46
- overflow: hidden;
47
- text-overflow: ellipsis;
48
- }
49
-
50
- .doTextArea {
51
- width: 100%;
52
- line-height: 20px;
53
- min-height: 50;
54
- }
55
56
 
56
- @uploda-card-width : 88px;
57
- @uploda-card-height : 88px;
58
57
 
59
- .ci-detail-image {
58
+ .ci-detail-image {
60
59
 
61
60
  .@{ant-prefix}-upload-list-item-uploading-text {
62
61
  text-align: center;
63
62
  }
64
63
 
65
64
  .@{ant-prefix}-upload.@{ant-prefix}-upload-select-picture-card {
66
- width: @uploda-card-width !important;
67
- height: @uploda-card-height !important;
65
+ width: @uploda-card-width !important;
66
+ height: @uploda-card-height !important;
68
67
  }
69
68
 
70
69
  .@{ant-prefix}-upload-list-picture-card .@{ant-prefix}-upload-list-item {
71
- width: @uploda-card-width !important;
72
- height: @uploda-card-height !important;
70
+ width: @uploda-card-width !important;
71
+ height: @uploda-card-height !important;
73
72
  }
74
73
 
75
74
  .@{ant-prefix}-upload-list-picture-card-container {
76
- width: @uploda-card-width !important;
77
- height: @uploda-card-height !important;
75
+ width: @uploda-card-width !important;
76
+ height: @uploda-card-height !important;
78
77
  }
79
78
 
80
79
  .@{ant-prefix}-upload-list {
81
80
  padding: 0 !important;
82
81
  background-color: #fff !important;
83
82
  }
84
- }
83
+ }
85
84
 
86
85
 
87
- .ci-detail-file {
86
+ .ci-detail-file {
88
87
 
89
- .cw-upload-drag_ {
90
- margin-top: 0 !important;
91
- }
88
+ .cw-upload-drag_ {
89
+ margin-top: 0 !important;
90
+ }
92
91
 
93
92
  .@{ant-prefix}-upload-list {
94
93
  background-color: white;
@@ -99,9 +98,9 @@
99
98
  margin-top: 4px !important;
100
99
  }
101
100
 
102
- }
101
+ }
103
102
 
104
- .ci-detail-quote-card {
103
+ .ci-detail-quote-card {
105
104
 
106
105
  .@{ant-prefix}-card-body {
107
106
  padding: 3px;
@@ -120,70 +119,71 @@
120
119
  font-weight: normal;
121
120
  }
122
121
 
123
- .ci-detail-quote-card-title {
124
- width: 100%;
125
- height: 28px;
126
- display: flex;
127
- align-items: center;
128
- justify-content: space-between;
122
+ .ci-detail-quote-card-title {
123
+ width: 100%;
124
+ height: 28px;
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: space-between;
128
+ }
129
+
130
+ .ci-detail-quote-card-title-span {
131
+ overflow: hidden;
132
+ white-space: nowrap;
133
+ text-overflow: ellipsis;
134
+ font-size: 12px;
135
+ }
136
+
137
+ }
138
+
139
+ .ci-detail-quote-list {
140
+ .@{ant-prefix}-list-item {
141
+ margin-bottom: 12px !important;
142
+ }
129
143
  }
130
144
 
131
- .ci-detail-quote-card-title-span {
145
+ .ci-table-view {
146
+ width: 100%;
132
147
  overflow: hidden;
133
148
  white-space: nowrap;
134
149
  text-overflow: ellipsis;
135
- font-size: 12px;
136
150
  }
137
151
 
138
- }
152
+ //u为范围-点阵图
153
+ .unit-bitmap-box {
139
154
 
140
- .ci-detail-quote-list {
141
- .@{ant-prefix}-list-item {
142
- margin-bottom: 12px !important;
155
+ .lattice {
156
+ cursor: pointer;
157
+ float: left;
158
+ display: block;
159
+ width: 26px;
160
+ height: 26px;
161
+ margin: 2px 4px 2px 0px;
162
+ padding: 0;
163
+ color: rgba(0, 0, 0, .65);
164
+ line-height: 26px;
165
+ text-align: center;
166
+ background: #E8E8E8;
167
+ border: 1px solid transparent;
168
+ border-radius: 2px;
169
+ -webkit-transition: background .3s ease;
170
+ transition: background .3s ease;
143
171
  }
144
- }
145
-
146
- .ci-table-view {
147
- width: 100%;
148
- overflow: hidden;
149
- white-space: nowrap;
150
- text-overflow: ellipsis;
151
- }
152
-
153
- //u为范围-点阵图
154
- .unit-bitmap-box {
155
-
156
- .lattice {
157
- cursor: pointer;
158
- float: left;
159
- display: block;
160
- width: 26px;
161
- height: 26px;
162
- margin: 2px 4px 2px 0px;
163
- padding: 0;
164
- color: rgba(0, 0, 0, .65);
165
- line-height: 26px;
166
- text-align: center;
167
- background: #E8E8E8;
168
- border: 1px solid transparent;
169
- border-radius: 2px;
170
- -webkit-transition: background .3s ease;
171
- transition: background .3s ease;
172
- }
173
172
 
174
- .locked_lattice {
175
- color: rgba(0, 0, 0, .25);
176
- background: #f5f5f5;
177
- border: 1px solid transparent;
178
- border-radius: 0;
179
- cursor: not-allowed;
180
- }
173
+ .locked_lattice {
174
+ color: rgba(0, 0, 0, .25);
175
+ background: #f5f5f5;
176
+ border: 1px solid transparent;
177
+ border-radius: 0;
178
+ cursor: not-allowed;
179
+ }
181
180
 
182
- .usaged_lattice {
183
- color: #fff;
184
- background: #1890FF;
185
- border: 1px solid transparent;
186
- border-radius: 0;
187
- }
181
+ .usaged_lattice {
182
+ color: #fff;
183
+ background: #1890FF;
184
+ border: 1px solid transparent;
185
+ border-radius: 0;
186
+ }
188
187
 
188
+ }
189
189
  }
@@ -1,104 +1,106 @@
1
- .wrapper {
2
- height: 28px;
3
- font-size: 12px;
4
- display: flex;
5
- align-items: center;
1
+ .form-properties-box {
2
+ .wrapper {
3
+ height: 28px;
4
+ font-size: 12px;
5
+ display: flex;
6
+ align-items: center;
6
7
 
7
- .wrapper-inner {
8
- float: left;
9
- height: 20px;
10
- line-height: 20px;
11
- margin-right: 8px;
12
- background: #fafafa;
13
- border: 1px solid #d9d9d9;
14
- border-radius: 2px;
15
- cursor: pointer;
16
- overflow: hidden;
17
- text-overflow: ellipsis;
18
- white-space: nowrap;
19
- }
8
+ .wrapper-inner {
9
+ float: left;
10
+ height: 20px;
11
+ line-height: 20px;
12
+ margin-right: 8px;
13
+ background: #fafafa;
14
+ border: 1px solid #d9d9d9;
15
+ border-radius: 2px;
16
+ cursor: pointer;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ white-space: nowrap;
20
+ }
20
21
 
21
- .wrapper-inner:last-child {
22
- margin-right: 0;
22
+ .wrapper-inner:last-child {
23
+ margin-right: 0;
24
+ }
25
+
26
+ .wrapper-inner-fixed {
27
+ float: left;
28
+ height: 20px;
29
+ line-height: 20px;
30
+ margin-right: 2px;
31
+ padding: 0px 6px;
32
+ background: #fafafa;
33
+ border: 1px solid #d9d9d9;
34
+ border-radius: 2px;
35
+ cursor: pointer;
36
+ }
37
+
38
+ &.edit-wrapper {
39
+ .wrapper-inner {
40
+ height: 28px;
41
+ line-height: 28px;
42
+ }
43
+
44
+ .wrapper-inner-fixed {
45
+ height: 28px;
46
+ line-height: 28px;
47
+ }
48
+ }
23
49
  }
24
50
 
25
- .wrapper-inner-fixed {
26
- float: left;
27
- height: 20px;
28
- line-height: 20px;
29
- margin-right: 2px;
30
- padding: 0px 6px;
31
- background: #fafafa;
32
- border: 1px solid #d9d9d9;
33
- border-radius: 2px;
34
- cursor: pointer;
51
+ .@{ant-prefix}-popover-inner-content:nth-child(4n) {
52
+ margin-right: 0px;
35
53
  }
36
54
 
37
- &.edit-wrapper {
38
- .wrapper-inner {
39
- height: 28px;
40
- line-height: 28px;
41
- }
55
+ .inner {
56
+ max-width: 220px;
57
+ font-size: 12px;
42
58
 
43
- .wrapper-inner-fixed {
59
+ .@{ant-prefix}-popover-inner-content {
60
+ // float: left;
61
+ // max-width: 85px;
44
62
  height: 28px;
45
63
  line-height: 28px;
64
+ background: #fafafa;
65
+ border: 1px solid #d9d9d9;
66
+ border-radius: 2px;
67
+ // padding: 0 6px;
68
+ margin-bottom: 2px;
69
+ cursor: pointer;
70
+ // overflow: hidden;
71
+ // text-overflow: ellipsis;
72
+ // white-space: nowrap;
46
73
  }
47
74
  }
48
- }
49
-
50
- .ant-popover-inner-content:nth-child(4n) {
51
- margin-right: 0px;
52
- }
53
75
 
54
- .inner {
55
- max-width: 220px;
56
- font-size: 12px;
57
-
58
- .ant-popover-inner-content {
59
- // float: left;
60
- // max-width: 85px;
61
- height: 28px;
62
- line-height: 28px;
63
- background: #fafafa;
64
- border: 1px solid #d9d9d9;
65
- border-radius: 2px;
66
- // padding: 0 6px;
67
- margin-bottom: 2px;
68
- cursor: pointer;
69
- // overflow: hidden;
70
- // text-overflow: ellipsis;
71
- // white-space: nowrap;
76
+ .inner:after {
77
+ /*伪元素是行内元素 正常浏览器清除浮动方法*/
78
+ content: "";
79
+ display: block;
80
+ height: 0;
81
+ clear: both;
82
+ visibility: hidden;
72
83
  }
73
- }
74
84
 
75
- .inner:after {
76
- /*伪元素是行内元素 正常浏览器清除浮动方法*/
77
- content: "";
78
- display: block;
79
- height: 0;
80
- clear: both;
81
- visibility: hidden;
82
- }
83
85
 
84
-
85
- .ellipsis-box {
86
- overflow: hidden;
87
- text-overflow: ellipsis;
88
- white-space: nowrap;
89
- }
86
+ .ellipsis-box {
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ }
90
91
 
91
92
 
92
- .tag-ci-detail-avatar {
93
- color: #fff;
94
- background-color: #008dff;
95
- margin-right: 8px;
96
- font-size: 10px !important;
97
- margin-top: -2px;
98
- }
93
+ .tag-ci-detail-avatar {
94
+ color: #fff;
95
+ background-color: #008dff;
96
+ margin-right: 8px;
97
+ font-size: 10px !important;
98
+ margin-top: -2px;
99
+ }
99
100
 
100
101
  .tag-wrapper-inner {
101
102
  .@{ant-prefix}-popover-inner-content {
102
103
  padding: 8px !important;
103
104
  }
104
- }
105
+ }
106
+ }
@@ -1,117 +1,34 @@
1
- .simpleColBox {
2
- height: 100%;
3
- width: 100%;
1
+ .form-properties-box {
4
2
  display: flex;
3
+ flex-wrap: wrap;
5
4
  justify-content: space-between;
6
- margin-bottom: 24px
7
- }
8
-
9
- .form_box {
10
- .cw-form-item-label-horizontal {
11
- >label {
12
- width: 100%;
13
5
 
14
- .cw-form-item-typography-label {
15
- word-break: break-all !important;
16
- flex: 1;
17
- }
18
- }
19
- }
20
-
21
- .@{ant-prefix}-checkbox-wrapper+.@{ant-prefix}-checkbox-wrapper {
22
- margin-right: 8px;
23
- margin-left: 0px;
24
- }
6
+ .@{ant-prefix}-form-item {
7
+ padding-bottom: 0px !important;
8
+ margin-bottom: 16px !important;
25
9
  }
26
10
 
27
- .attrDetailLabel {
28
- display: flex;
29
- width: 100%;
30
- margin-bottom: 24px;
31
-
32
- .name {
33
- width: 85px;
34
- margin-right: 6px;
35
- display: flex;
36
- justify-content: space-between;
37
- // align-items: center;
38
- .label {
39
- display: -webkit-box;
40
- -webkit-line-clamp: 2;
41
- -webkit-box-orient: vertical;
42
- overflow: hidden;
43
- word-wrap: break-word;
44
- word-break: break-all;
45
- width: 95%;
46
- }
47
- .symbol {
48
- flex: 1;
49
- }
11
+ .@{ant-prefix}-collapse {
12
+ width: 100%;
50
13
  }
51
14
 
52
- .content {
53
- flex: 1;
54
- }
55
- }
56
-
57
- .CHECKBOX_form {
58
- .@{ant-prefix}-form-item-control {
59
- align-items: center !important;
60
- display: flex !important;
61
- }
62
- }
63
-
64
- .RACK_UNIT_form {
65
- height: 28px !important;
66
- }
67
-
68
- .form-box-label-uni-icon {
69
- padding-left: 10px;
70
- }
71
-
72
- .form-box-label-question-icon {
73
- padding-left: 6px;
74
- }
75
-
76
- .form-properties-box {
77
- display: flex;
78
- flex-wrap: wrap;
79
- justify-content: space-between;
80
-
15
+ .CM-DB-form-item-box:last-child {
81
16
  .@{ant-prefix}-form-item {
82
- padding-bottom: 0px !important;
83
- margin-bottom: 16px !important;
84
- }
85
-
86
- .@{ant-prefix}-collapse {
87
- width: 100%;
17
+ margin-bottom: 0 !important;
88
18
  }
89
19
  }
90
20
 
91
- .form-properties-box {
92
- .CM-DB-form-item-box:last-child {
93
- .@{ant-prefix}-form-item {
94
- margin-bottom: 0 !important;
95
- }
96
- }
97
- }
98
-
99
- .table-label {
100
- .@{ant-prefix}-form-item-label {
101
- width: 100% !important;
102
- margin-bottom: 6px;
103
-
104
- & label::after {
105
- display: none;
106
- }
107
- }
21
+ .@{ant-prefix}-typography {
22
+ margin-bottom: 0 !important;
23
+ }
108
24
 
25
+ .view_table {
109
26
  .@{ant-prefix}-form-item-control-wrapper {
110
- display: none;
27
+ width: calc(100% - 110px);
111
28
  }
112
- }
29
+ }
113
30
 
114
- .form-box {
31
+ .form_box {
115
32
  .cw-form-item-label-horizontal {
116
33
  >label {
117
34
  width: 100%;
@@ -123,69 +40,67 @@
123
40
  }
124
41
  }
125
42
 
126
- .@{ant-prefix}-checkbox-wrapper {
43
+ .@{ant-prefix}-checkbox-wrapper+.@{ant-prefix}-checkbox-wrapper {
127
44
  margin-right: 8px;
128
- margin-left: 0px !important;
45
+ margin-left: 0px;
129
46
  }
47
+ }
130
48
 
131
- .@{ant-prefix}-form-item-control-wrapper {
132
- width: calc(100% - 110px);
133
- overflow: hidden;
134
-
135
- .@{ant-prefix}-form-item-children {
136
- width: 100%;
137
- display: inline-block;
138
-
139
- .@{ant-prefix}-switch {
140
- max-width: 100%;
49
+ .attrDetailLabel {
50
+ display: flex;
51
+ width: 100%;
52
+ margin-bottom: 24px;
53
+
54
+ .name {
55
+ width: 85px;
56
+ margin-right: 6px;
57
+ display: flex;
58
+ justify-content: space-between;
59
+
60
+ // align-items: center;
61
+ .label {
62
+ display: -webkit-box;
63
+ -webkit-line-clamp: 2;
64
+ -webkit-box-orient: vertical;
65
+ overflow: hidden;
66
+ word-wrap: break-word;
67
+ word-break: break-all;
68
+ width: 95%;
69
+ }
141
70
 
142
- .switchLabelBox {
143
- max-width: 100%;
144
- overflow: hidden;
145
- text-overflow: ellipsis;
146
- white-space: nowrap;
147
- }
148
- }
71
+ .symbol {
72
+ flex: 1;
149
73
  }
150
74
  }
151
- }
152
-
153
-
154
- .ciunitbitmap-content-box {
155
- max-width: 320px;
156
- display: flex;
157
-
158
- .ciunitbitmap-modal-icon-box {
159
- width: 24px;
160
- height: 24px;
161
- background-color: rgb(230, 247, 255);
162
- border-radius: 50%;
163
- display: flex;
164
- justify-content: center;
165
- align-items: center;
166
75
 
167
- .ciunitbitmap-modal-icon {
168
- font-size: 12px;
169
- color: rgb(25, 133, 255);
76
+ .content {
77
+ flex: 1;
170
78
  }
171
79
  }
172
80
 
173
- .ciunitbitmap-content-text {
174
- margin-left: 6px;
81
+ .ciunitbitmap-content-box {
82
+ max-width: 320px;
175
83
  display: flex;
176
- align-items: center;
177
- }
178
- }
179
84
 
180
-
181
- .form-properties-view-box {
182
- .@{ant-prefix}-typography {
183
- margin-bottom: 0 !important;
85
+ .ciunitbitmap-modal-icon-box {
86
+ width: 24px;
87
+ height: 24px;
88
+ background-color: rgb(230, 247, 255);
89
+ border-radius: 50%;
90
+ display: flex;
91
+ justify-content: center;
92
+ align-items: center;
93
+
94
+ .ciunitbitmap-modal-icon {
95
+ font-size: 12px;
96
+ color: rgb(25, 133, 255);
97
+ }
184
98
  }
185
99
 
186
- .view_table {
187
- .@{ant-prefix}-form-item-control-wrapper {
188
- width: calc(100% - 110px);
189
- }
100
+ .ciunitbitmap-content-text {
101
+ margin-left: 6px;
102
+ display: flex;
103
+ align-items: center;
104
+ }
190
105
  }
191
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chaoswise/business",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "业务组件库",
5
5
  "keywords": [
6
6
  "ui",
@@ -104,5 +104,6 @@
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
107
- "license": "MIT"
107
+ "license": "MIT",
108
+ "gitHead": "5fe209921911217d8936eb4c50323a70dc954282"
108
109
  }