bri-components 1.1.0 → 1.1.1

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.
Files changed (50) hide show
  1. package/lib/2.bri-components.min.js +1 -1
  2. package/lib/4.bri-components.min.js +1 -1
  3. package/lib/6.bri-components.min.js +1 -1
  4. package/lib/7.bri-components.min.js +1 -1
  5. package/lib/8.bri-components.min.js +1 -1
  6. package/lib/bri-components.min.js +4 -4
  7. package/package.json +1 -1
  8. package/src/components/controls/base/BriLabels.vue +116 -10
  9. package/src/components/controls/base/DshCascader.vue +1 -5
  10. package/src/components/controls/base/DshCoordinates.vue +84 -79
  11. package/src/components/controls/base/DshEditor.vue +9 -4
  12. package/src/components/controls/base/controlShow.vue +5 -5
  13. package/src/components/controls/senior/flatTable.vue +58 -53
  14. package/src/components/form/DshForm.vue +4 -0
  15. package/src/components/list/BriFlatTable.vue +13 -8
  16. package/src/components/list/BriTable.vue +1 -1
  17. package/src/components/list/DshBox/DshBox.vue +1 -1
  18. package/src/components/list/DshBox/DshCard.vue +1 -1
  19. package/src/components/list/DshBox/DshCrossTable.vue +1 -1
  20. package/src/components/list/DshBox/DshList.vue +3 -3
  21. package/src/components/list/DshBox/DshPanel.vue +1 -1
  22. package/src/components/list/DshBox/DshSingleData.vue +1 -1
  23. package/src/components/list/DshCascaderTable.vue +2 -1
  24. package/src/components/list/DshFlatTable.vue +1 -1
  25. package/src/components/list/easyTable/v-table/src/table.vue +3 -3
  26. package/src/components/list/evTable/EvTable.vue +1 -1
  27. package/src/components/other/BriTransfer.vue +1 -1
  28. package/src/components/other/ZGantt.vue +2 -2
  29. package/src/components/small/DshControlDefine.vue +2 -1
  30. package/src/components/small/DshDropdown.vue +1 -1
  31. package/src/components/small/DshTdRender.js +1 -1
  32. package/src/styles/common/control.less +1 -0
  33. package/src/styles/components/controls/BriLabels.less +99 -3
  34. package/src/styles/components/controls/DshCoordinates.less +6 -1
  35. package/src/styles/components/controls/DshInput.less +6 -0
  36. package/src/styles/components/controls/controlShow.less +0 -2
  37. package/src/styles/components/index.less +1 -1
  38. package/src/styles/components/small/DshControlDefine.less +13 -35
  39. package/src/styles/components/small/DshTitle.less +0 -3
  40. package/src/styles/components/unit/DshFormItem.less +1 -1
  41. package/src/styles/iconfont/iconfont.css +254 -0
  42. package/src/styles/iconfont/iconfont.eot +0 -0
  43. package/src/styles/iconfont/iconfont.js +1 -0
  44. package/src/styles/iconfont/iconfont.json +422 -0
  45. package/src/styles/iconfont/iconfont.svg +137 -0
  46. package/src/styles/iconfont/iconfont.ttf +0 -0
  47. package/src/styles/iconfont/iconfont.woff +0 -0
  48. package/src/styles/iconfont/iconfont.woff2 +0 -0
  49. package/src/styles/index.less +1 -0
  50. package/src/styles/plugin/iview.less +2 -1
@@ -63,8 +63,7 @@
63
63
  default () {
64
64
  return {};
65
65
  }
66
- },
67
- isShare: Boolean
66
+ }
68
67
  },
69
68
  model: {
70
69
  prop: "data",
@@ -106,6 +105,8 @@
106
105
 
107
106
  selfPropsObj () {
108
107
  return {
108
+ isShare: false, // 是否是分享页在用
109
+
109
110
  _contentHeight: 500,
110
111
  _useSelection: false, // 使用选择列
111
112
  _useIndex: true, // 使用序号列
@@ -117,6 +118,9 @@
117
118
  ...this.propsObj
118
119
  };
119
120
  },
121
+ isShare () {
122
+ return this.selfPropsObj.isShare;
123
+ },
120
124
  contentHeight () {
121
125
  return this.selfPropsObj._contentHeight;
122
126
  },
@@ -199,9 +203,8 @@
199
203
  parentData: this.listData,
200
204
  formData: row,
201
205
  formItem: this.resetCol(item),
202
- isShare: this.isShare,
203
206
  rowIndex: rowIndex,
204
- isUnit: !this.finalCanEdit
207
+ isUnit: !this.canEdit
205
208
  },
206
209
  on: {
207
210
  blur: () => this.controlBlur(null, column, row, arguments),
@@ -216,9 +219,8 @@
216
219
  parentData: this.listData,
217
220
  formData: row,
218
221
  formItem: this.resetCol(item),
219
- isShare: this.isShare,
220
222
  rowIndex: rowIndex,
221
- isUnit: !this.finalCanEdit
223
+ isUnit: !this.canEdit
222
224
  },
223
225
  on: {
224
226
  blur: () => this.controlBlur(null, column, row, arguments),
@@ -343,7 +345,6 @@
343
345
  };
344
346
  const newRowIndex = index == null ? list.length : index + 1;
345
347
  list.splice(newRowIndex, 0, newRow);
346
-
347
348
  this.$forceUpdate(); // 自定义页中点击添加一行没有更新页面
348
349
 
349
350
  this.change("createRow", null, newRow, newRowIndex);
@@ -387,7 +388,11 @@
387
388
  _optionKind: "dropdown"
388
389
  }
389
390
  };
390
- return { ...col, ...(obj[col._type] || {}) };
391
+ return {
392
+ ...col,
393
+ ...(obj[col._type] || {}),
394
+ isShare: this.isShare
395
+ };
391
396
  },
392
397
  getUnitCanEdit (col, row) {
393
398
  return this.canEdit && // 是否是编辑状态
@@ -56,7 +56,7 @@
56
56
  isLoading: Boolean,
57
57
  noDataText: {
58
58
  type: String,
59
- default: "暂无数据"
59
+ default: "暂无内容"
60
60
  },
61
61
  columns: Array,
62
62
  data: Array,
@@ -13,7 +13,7 @@
13
13
  :propsObj="listPropsObj"
14
14
  :changedFields="changedFields"
15
15
  :isLoading="listPropsObj && listPropsObj.isLoading"
16
- :noDataText="listPropsObj && listPropsObj.noDataText || '暂无数据...'"
16
+ :noDataText="listPropsObj && listPropsObj.noDataText || '暂无内容...'"
17
17
  @clickRow="clickRow"
18
18
  @sortChange="changeSort"
19
19
  @selectChange="changeSelect"
@@ -113,7 +113,7 @@
113
113
  },
114
114
  noDataText: {
115
115
  type: String,
116
- default: "暂无数据..."
116
+ default: "暂无内容..."
117
117
  }
118
118
  },
119
119
  data () {
@@ -367,7 +367,7 @@
367
367
 
368
368
  noDataText: {
369
369
  type: String,
370
- default: "暂无数据..."
370
+ default: "暂无内容..."
371
371
  },
372
372
  changedFields: {
373
373
  type: Array,
@@ -133,12 +133,12 @@
133
133
  >
134
134
  <div class="row-item-inner dsh-ellipsis">
135
135
  <dsh-td-render
136
- v-if="col.render"
136
+ v-if="col.renderBodyCell"
137
137
  class="ms-ellipsis"
138
138
  :row="row"
139
139
  :column="col"
140
140
  :index="index"
141
- :render="col.render"
141
+ :render="col.renderBodyCell"
142
142
  ></dsh-td-render>
143
143
  <template v-else-if="col.formatter">
144
144
  <div v-html="col.formatter(row, index)"></div>
@@ -225,7 +225,7 @@
225
225
  },
226
226
  noDataText: {
227
227
  type: String,
228
- default: "暂无数据..."
228
+ default: "暂无内容..."
229
229
  }
230
230
  },
231
231
  data () {
@@ -164,7 +164,7 @@
164
164
  },
165
165
  noDataText: {
166
166
  type: String,
167
- default: "暂无数据..."
167
+ default: "暂无内容..."
168
168
  },
169
169
 
170
170
  operationList: {
@@ -8,7 +8,7 @@
8
8
  :formList="columns"
9
9
  ></dsh-form>
10
10
 
11
- <!-- 暂无数据 -->
11
+ <!-- 暂无内容 -->
12
12
  <div
13
13
  v-else
14
14
  class="DshSingleData-nodata"
@@ -153,6 +153,7 @@
153
153
  :formData="row[col.nodeKey]"
154
154
  :formItem="col"
155
155
  :rowIndex="rowIndex"
156
+ :isUnit="!canEdit"
156
157
  @change="$dispatchEvent(operationMap.changeVal, col, row, arguments)"
157
158
  ></dsh-unit>
158
159
  </td>
@@ -165,7 +166,7 @@
165
166
  v-else
166
167
  class="table-nodata"
167
168
  >
168
- <td :colspan="columns.length">暂无数据……</td>
169
+ <td :colspan="columns.length">暂无内容……</td>
169
170
  </tr>
170
171
  </tbody>
171
172
  </table>
@@ -154,7 +154,7 @@
154
154
  <td
155
155
  class="table-row-nodata"
156
156
  :colspan="showColumns.length"
157
- >暂无数据……</td>
157
+ >暂无内容……</td>
158
158
  </tr>
159
159
  </tfoot>
160
160
  </table>
@@ -992,7 +992,7 @@
992
992
  hasFrozenColumn: false, // 是否拥有固定列(false时最后一列的右边border无边框)
993
993
  hasFrozenRightColumn: false,
994
994
  resizeTimer: null,
995
- firstLoad: true, // 表格首次初始化加载,用于区分显示”数据加载中“还是”暂无数据“
995
+ firstLoad: true, // 表格首次初始化加载,用于区分显示”数据加载中“还是”暂无内容“
996
996
  tipContent: ""
997
997
  };
998
998
  },
@@ -1113,7 +1113,7 @@
1113
1113
  // 没数据时的html
1114
1114
  errorContent: {
1115
1115
  type: String,
1116
- default: "暂无数据..."
1116
+ default: "暂无内容..."
1117
1117
  },
1118
1118
  // 没数据时内容区域高度
1119
1119
  errorContentHeight: {
@@ -1488,7 +1488,7 @@
1488
1488
  updateErrorContent () {
1489
1489
  if (!this.firstLoad) {
1490
1490
  if (!(this.internalTableData && this.internalTableData.length)) {
1491
- this.tipContent = "暂无数据";
1491
+ this.tipContent = "暂无内容";
1492
1492
  }
1493
1493
  }
1494
1494
  this.firstLoad = false;
@@ -173,7 +173,7 @@
173
173
  height: Number,
174
174
  noDataText: {
175
175
  type: String,
176
- default: "暂无数据..."
176
+ default: "暂无内容..."
177
177
  }
178
178
  },
179
179
  data () {
@@ -6,7 +6,7 @@
6
6
  :filterable="filterable"
7
7
  :filter-method="filterMethod"
8
8
  :titles="titles"
9
- not-found-text="暂无数据"
9
+ not-found-text="暂无内容"
10
10
  @on-change="handleChange"
11
11
  ></Transfer>
12
12
  </div>
@@ -110,14 +110,14 @@
110
110
  <td
111
111
  :colspan="timeData.length"
112
112
  class="briGantt-table-td"
113
- >暂无数据</td>
113
+ >暂无内容</td>
114
114
  </tr>
115
115
  <tbody v-if="type==='table'">
116
116
  <tr v-if="computedData.length === 0">
117
117
  <td
118
118
  :colspan="timeData.length"
119
119
  class="briGantt-table-td"
120
- >暂无数据</td>
120
+ >暂无内容</td>
121
121
  </tr>
122
122
  <tr
123
123
  class="briGantt-table-tr"
@@ -3,7 +3,8 @@
3
3
  :class="{
4
4
  'dsh-control-define': true,
5
5
  'dsh-control-define-multiplerow': selfPropsObj._multiplerow,
6
- 'dsh-control-define-disabled': !canEdit
6
+ 'dsh-control-define-disabled': $isDisabled(canEdit, propsObj),
7
+ 'dsh-control-define-show': !canEdit
7
8
  }"
8
9
  @click="clickInput"
9
10
  >
@@ -86,7 +86,7 @@
86
86
  v-else
87
87
  class="nodata"
88
88
  >
89
- 暂无数据
89
+ 暂无内容
90
90
  </div>
91
91
  </div>
92
92
  </div>
@@ -16,6 +16,6 @@ export default {
16
16
  index: ctx.props.index
17
17
  };
18
18
  if (ctx.props.column) params.column = ctx.props.column;
19
- return ctx.props.render(h, params);
19
+ return ctx.props.render(params, h);
20
20
  }
21
21
  };
@@ -14,6 +14,7 @@
14
14
  background-color: transparent;
15
15
  }
16
16
  .control-edit {
17
+ height: 32px;
17
18
  color: @textColor;
18
19
  border: 1px solid @borderColor;
19
20
  background: @inputBg;
@@ -4,9 +4,23 @@
4
4
  &-dropdown {
5
5
  width: 100%;
6
6
 
7
- &-input {
8
- input {
9
- cursor: pointer;
7
+ &-show {
8
+ display: flex;
9
+ justify-content: space-between;
10
+ cursor: pointer;
11
+ border-radius: @borderRadius;
12
+ border: 1px solid @borderColor;
13
+ padding-left: 5px;
14
+
15
+ &-active {
16
+ border-color: #64c6d1;
17
+ box-shadow: 0 0 0 2px rgba(61, 184, 197, 0.2);
18
+ }
19
+
20
+ &-arrow {
21
+ display: flex;
22
+ align-items: center;
23
+ margin-right: 5px;
10
24
  }
11
25
  }
12
26
 
@@ -18,6 +32,88 @@
18
32
  background-color: @theme-focus;
19
33
  color: @themeColor;
20
34
  }
35
+
36
+ &-show {
37
+ // width: 100%;
38
+ display: flex;
39
+ justify-content: space-between;
40
+ align-items: center;
41
+
42
+ &-icons {
43
+ margin-left: 10px;
44
+
45
+ i {
46
+ padding: 3px;
47
+ border-radius: @borderRadius;
48
+ color: rgba(0, 0, 0, 0.4);
49
+
50
+ &:hover {
51
+ background-color: #fff;
52
+ }
53
+ }
54
+
55
+ &-edit {
56
+ &:hover {
57
+ color: @themeColor;
58
+ }
59
+ }
60
+
61
+ &-del {
62
+ &:hover {
63
+ color: @error-color;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+
71
+ .ivu-select-dropdown {
72
+ width: fit-content;
73
+ }
74
+
75
+ .ivu-input-suffix {
76
+ display: flex;
77
+ align-items: center;
78
+
79
+ i {
80
+ width: 24px;
81
+ height: 24px;
82
+ line-height: 24px;
83
+
84
+ &:hover {
85
+ background-color: @btn-hover;
86
+ border-radius: @borderRadius;
87
+ }
88
+ }
89
+ }
90
+
91
+ &-view {
92
+ .dsh-flex-row-start-start();
93
+ flex-wrap: wrap;
94
+ height: 32px;
95
+ overflow-y: hidden;
96
+
97
+ &-readonly {
98
+ width: 100%;
99
+ background: @white;
100
+ border: 1px solid #eee;
101
+ border-radius: 4px;
102
+ height: 32px;
103
+ cursor: not-allowed;
104
+
105
+ .DshLabels-view-nodata {
106
+ display: none;
107
+ }
108
+ }
109
+
110
+ &-tag {
111
+ width: fit-content;
112
+ margin-right: 10px;
113
+ }
114
+
115
+ &-nodata {
116
+ color: @textColor;
21
117
  }
22
118
  }
23
119
  }
@@ -1,11 +1,13 @@
1
1
  .DshCoordinates {
2
+ width: 100%;
3
+ line-height: 32px;
2
4
  .textRight {
3
5
  text-align: right;
4
6
  }
5
7
 
6
8
  &-wrap {
7
9
  position: relative;
8
- padding: 0 7px;
10
+ padding: 0 8px;
9
11
  .control-edit();
10
12
  &-zuobiao{
11
13
  color: #e5e5e5;
@@ -47,6 +49,9 @@
47
49
  &-readonly {
48
50
  cursor: not-allowed;
49
51
  }
52
+ &-show {
53
+ padding: 0 8px;
54
+ }
50
55
  }
51
56
 
52
57
 
@@ -37,4 +37,10 @@
37
37
  width: 100%;
38
38
  display: flex;
39
39
  }
40
+ }
41
+ .ivu-input {
42
+ .control-edit();
43
+ &[disabled] {
44
+ .control-disabled();
45
+ }
40
46
  }
@@ -1,7 +1,5 @@
1
1
  .controlShow {
2
2
  &-val {
3
- display: inline-block;
4
- width: 100%;
5
3
  height: 100%;
6
4
  }
7
5
 
@@ -25,7 +25,7 @@
25
25
  // list
26
26
  @import "./list/evTable.less";
27
27
  @import "./list/DshCascaderTable.less";
28
- @import "./list/DshFlatTable.less";
28
+ // @import "./list/DshFlatTable.less";
29
29
  @import "./list/DshSingleData.less";
30
30
  @import "./list/DshCrossTable.less";
31
31
  @import "./list/ivu_reset.less";
@@ -1,22 +1,5 @@
1
1
  .dsh-control-define {
2
- height: 32px;
3
- padding: 2px 6px;
4
- border: 1px solid @borderColor;
5
- border-radius: 0px;
6
- line-height: 22px;
7
- text-align: left;
8
- cursor: pointer;
9
- overflow: auto;
10
-
11
- // &::-webkit-scrollbar {
12
- // height: 4px;
13
- // width: 4px;
14
-
15
- // &::-webkit-scrollbar-thumb {
16
- // border-radius: 4px;
17
- // background-clip: border-box;
18
- // }
19
- // }
2
+ .control-edit();
20
3
 
21
4
  &-multiplerow {
22
5
  height: 70px;
@@ -29,36 +12,31 @@
29
12
  }
30
13
 
31
14
  &-disabled {
32
- border-color: @border-disabled !important;
15
+ .control-disabled();
16
+ }
17
+
18
+ &-show {
19
+ .control-show();
33
20
  }
34
21
 
35
22
  &-text {
36
23
  width: 100%;
24
+ height: 100%;
37
25
  display: flex;
38
26
  justify-content: space-between;
39
27
  align-items: center;
28
+ overflow-x: auto;
29
+ overflow-y: hidden;
30
+ padding: 0 8px;
31
+ .bri-scrollbar6();
40
32
 
41
33
  .DshTags {
42
- max-width: 100%;
43
34
  display: flex;
44
- .ivu-tag {
45
- display: flex;
46
- height: 24px;
47
- .ivu-tag-text {
48
- .dsh-ellipsis();
49
- }
50
- .ivu-icon {
51
- line-height: 22px;
52
- }
53
- }
35
+ white-space: nowrap;
54
36
  }
55
37
  }
56
38
 
57
39
  &-nodata {
58
- width: 100%;
59
- height: 100%;
60
- display: flex;
61
- align-items: center;
62
- color: #b7b7b7;
40
+ .control-notext();
63
41
  }
64
42
  }
@@ -3,9 +3,6 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  cursor: pointer;
6
- &-icon {
7
- color: #666;
8
- }
9
6
  &-name {
10
7
  margin-left: 10px;
11
8
  font-size: @smallTitleSize;
@@ -1,5 +1,5 @@
1
1
  .DshFormItem {
2
- margin: 3px 6px;
2
+ margin: 5px 6px;
3
3
  padding: 3px 10px;
4
4
  overflow: hidden;
5
5