bri-components 1.2.45 → 1.2.47

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 (28) hide show
  1. package/package.json +1 -1
  2. package/src/abolish/DshFlatTable.vue +1 -1
  3. package/src/components/controls/BriControlInput.vue +70 -30
  4. package/src/components/list/BriFlatTable.vue +2 -2
  5. package/src/components/list/BriTable.vue +1 -1
  6. package/src/components/list/DshBox/DshBox.vue +2 -2
  7. package/src/components/list/DshBox/DshCrossTable.vue +1 -1
  8. package/src/components/list/DshBox/DshList.vue +6 -18
  9. package/src/components/list/DshBox/DshTable.vue +2 -2
  10. package/src/styles/components/index.less +0 -2
  11. package/src/styles/components/list/BriTable.less +5 -5
  12. package/src/styles/components/list/DshBox/DshList.less +13 -35
  13. package/src/styles/global/animate.less +11 -0
  14. package/src/styles/{common/common.less → global/base.less} +2 -2
  15. package/src/styles/global/global.less +6 -0
  16. package/src/styles/{common → global}/text.less +3 -3
  17. package/src/styles/{variables.less → global/variables.less} +0 -2
  18. package/src/styles/index.less +11 -7
  19. package/src/styles/{plugin/easytable.less → reset-easytable.less} +0 -1
  20. package/src/styles/{plugin/iview.less → reset-iview.less} +0 -3
  21. package/src/styles/reset.less +0 -1
  22. package/src/styles/animate.less +0 -16
  23. package/src/styles/common/index.less +0 -5
  24. package/src/styles/components/controls/BriControlInput.less +0 -34
  25. package/src/styles/plugin/index.less +0 -2
  26. /package/src/styles/{common/control.less → control.less} +0 -0
  27. /package/src/styles/{common → global}/box.less +0 -0
  28. /package/src/styles/{common → global}/flex.less +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.2.45",
3
+ "version": "1.2.47",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -447,7 +447,7 @@
447
447
  this.selections = this.selections.filter(checkItem => checkItem._id !== row._id);
448
448
  }
449
449
 
450
- this.$emit("selectChange", this.selections, row, bool);
450
+ this.$emit("changeSelect", this.selections, row, bool);
451
451
  },
452
452
  // 点击 -添加行
453
453
  clickCreate (operationItem, row, index, list) {
@@ -4,41 +4,43 @@
4
4
  @mouseenter="isHover = true"
5
5
  @mouseleave="isHover = false"
6
6
  >
7
- <!-- 有值 -->
8
- <template v-if="!$isEmptyData(value)">
9
- <!-- 数组的 -->
10
- <dsh-tags
11
- v-if="Array.isArray(value)"
12
- class="overflow"
13
- :list="value"
14
- :propsObj="{
7
+ <template>
8
+ <!-- 有值 -->
9
+ <template v-if="!$isEmptyData(value)">
10
+ <!-- 数组的 -->
11
+ <dsh-tags
12
+ v-if="Array.isArray(value)"
13
+ class="overflow"
14
+ :list="value"
15
+ :propsObj="{
15
16
  disabled: !canEdit,
16
17
  closable: true
17
18
  }"
18
- @delete="clickDeleteItem"
19
- ></dsh-tags>
19
+ @delete="clickDeleteItem"
20
+ ></dsh-tags>
20
21
 
21
- <!-- 对象的 地理坐标 -->
22
- <div
23
- v-else-if="$dataType(value, 'object')"
24
- class="text"
25
- >
26
- {{ value._name || value.name || value.lnglat }}
27
- </div>
22
+ <!-- 对象的 地理坐标 -->
23
+ <div
24
+ v-else-if="$dataType(value, 'object')"
25
+ class="text"
26
+ >
27
+ {{ value._name || value.name || value.lnglat }}
28
+ </div>
28
29
 
29
- <!-- 文字的 -->
30
- <div
31
- v-else
32
- class="text"
33
- >
34
- {{ value }}
35
- </div>
36
- </template>
37
- <!-- 无值 -->
38
- <template v-else>
39
- <div class="placeholder">
40
- {{ propsObj._placeholder }}
41
- </div>
30
+ <!-- 文字的 -->
31
+ <div
32
+ v-else
33
+ class="text"
34
+ >
35
+ {{ value }}
36
+ </div>
37
+ </template>
38
+ <!-- 无值 -->
39
+ <template v-else>
40
+ <div class="placeholder">
41
+ {{ propsObj._placeholder }}
42
+ </div>
43
+ </template>
42
44
  </template>
43
45
 
44
46
  <!-- 图标 -->
@@ -92,3 +94,41 @@
92
94
  }
93
95
  };
94
96
  </script>
97
+
98
+ <style lang="less" scoped>
99
+ .BriControlInput {
100
+ height: 32px;
101
+ padding: 4px 0 4px 7px;
102
+ line-height: 24px;
103
+ .dsh-flex-row-between-center();
104
+
105
+ .text {
106
+ .dsh-ellipsis();
107
+ }
108
+
109
+ .overflow {
110
+ overflow: auto;
111
+ .bri-scrollbar3();
112
+ }
113
+
114
+ .placeholder {
115
+ flex: 1;
116
+ min-width: 0px;
117
+ overflow: hidden;
118
+ }
119
+
120
+ .ivu-icon {
121
+ padding: 5px;
122
+ color: @placeholder-disabled-color;
123
+ }
124
+
125
+ .icon {
126
+ &-default {
127
+
128
+ }
129
+ &-close {
130
+
131
+ }
132
+ }
133
+ }
134
+ </style>
@@ -6,7 +6,7 @@
6
6
  :columns="showColumns"
7
7
  :data="listData"
8
8
  :footer-data="footerData"
9
- @selectChange="changeSelect"
9
+ @changeSelect="changeSelect"
10
10
  @selectAll="changeSelect"
11
11
  ></bri-table>
12
12
 
@@ -378,7 +378,7 @@
378
378
  });
379
379
  },
380
380
  changeSelect (list) {
381
- this.$emit("selectChange", list);
381
+ this.$emit("changeSelect", list);
382
382
  },
383
383
  // 表单控件值改变
384
384
  changeVal (operationItem, col, row, rowIndex, params) {
@@ -145,7 +145,7 @@
145
145
  // 行选择改变事件
146
146
  selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
147
147
  this.$emit(
148
- "selectChange",
148
+ "changeSelect",
149
149
  this.data.filter(dataItem => selectedRowKeys.includes(dataItem[this.selfPropsObj.rowKeyFieldName])),
150
150
  { row, isSelected, selectedRowKeys }
151
151
  );
@@ -16,7 +16,7 @@
16
16
  :noDataText="listPropsObj && listPropsObj.noDataText || '暂无内容...'"
17
17
  @clickRow="clickRow"
18
18
  @sortChange="changeSort"
19
- @selectChange="changeSelect"
19
+ @changeSelect="changeSelect"
20
20
  @selectAll="selectAll"
21
21
  @select="select"
22
22
  @groupScroll="groupScroll"
@@ -117,7 +117,7 @@
117
117
  },
118
118
  // 改变选择项
119
119
  changeSelect (...params) {
120
- this.$emit("selectChange", ...params);
120
+ this.$emit("changeSelect", ...params);
121
121
  },
122
122
  // 切换全选
123
123
  selectAll (...params) {
@@ -605,7 +605,7 @@
605
605
  },
606
606
  // 改变选择项
607
607
  changeSelect () {
608
- this.$emit("selectChange", this.selectIds, this.selections);
608
+ this.$emit("changeSelect", this.selectIds, this.selections);
609
609
  }
610
610
  // change (...params) {
611
611
  // this.$emit("change", ...params);
@@ -21,7 +21,6 @@
21
21
  class="list-cols-right row"
22
22
  :style="{
23
23
  paddingLeft: multiple ? '48px' : '0px',
24
- background: useColBg ? '#f0f0f0' : 'none'
25
24
  }"
26
25
  >
27
26
  <div
@@ -57,20 +56,13 @@
57
56
 
58
57
  <!-- 行 -->
59
58
  <div class="list-rows">
60
- <!-- 加载中 -->
61
- <div
59
+ <!-- 加载 -->
60
+ <bri-loading
62
61
  v-if="isLoading"
63
62
  class="list-loading"
64
- >
65
- <div class="list-loading-wrap"></div>
66
- <div class="list-loading-content">
67
- <span>
68
- <i class="list-loading-content-icon"></i>
69
- </span>
70
- </div>
71
- </div>
72
-
73
- <!-- 加载完 -->
63
+ mode="middle"
64
+ center
65
+ />
74
66
  <template v-else>
75
67
  <!-- 有数据 -->
76
68
  <template v-if="data.length">
@@ -196,7 +188,6 @@
196
188
  default () {
197
189
  return {
198
190
  multiple: true,
199
- useColBg: true,
200
191
  sequence: false
201
192
  };
202
193
  }
@@ -237,9 +228,6 @@
237
228
  multiple () {
238
229
  return this.propsObj.multiple !== false;
239
230
  },
240
- useColBg () {
241
- return this.propsObj.useColBg !== false;
242
- },
243
231
  sequence () {
244
232
  return this.propsObj.sequence && this.propsObj.sequence !== false;
245
233
  }
@@ -274,7 +262,7 @@
274
262
  },
275
263
  // 改变选择项
276
264
  changeSelect () {
277
- this.$emit("selectChange", this.selectIds, this.selections);
265
+ this.$emit("changeSelect", this.selectIds, this.selections);
278
266
  },
279
267
 
280
268
  change (...params) {
@@ -6,7 +6,7 @@
6
6
  :propsObj="propsObj"
7
7
  :isLoading="isLoading"
8
8
  :noDataText="noDataText"
9
- @selectChange="changeSelect"
9
+ @changeSelect="changeSelect"
10
10
  @selectAll="changeSelect"
11
11
  @click-row="clickRow"
12
12
  @sort-change="changeSort"
@@ -189,7 +189,7 @@
189
189
  },
190
190
  // 改变选择项
191
191
  changeSelect (...params) {
192
- this.$emit("selectChange", params[0].map(item => item._id), ...params);
192
+ this.$emit("changeSelect", params[0].map(item => item._id), ...params);
193
193
  }
194
194
  // // 切换全选
195
195
  // selectAll (...params) {
@@ -22,8 +22,6 @@
22
22
  // unit
23
23
  @import "./unit/DshFormUnit.less";
24
24
  @import "./unit/DshListUnit.less";
25
- // controls
26
- @import "./controls/BriControlInput.less";
27
25
 
28
26
  @import "./controls/base/DshInput.less";
29
27
  @import "./controls/base/BriInputs.less";
@@ -38,13 +38,13 @@
38
38
  &-empty {
39
39
  width: 100%;
40
40
  height: 100%;
41
- color: @textColor;
42
- text-align: center;
41
+ padding: 9px 20px;
43
42
  border: 1px solid @borderColor;
44
43
  border-top: none;
45
- padding: 9px 20px;
46
- border-bottom-left-radius: @borderRadius;
47
- border-bottom-right-radius: @borderRadius;
44
+ // border-bottom-left-radius: @borderRadius;
45
+ // border-bottom-right-radius: @borderRadius;
46
+ text-align: center;
47
+ color: @textColor;
48
48
  .dsh-flex-row-center-center();
49
49
  }
50
50
 
@@ -3,49 +3,20 @@
3
3
 
4
4
  .list {
5
5
  &-loading {
6
- min-height: 100px;
7
-
8
- &-wrap {
9
- display: block;
10
- height: 100%;
11
- width: 100%;
12
- background-color: #fff;
13
- z-index: 99999;
14
- position: relative;
15
- opacity: 0.6;
16
- }
17
-
18
- &-content {
19
- z-index: 9999999;
20
- position: absolute;
21
- top: 30px;
22
- left: 50%;
23
- }
24
-
25
- &-icon {
26
- -moz-animation: spin 2.3s infinite linear;
27
- -o-animation: spin 2.3s infinite linear;
28
- -webkit-animation: spin 2.3s infinite linear;
29
- animation: spin 2.3s infinite linear;
30
- display: inline-block;
31
- font-size: 28px;
32
- opacity:0.6;
33
-
34
- &:before {
35
- content: '\e838';
36
- }
37
- }
6
+ margin-top: 120px;
38
7
  }
39
8
 
40
9
  &-cols,
41
10
  &-rows {
42
11
  position: relative;
12
+
43
13
  &-left {
44
14
  width: 48px;
45
15
  text-align: center;
46
16
  position: absolute;
47
17
  left: 0;
48
18
  top: 0;
19
+
49
20
  label {
50
21
  display: inline-block;
51
22
  height: 36px;
@@ -60,6 +31,7 @@
60
31
  line-height: 20px;
61
32
  display: flex;
62
33
  justify-content: space-between;
34
+
63
35
  &-item {
64
36
  min-width: 120px;
65
37
  height: 100%;
@@ -73,16 +45,21 @@
73
45
  &-cols {
74
46
  height: @height;
75
47
  background: #f0f0f0;
48
+
76
49
  &-left {}
77
- &-right {}
50
+ &-right {
51
+
52
+ }
78
53
 
79
54
  .row {
80
55
  font-weight: 700;
56
+
81
57
  &-item {
82
58
  padding: 10px 16px;
83
59
  border-top: 1px #e5e5e5 solid;
84
60
  border-bottom: 1px #f0f0f0 solid;
85
61
  border-left: 1px #e5e5e5 solid;
62
+ background: #f0f0f0;
86
63
 
87
64
  &:last-child{
88
65
  border-right: 1px #e5e5e5 solid;
@@ -107,19 +84,20 @@
107
84
  line-height: 20px;
108
85
  }
109
86
  }
87
+
110
88
  &-right {}
111
89
 
112
90
  .row {
113
91
  height: 44px;
114
92
  line-height: 20px;
115
-
116
93
  cursor: pointer;
94
+
117
95
  &-item {
118
96
  display: flex;
119
97
  border: 1px solid #E5E5E5;
120
98
  border-width: 0 0 1px 1px;
121
99
 
122
- &:last-child{
100
+ &:last-child {
123
101
  border-width: 0 1px 1px 1px;
124
102
  }
125
103
 
@@ -0,0 +1,11 @@
1
+ // @keyframes animate-spin {
2
+ // from {
3
+ // transform: rotate(0deg);
4
+ // }
5
+ // 50% {
6
+ // transform: rotate(180deg);
7
+ // }
8
+ // to {
9
+ // transform: rotate(360deg);
10
+ // }
11
+ // }
@@ -2,8 +2,8 @@
2
2
  overflow: auto;
3
3
 
4
4
  &::-webkit-scrollbar {
5
- width: 6px;
6
- height: 6px;
5
+ width: 3px;
6
+ height: 3px;
7
7
  }
8
8
 
9
9
  &::-webkit-scrollbar-thumb {
@@ -0,0 +1,6 @@
1
+ @import "./variables.less"; // 变量
2
+ @import "./animate.less"; // 动画样式
3
+ @import "./box.less";
4
+ @import "./text.less";
5
+ @import "./flex.less";
6
+ @import "./base.less";
@@ -5,9 +5,7 @@
5
5
  font-weight: 600;
6
6
  color: @textColor;
7
7
  }
8
- .dsh-subtitle {
9
8
 
10
- }
11
9
  .dsh-tip {
12
10
  width: 100%;
13
11
  padding: 20px 10px;
@@ -16,6 +14,7 @@
16
14
  font-weight: 500;
17
15
  color: @textColor;
18
16
  }
17
+
19
18
  .dsh-subtip {
20
19
  width: 100%;
21
20
  text-align: center;
@@ -24,6 +23,7 @@
24
23
  color: @placeholderColor;
25
24
  // background-color: #f3f3f3;
26
25
  }
26
+
27
27
  // 出现三个点
28
28
  .dsh-ellipsis {
29
29
  display: block;
@@ -32,7 +32,7 @@
32
32
  white-space: nowrap;
33
33
  text-overflow: ellipsis;
34
34
  }
35
- .dsh-ellipsis2{
35
+ .dsh-ellipsis2 {
36
36
  overflow: hidden;
37
37
  text-overflow: -o-ellipsis-lastline;
38
38
  text-overflow: ellipsis;
@@ -81,5 +81,3 @@
81
81
  // 老版本待优化
82
82
  @resourceColor : #3D84EE,#F4A135, #32B5A5, #A3CF26, #C36625, #793CB7, #E94829,
83
83
  #E8BB1F, #52A829, #37B653, #1DD9E6, #1457BC, #4B5CC4, #7471F7, #C434DB, #252F36;
84
-
85
- @import "./common/index.less"; // 共用样式
@@ -1,7 +1,11 @@
1
- @import "./variables.less"; // iview重置样式
2
- @import "./plugin/index.less"; // 插件定制化样式
3
- @import "./reset.less"; // 自定义重置样式
4
- @import "./common/index.less"; // 共用样式
5
- @import "./animate.less"; // 动画样式
6
- @import "./components/index.less"; // 组件样式
7
- @import "./iconfont/iconfont.css";
1
+ @import "~vue-easytable/packages/theme-default/index.less"; // 引入官方提供的less样式入口文件
2
+ @import "~view-design/src/styles/index.less"; // 第三方组件库样式
3
+ @import "./reset-easytable.less"; // 重置easytable样式
4
+ @import "./reset-iview.less"; // 重置iview样式
5
+ @import "./reset.less"; // 重置样式
6
+
7
+ // @import "./global/global.less"; // 全局公共css
8
+ @import "./iconfont/iconfont.css"; // 字体图标样式
9
+ @import "./control.less"; // 控件共用样式,不需混入方式使用,所以不用放global
10
+
11
+ @import "./components/index.less"; // 组件样式
@@ -1,4 +1,3 @@
1
- @import '~vue-easytable/packages/theme-default/index.less'; // 引入官方提供的 less 样式入口文件
2
1
  // 可替换列表 https://github.com/Happy-Coding-Clans/vue-easytable/blob/master/packages/theme-default/var.less
3
2
  @ve-primary-color : @themeColor;
4
3
  @ve-default-text-color : @textColor;
@@ -1,7 +1,4 @@
1
- @import '~view-design/src/styles/index.less';
2
-
3
1
  // 可替换样式 https://github.com/view-design/ViewUI/blob/master/src/styles/custom.less
4
- // 直接引入变量custom_web报错,其他项目不报错,
5
2
  @primary-color : #3DB8C5; // @themeColor;
6
3
  @text-color : rgba(0, 0, 0, 0.9);
7
4
  @border-radius-base : 4px;
@@ -14,7 +14,6 @@ html {
14
14
  sans-serif; */
15
15
  font-family: PingFang SC, Microsoft YaHei, 微软雅黑;
16
16
  font-size: 14px;
17
- // color: @textColor;
18
17
  }
19
18
 
20
19
  ul,
@@ -1,16 +0,0 @@
1
- // 加载样式
2
- .dsh-loading {
3
- animation: animate-spin 1s linear infinite;
4
- }
5
-
6
- @keyframes animate-spin {
7
- from {
8
- transform: rotate(0deg);
9
- }
10
- 50% {
11
- transform: rotate(180deg);
12
- }
13
- to {
14
- transform: rotate(360deg);
15
- }
16
- }
@@ -1,5 +0,0 @@
1
- @import "./common.less";
2
- @import "./box.less";
3
- @import "./flex.less";
4
- @import "./text.less";
5
- @import "./control.less";
@@ -1,34 +0,0 @@
1
- .BriControlInput {
2
- height: 32px;
3
- padding: 4px 0 4px 7px;
4
- line-height: 24px;
5
- .dsh-flex-row-between-center();
6
-
7
- .text {
8
- .dsh-ellipsis();
9
- }
10
-
11
- .overflow {
12
- overflow: auto;
13
- .bri-scrollbar3();
14
- }
15
-
16
- .placeholder {
17
- flex: 1;
18
- min-width: 0px;
19
- overflow: hidden;
20
- }
21
-
22
- .ivu-icon {
23
- padding: 5px;
24
- color: @placeholder-disabled-color;
25
- }
26
- .icon {
27
- &-default {
28
-
29
- }
30
- &-close {
31
-
32
- }
33
- }
34
- }
@@ -1,2 +0,0 @@
1
- @import "./iview.less"; // iview重置样式
2
- @import "./easytable.less"; // iview重置样式
File without changes
File without changes