bri-components 1.2.2 → 1.2.3

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 (27) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/2.bri-components.min.js +1 -1
  3. package/lib/5.bri-components.min.js +1 -1
  4. package/lib/bri-components.min.js +5 -5
  5. package/package.json +1 -1
  6. package/src/abolish/DshCascaders.vue +3 -0
  7. package/src/abolish/DshTexts.vue +3 -0
  8. package/src/components/controls/base/BriUpload/BriUploadImage.vue +1 -1
  9. package/src/components/controls/base/BriUpload/uploadMixin.js +4 -3
  10. package/src/components/controls/base/DshCascader/DshCascader.vue +22 -11
  11. package/src/components/controls/base/DshCheckbox.vue +0 -3
  12. package/src/components/controls/base/DshCoordinates.vue +2 -2
  13. package/src/components/controls/base/DshDaterange.vue +2 -2
  14. package/src/components/controls/controlMixin.js +9 -0
  15. package/src/components/controls/senior/BriLabels.vue +97 -93
  16. package/src/components/controls/senior/selectDepartments.vue +16 -11
  17. package/src/components/controls/senior/selectUsers/selectUsers.vue +18 -15
  18. package/src/components/small/BriDrawer.vue +1 -1
  19. package/src/components/small/DshDropdown.vue +1 -0
  20. package/src/components/small/DshModal.vue +1 -1
  21. package/src/components/small/DshTags.vue +29 -25
  22. package/src/styles/common/control.less +18 -16
  23. package/src/styles/components/controls/base/DshCascader/DshCascader.less +4 -7
  24. package/src/styles/components/controls/base/DshCheckbox.less +16 -25
  25. package/src/styles/components/small/DshDropdown.less +6 -5
  26. package/src/styles/components/small/DshTags.less +1 -1
  27. package/src/styles/variables.less +2 -1
@@ -17,6 +17,7 @@
17
17
  @mouseleave="isHover = false"
18
18
  @click="clickInput"
19
19
  >
20
+ <!-- 有值 -->
20
21
  <template v-if="!$isEmptyData(curValList)">
21
22
  <dsh-tags
22
23
  class="text"
@@ -26,23 +27,26 @@
26
27
  }"
27
28
  @delete="clickDeleteItem"
28
29
  ></dsh-tags>
30
+ </template>
31
+ <!-- 无值 -->
32
+ <template v-else>
33
+ {{ emptyShowVal }}
34
+ </template>
29
35
 
36
+ <!-- 图标 -->
37
+ <template>
30
38
  <Icon
31
- v-if="selfPropsObj._clearable && isHover"
39
+ v-if="!$isEmptyData(curValList) && selfPropsObj._clearable && isHover"
32
40
  class="icon-close"
33
- type="md-close"
41
+ type="ios-close-circle"
34
42
  @click.stop="clickClear"
35
43
  />
36
44
  <Icon
37
45
  v-else
38
46
  class="icon-default"
39
- :type="`${multiple ? 'ios-people' : 'ios-person'}`"
47
+ :type="inputIcon"
40
48
  />
41
49
  </template>
42
-
43
- <template v-else>
44
- {{ emptyShowVal }}
45
- </template>
46
50
  </div>
47
51
 
48
52
  <!-- 查看 -->
@@ -57,9 +61,6 @@
57
61
  v-if="!$isEmptyData(curValList)"
58
62
  class="text"
59
63
  :list="curValList"
60
- :propsObj="{
61
- closable: false
62
- }"
63
64
  ></dsh-tags>
64
65
 
65
66
  <template v-else>
@@ -121,9 +122,7 @@
121
122
  :indeterminate="false"
122
123
  :value="curCheckAll"
123
124
  @click.prevent.native="clickCheckAll"
124
- >
125
- 全选
126
- </Checkbox>
125
+ >全选</Checkbox>
127
126
  </div>
128
127
 
129
128
  <!-- 下 列表-->
@@ -182,7 +181,7 @@
182
181
  </span>
183
182
  <Icon
184
183
  class="list-item-delete"
185
- type="md-close"
184
+ type="ios-close-circle"
186
185
  @click="clickDeleteUserItem(userItem, userIndex, newValList)"
187
186
  />
188
187
  </span>
@@ -293,6 +292,10 @@
293
292
  highSearch () {
294
293
  return this.selfPropsObj._highSearch;
295
294
  },
295
+ inputIcon () {
296
+ return this.multiple ? "ios-people" : "ios-person";
297
+ },
298
+
296
299
  // 审签单定制需求使用字段
297
300
  transmit_type () {
298
301
  return this.selfPropsObj.transmit_type;
@@ -305,7 +308,7 @@
305
308
  },
306
309
 
307
310
  curCheckAll () {
308
- return this.userList.every(userItem => this.newValList.find(newItem => newItem._key == userItem._key));
311
+ return this.userList.every(userItem => this.newValList.find(newItem => newItem._key === userItem._key));
309
312
  },
310
313
  showVal () {
311
314
  return this.$isEmptyData(this.curValList)
@@ -36,7 +36,7 @@
36
36
  v-if="selfPropsObj.closable"
37
37
  slot="close"
38
38
  class="BriDrawer-close"
39
- type="md-close"
39
+ type="ios-close-circle"
40
40
  size="20"
41
41
  @click.stop="clickClose"
42
42
  />
@@ -4,6 +4,7 @@
4
4
  :trigger="trigger"
5
5
  :placement="placement"
6
6
  :transfer="transfer"
7
+ transfer-class-name="DshDropdown"
7
8
  >
8
9
  <slot>
9
10
  <Icon
@@ -41,7 +41,7 @@
41
41
  <Icon
42
42
  v-if="selfPropsObj.showSlotClose !== false"
43
43
  class="DshModal-close"
44
- type="md-close"
44
+ type="ios-close-circle"
45
45
  size="20"
46
46
  @click.native.stop="visibleChange(false)"
47
47
  />
@@ -17,7 +17,7 @@
17
17
  :closable="getItemClosable(tagItem)"
18
18
  :checkable="propsObj.checkable"
19
19
  :checked="propsObj.checked"
20
- :color="propsObj.color || tagItem.color || 'primary'"
20
+ :color="propsObj.color || tagItem.color || 'default'"
21
21
  :fade="propsObj.fade || false"
22
22
  :size="propsObj.size || 'medium'"
23
23
  @on-close="deleteTag($event, tagItem, tagIndex)"
@@ -63,7 +63,7 @@
63
63
  :fade="propsObj.fade || false"
64
64
  :size="propsObj.size || 'medium'"
65
65
  class="DshTags-poptip-tag"
66
- @on-close="deleteTag($event, tagItem, tagIndex)"
66
+ @on-close="deleteTag($event, tagItem, tagIndex + computedList.length)"
67
67
  @on-change="changeChecked"
68
68
  >
69
69
  <slot :tagItem="tagItem">
@@ -105,7 +105,8 @@
105
105
  return this.propsObj.disabled || item._disabled || item.disabled;
106
106
  },
107
107
  getItemClosable (item) {
108
- return this.getItemDisabled(item) ? false : (this.propsObj.closable !== false);
108
+ return !this.getItemDisabled(item) &&
109
+ (this.propsObj.closable == undefined ? true : this.propsObj.closable);
109
110
  }
110
111
  };
111
112
  },
@@ -136,7 +137,7 @@
136
137
  // 删除标签
137
138
  deleteTag (event, item, index) {
138
139
  this.list.splice(index, 1);
139
- this.getAutoEllipsis();
140
+ this.callEliipsis();
140
141
  this.$emit("delete", item, index);
141
142
  },
142
143
  // 改变标签状态
@@ -144,27 +145,6 @@
144
145
 
145
146
  },
146
147
 
147
- getAutoEllipsis () {
148
- let parWidth = this.$refs.DshTags.clientWidth;
149
- let tags = this.$refs.tagItem;
150
-
151
- for (let idx in tags) {
152
- let el = tags[idx]["$el"];
153
- let showEllipsis = el.clientWidth + el.offsetLeft > parWidth;
154
-
155
- if (showEllipsis) {
156
- // 判断加上... 是否被隐藏
157
- if (el.clientWidth + el.offsetLeft + 40 < parWidth) {
158
- this.maxTagCount = idx;
159
- } else {
160
- this.maxTagCount = idx - 1;
161
- }
162
- break;
163
- } else {
164
- this.maxTagCount = undefined;
165
- }
166
- }
167
- },
168
148
  callEliipsis () {
169
149
  if (this.autoEllipsis) {
170
150
  this.maxTagCount = undefined;
@@ -172,10 +152,34 @@
172
152
  this.getAutoEllipsis();
173
153
  });
174
154
  }
155
+ },
156
+ getAutoEllipsis () {
157
+ if (this.autoEllipsis) {
158
+ let parWidth = this.$refs.DshTags.clientWidth;
159
+ let tags = this.$refs.tagItem;
160
+
161
+ for (let idx in tags) {
162
+ let el = tags[idx]["$el"];
163
+ let showEllipsis = el.clientWidth + el.offsetLeft > parWidth;
164
+
165
+ if (showEllipsis) {
166
+ // 判断加上... 是否被隐藏
167
+ if (el.clientWidth + el.offsetLeft + 40 < parWidth) {
168
+ this.maxTagCount = idx;
169
+ } else {
170
+ this.maxTagCount = idx - 1;
171
+ }
172
+ break;
173
+ } else {
174
+ this.maxTagCount = undefined;
175
+ }
176
+ }
177
+ }
175
178
  }
176
179
  },
177
180
  watch: {
178
181
  list: function () {
182
+ console.log("ss");
179
183
  this.callEliipsis();
180
184
  }
181
185
  },
@@ -16,8 +16,8 @@
16
16
  cursor: pointer;
17
17
  color: @textColor;
18
18
 
19
- &.bri-control-nodata {
20
- .bri-control-nodata();
19
+ .ivu-icon {
20
+ color: @placeholderColor;
21
21
  }
22
22
  }
23
23
  .bri-control-disabled {
@@ -27,8 +27,12 @@
27
27
  cursor: not-allowed;
28
28
  color: @textColor;
29
29
 
30
+ .ivu-icon {
31
+ color: @placeholder-disabled-color;
32
+ }
33
+
30
34
  &.bri-control-nodata {
31
- .bri-control-disabled-placeholder();
35
+ color: @placeholder-disabled-color;
32
36
  }
33
37
  }
34
38
  // .bri-control-readonly {
@@ -37,24 +41,28 @@
37
41
  // background: @inputBg-readonly;
38
42
  // cursor: not-allowed;
39
43
  // color: @textColor-readonly;
44
+
45
+ // .ivu-icon {
46
+ // color: @textColor-readonly;
47
+ // }
40
48
  // }
41
49
  .bri-control-show {
42
50
  border: none;
43
51
  background-color: transparent;
44
52
 
45
- &.bri-control-nodata {
46
- .bri-control-nodata();
53
+ .ivu-icon {
54
+ color: @placeholderColor;
47
55
  }
48
56
  }
49
57
  .bri-control-unit {
50
58
  border: none;
51
59
  background-color: transparent;
52
60
 
53
- // unit 模式下不用特殊处理颜色
54
- &.bri-control-nodata {
55
- .bri-control-nodata();
61
+ .ivu-icon {
62
+ color: @placeholderColor;
56
63
  }
57
64
  }
65
+
58
66
  // 无数据
59
67
  .bri-control-nodata {
60
68
  color: @placeholderColor;
@@ -66,10 +74,10 @@
66
74
 
67
75
  // 展示为tag标签公共样式
68
76
  #bri-control-wrap () {
69
- .dsh-flex-row-between-center();
70
77
  height: 32px;
71
- padding: 4px 0 4px 4px;
78
+ padding: 4px 0 4px 7px;
72
79
  line-height: 24px;
80
+ .dsh-flex-row-between-center();
73
81
 
74
82
  .text {
75
83
  .dsh-ellipsis();
@@ -83,13 +91,11 @@
83
91
  .icon {
84
92
  &-default {
85
93
  padding: 5px;
86
- color: @placeholderColor;
87
94
  }
88
95
 
89
96
  &-close {
90
97
  padding: 5px;
91
98
  display: none;
92
- color: @placeholderColor;
93
99
  }
94
100
  }
95
101
 
@@ -98,8 +104,4 @@
98
104
  display: block;
99
105
  }
100
106
  }
101
-
102
- &.bri-control-nodata {
103
- padding-left: 7px;
104
- }
105
107
  }
@@ -35,8 +35,11 @@
35
35
 
36
36
  // 多选类型且独自一行时
37
37
  &-row {
38
- &-edit,
38
+ &-edit {
39
+ // height: 68px;
40
+ }
39
41
  &-show {
42
+ height: auto;
40
43
  .text,
41
44
  .overflow {
42
45
  width: 100%;
@@ -46,12 +49,6 @@
46
49
  .bri-scrollbar3();
47
50
  }
48
51
  }
49
- &-edit {
50
- height: 68px;
51
- }
52
- &-show {
53
- height: auto;
54
- }
55
52
  }
56
53
  }
57
54
 
@@ -14,9 +14,9 @@
14
14
  margin-bottom: 5px;
15
15
  margin-right: 16px;
16
16
  height: 32px;
17
- line-height: 32px;
18
- border-radius: 4px;
19
17
  border: none;
18
+ border-radius: 4px;
19
+ line-height: 32px;
20
20
  color: #FFF;
21
21
  }
22
22
 
@@ -86,38 +86,29 @@
86
86
  .ivu-select-multiple {
87
87
  .ivu-select-selection {
88
88
  height: 32px;
89
-
89
+ .dsh-flex-row-between-center();
90
+
90
91
  & > div {
91
- overflow-x: auto;
92
- overflow-y: hidden;
92
+ width: 100%;
93
+ word-break: keep-all;
93
94
  white-space: nowrap;
94
-
95
+
96
+ overflow: auto;
97
+ .bri-scrollbar3();
98
+
95
99
  .ivu-tag {
96
- margin: 2px 4px 4px 0;
97
- }
98
-
99
- &::-webkit-scrollbar {
100
- height: 8px;
101
- }
102
-
103
- &:-webkit-scrollbar-thumb {
104
- border-radius: 3px;
105
- background: rgba(51, 51, 51, .1);
106
- background-clip: border-box;
100
+ margin: 2px 4px 0px 0px;
101
+ background-color: @borderColor;
107
102
  }
108
103
  }
109
104
  }
110
105
 
111
- &.ivu-select-default {
106
+ &.ivu-select-disabled {
112
107
  .ivu-select-selection {
113
- height: 32px;
114
- overflow: hidden;
115
-
116
108
  & > div {
117
- width: 100%;
118
- height: 100%;
119
- .dsh-flex-row-start-center();
120
- flex-wrap: wrap;
109
+ .ivu-tag {
110
+ background-color: @border-disabled;
111
+ }
121
112
  }
122
113
  }
123
114
  }
@@ -52,10 +52,11 @@
52
52
  }
53
53
  }
54
54
  }
55
+ &.ivu-select-dropdown {
56
+ border: 0.5px solid #e5e5e5;
57
+ box-shadow: 0 3px 14px 2px rgba(0,0,0,0.05), 0 8px 10px 1px rgba(0,0,0,0.06), 0 5px 5px -3px rgba(0,0,0,0.1);
58
+ max-height: 500px;
59
+ }
55
60
  }
56
61
 
57
- .ivu-select-dropdown {
58
- border: 0.5px solid #e5e5e5;
59
- box-shadow: 0 3px 14px 2px rgba(0,0,0,0.05), 0 8px 10px 1px rgba(0,0,0,0.06), 0 5px 5px -3px rgba(0,0,0,0.1);
60
- max-height: 500px;
61
- }
62
+
@@ -22,8 +22,8 @@
22
22
  }
23
23
  &-size-medium {
24
24
  height: 24px;
25
- line-height: 26px;
26
25
  padding: 0 8px;
26
+ line-height: 26px;
27
27
  }
28
28
  &[disabled] {
29
29
  background-color: @border-disabled;
@@ -40,9 +40,10 @@
40
40
  @textColor : rgba(0, 0, 0, 0.9);
41
41
  @contentColor : rgba(0, 0, 0, 0.6); // 正文颜色
42
42
  @titleColor : @textColor; // title文字颜色
43
- @placeholderColor : rgba(0, 0, 0, 0.4);
44
43
  @textColor-readonly : @textColor;
45
44
  @textColor-disabled : rgba(0, 0, 0, 0.26);
45
+ @placeholderColor : rgba(0, 0, 0, 0.4);
46
+ @placeholder-disabled-color : rgba(0, 0, 0, 0.26);
46
47
  @textWhColor : rgba(255, 255, 255, 0.9);
47
48
  @fontWh2 : rgba(255, 255, 255, 0.55);
48
49
  @fontWh3 : rgba(255, 255, 255, 0.35);