bri-components 1.2.11 → 1.2.13

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/bri-components.min.js +10 -10
  2. package/package.json +3 -3
  3. package/src/components/controls/BriControlInput.vue +11 -4
  4. package/src/components/controls/base/BriUpload/BriUpload.vue +19 -29
  5. package/src/components/controls/base/BriUpload/uploadList.vue +50 -45
  6. package/src/components/controls/base/DshCascader/DshCascader.vue +5 -7
  7. package/src/components/controls/base/DshCheckbox.vue +1 -2
  8. package/src/components/controls/base/DshCoordinates.vue +7 -15
  9. package/src/components/controls/controlMixin.js +5 -2
  10. package/src/components/controls/senior/BriLabels.vue +0 -1
  11. package/src/components/controls/senior/selectUsers/selectUsers.vue +18 -17
  12. package/src/components/list/BriFlatTable.vue +11 -3
  13. package/src/components/list/DshCascaderTable.vue +1 -0
  14. package/src/components/list/DshPage.vue +12 -14
  15. package/src/components/other/BriLoading.vue +2 -2
  16. package/src/components/small/BriDrawer.vue +1 -0
  17. package/src/components/small/DshTags.vue +21 -2
  18. package/src/styles/common/control.less +12 -24
  19. package/src/styles/components/controls/BriControlInput.less +4 -0
  20. package/src/styles/components/controls/base/BriUpload/BriUpload.less +2 -2
  21. package/src/styles/components/controls/base/DshInput.less +1 -1
  22. package/src/styles/components/controls/base/DshNumber.less +9 -14
  23. package/src/styles/components/controls/base/DshSelect.less +35 -24
  24. package/src/styles/components/list/BriFlatTable.less +22 -6
  25. package/src/styles/components/list/DshCascaderTable.less +22 -25
  26. package/src/styles/components/small/DshTags.less +1 -0
  27. package/src/styles/components/unit/DshUnit.less +3 -3
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="value"
4
- class="BriLoading"
5
4
  :class="{
5
+ BriLoading: true,
6
6
  'BriLoading-fix': fix,
7
7
  'BriLoading-center': center
8
8
  }"
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
  </template>
25
25
 
26
- <template v-else-if="value==2">
26
+ <template v-else-if="value === 2">
27
27
  <bri-svg :src="imgSrc" />
28
28
  <div
29
29
  v-if="noText"
@@ -106,6 +106,7 @@
106
106
  closable: true,
107
107
  transfer: true,
108
108
  footer: true,
109
+ maskClosable: false,
109
110
  ...this.propsObj
110
111
  };
111
112
  }
@@ -24,7 +24,11 @@
24
24
  @on-change="changeChecked"
25
25
  >
26
26
  <slot :tagItem="tagItem">
27
- {{ $dataType(tagItem) === "object" ? tagItem.realname || tagItem.full_name || tagItem.name : tagItem }}
27
+ <Icon
28
+ v-if="getItemIcon(tagItem)"
29
+ :type="getItemIcon(tagItem)"
30
+ />
31
+ {{ getItemName(tagItem) }}
28
32
  </slot>
29
33
  </Tag>
30
34
 
@@ -67,7 +71,11 @@
67
71
  @on-change="changeChecked"
68
72
  >
69
73
  <slot :tagItem="tagItem">
70
- {{ $dataType(tagItem) === "object" ? tagItem.realname || tagItem.full_name || tagItem.name : tagItem }}
74
+ <Icon
75
+ v-if="getItemIcon(tagItem)"
76
+ :type="getItemIcon(tagItem)"
77
+ />
78
+ {{ getItemName(tagItem) }}
71
79
  </slot>
72
80
  </Tag>
73
81
  </div>
@@ -97,6 +105,10 @@
97
105
  default: false
98
106
  }
99
107
  },
108
+ model: {
109
+ prop: "list",
110
+ event: "change"
111
+ },
100
112
  data () {
101
113
  return {
102
114
  maxTagCount: undefined,
@@ -106,6 +118,12 @@
106
118
  },
107
119
  getItemClosable (item) {
108
120
  return this.getItemDisabled(item) === false && this.propsObj.closable;
121
+ },
122
+ getItemIcon (item) {
123
+ return (this.$dataType(item) === "object" ? item.icon || item._icon : undefined) || this.propsObj.icon;
124
+ },
125
+ getItemName (item) {
126
+ return this.$dataType(item) === "object" ? item.realname || item.full_name || item.name || item._name || item._id : item;
109
127
  }
110
128
  };
111
129
  },
@@ -137,6 +155,7 @@
137
155
  deleteTag (event, item, index) {
138
156
  this.list.splice(index, 1);
139
157
  this.callEliipsis();
158
+ this.$emit("change", [...this.list]);
140
159
  this.$emit("delete", item, index);
141
160
  },
142
161
  // 改变标签状态
@@ -1,13 +1,3 @@
1
- // 单元格标签式展示 -非全部类型通用
2
- .bri-unit-show () {
3
- background-color: @theme-focus;
4
- color: @themeColor;
5
- border-radius: @borderRadius;
6
- padding: 2px 8px;
7
- line-height: 24px;
8
- display: inline;
9
- }
10
-
11
1
  // 表单控件共用样式
12
2
  .bri-control-edit {
13
3
  border: 1px solid @borderColor;
@@ -15,11 +5,6 @@
15
5
  background: @inputBg;
16
6
  cursor: pointer;
17
7
  color: @textColor;
18
-
19
- .ivu-icon {
20
- padding: 5px;
21
- color: @placeholderColor;
22
- }
23
8
  }
24
9
  .bri-control-disabled {
25
10
  border: 1px solid @border-disabled;
@@ -27,11 +12,6 @@
27
12
  background: @inputBg-disabled;
28
13
  cursor: not-allowed;
29
14
  color: @textColor;
30
-
31
- .ivu-icon {
32
- padding: 5px;
33
- color: @placeholder-disabled-color;
34
- }
35
15
 
36
16
  &.bri-control-nodata {
37
17
  color: @placeholder-disabled-color;
@@ -51,6 +31,7 @@
51
31
  .bri-control-show {
52
32
  border: none;
53
33
  background-color: transparent;
34
+ color: @textColor;
54
35
 
55
36
  .text {
56
37
  .dsh-ellipsis();
@@ -59,6 +40,7 @@
59
40
  .bri-control-unit {
60
41
  border: none;
61
42
  background-color: transparent;
43
+ color: @textColor;
62
44
 
63
45
  .text {
64
46
  .dsh-ellipsis();
@@ -69,7 +51,13 @@
69
51
  .bri-control-nodata {
70
52
  color: @placeholderColor;
71
53
  }
72
- // 编辑disabled模式下无数据
73
- .bri-control-disabled-placeholder {
74
- color: @textColor-disabled;
75
- }
54
+
55
+ // 单元格标签式展示 -非全部类型通用
56
+ .bri-unit-show () {
57
+ display: inline;
58
+ padding: 2px 8px;
59
+ border-radius: @borderRadius;
60
+ background-color: @theme-focus;
61
+ line-height: 24px;
62
+ color: @themeColor;
63
+ }
@@ -19,6 +19,10 @@
19
19
  overflow: hidden;
20
20
  }
21
21
 
22
+ .ivu-icon {
23
+ padding: 5px;
24
+ color: @placeholder-disabled-color;
25
+ }
22
26
  .icon {
23
27
  &-default {
24
28
 
@@ -147,12 +147,12 @@
147
147
  }
148
148
 
149
149
  &-nodata {
150
- .bri-control-disabled-placeholder();
150
+ color: @placeholder-disabled-color;
151
151
  text-indent: 7px;
152
152
  text-align: left;
153
153
  }
154
154
  &-inline-nodata {
155
- .bri-control-disabled-placeholder();
155
+ color: @placeholder-disabled-color;
156
156
  }
157
157
  }
158
158
  }
@@ -22,7 +22,7 @@
22
22
  border-color: @border-disabled;
23
23
  }
24
24
  &::-webkit-input-placeholder {
25
- .bri-control-disabled-placeholder();
25
+ color: @placeholder-disabled-color;
26
26
  }
27
27
  }
28
28
 
@@ -14,32 +14,26 @@
14
14
 
15
15
  .ivu-input-number {
16
16
  width: 100%;
17
+
18
+ // .bri-control-edit();
19
+ .ivu-input-number-input {
20
+ color: @textColor;
21
+ }
17
22
 
18
23
  &-disabled {
19
- .bri-control-disabled();
20
-
21
- &:hover {
22
- border-color: @border-disabled;
23
- }
24
-
25
- .DshNumber-suffix {
26
- color: @textColor-disabled;
27
- background-color: transparent;
28
- border-color: transparent;
29
- }
24
+ // .bri-control-disabled();
30
25
  .ivu-input-number-input {
31
26
  opacity: 1;
32
27
  background: @inputBg-disabled;
33
28
  color: @textColor;
34
29
  &::-webkit-input-placeholder {
35
- .bri-control-disabled-placeholder();
30
+ color: @placeholder-disabled-color;
36
31
  }
37
32
  }
38
33
  }
39
34
 
40
35
  &-handler {
41
36
  &-wrap {
42
- // opacity: 1;
43
37
  border-left: none;
44
38
  }
45
39
  &-down {
@@ -53,7 +47,8 @@
53
47
  color: @textColor;
54
48
  }
55
49
  }
56
- &-down-inner, &-up-inner {
50
+ &-down-inner,
51
+ &-up-inner {
57
52
  color: @contentColor;
58
53
  }
59
54
  }
@@ -47,22 +47,24 @@
47
47
  }
48
48
 
49
49
  each(@resourceColor, {
50
- .color-@{index} {
51
- .ivu-radio {
52
- .ivu-radio-inner {
53
- border-color: @value;
50
+ .color-@{index} {
51
+ .ivu-radio {
52
+ .ivu-radio-inner {
53
+ border-color: @value;
54
+ }
54
55
  }
55
- }
56
56
 
57
- .ivu-radio-checked {
58
- .ivu-radio-inner {
59
- &::after {
60
- background-color: @value;
57
+ .ivu-radio-checked {
58
+ .ivu-radio-inner {
59
+ &::after {
60
+ background-color: @value;
61
+ }
61
62
  }
62
63
  }
63
64
  }
64
65
  }
65
- });
66
+
67
+ );
66
68
  }
67
69
 
68
70
  &-scroll {
@@ -144,6 +146,26 @@
144
146
  }
145
147
  }
146
148
 
149
+ .ivu-select {
150
+ .ivu-select-selection {
151
+ // .bri-control-edit();
152
+ }
153
+ }
154
+
155
+ .ivu-select-disabled {
156
+ .ivu-select-selection {
157
+ .bri-control-disabled();
158
+
159
+ &:hover {
160
+ border-color: @border-disabled;
161
+ }
162
+ }
163
+ .ivu-select-input[disabled] {
164
+ color: @textColor;
165
+ -webkit-text-fill-color: @textColor;
166
+ }
167
+ }
168
+
147
169
  .ivu-select-item {
148
170
  margin: 4px 8px;
149
171
  border-radius: @borderRadius;
@@ -153,7 +175,7 @@
153
175
  }
154
176
 
155
177
  &-selected {
156
- background-color: @theme-focus !important;
178
+ background-color: @theme-focus;
157
179
  color: @themeColor;
158
180
  }
159
181
 
@@ -162,20 +184,9 @@
162
184
  .bri-control-disabled();
163
185
  }
164
186
  }
165
-
187
+
166
188
  &-input[disabled] {
167
189
  color: @textColor-disabled;
168
190
  -webkit-text-fill-color: @textColor-disabled;
169
191
  }
170
- }
171
-
172
- .ivu-select-disabled .ivu-select-selection {
173
- .bri-control-disabled();
174
- &:hover {
175
- border-color: @border-disabled;
176
- }
177
- }
178
- .ivu-select-input[disabled] {
179
- color: @textColor;
180
- -webkit-text-fill-color: @textColor-disabled;
181
- }
192
+ }
@@ -1,5 +1,6 @@
1
1
  .BriFlatTable {
2
- &-main {
2
+ .BriFlatTable-main {
3
+ width: 100%;
3
4
  height: auto;
4
5
 
5
6
  .table {
@@ -37,13 +38,13 @@
37
38
  }
38
39
 
39
40
  &-tip {
40
- padding: 2px 5px 0px 10px;
41
+ padding: 2px 5px 0px 20px;
41
42
  font-size: 12px;
42
43
  line-height: 1;
43
44
  color: #ed4014;
44
45
  position: absolute;
45
- top: calc(100% - 18px);
46
- left: 20px;
46
+ top: calc(100% -15px);
47
+ left: 0px;
47
48
  }
48
49
 
49
50
  &-add {
@@ -54,11 +55,26 @@
54
55
  display: none;
55
56
  }
56
57
  }
58
+
59
+ &-nodata {
60
+ width: 100%;
61
+ height: 40px;
62
+ text-align: center;
63
+ }
64
+ }
65
+
66
+ tbody {
67
+ // display: block;
68
+ // overflow-y: scroll;
69
+ }
70
+
71
+ thead {
72
+ // display: block;
57
73
  }
58
74
  }
59
75
  }
60
-
76
+
61
77
  &-create {
62
78
  margin-top: 8px;
63
79
  }
64
- }
80
+ }
@@ -48,13 +48,24 @@
48
48
  border-collapse: collapse;
49
49
  border-color: #E5E5E5;
50
50
  line-height: 16px;
51
- color: #666;
52
51
 
53
52
  &-col {
54
53
  height: 40px;
55
54
  }
56
55
 
57
- &-row {}
56
+ &-row {
57
+ .textarea {
58
+ .ivu-input {
59
+ border: none;
60
+ box-shadow: none;
61
+ background-color: transparent;
62
+ min-height: 16px;
63
+ padding: 0px;
64
+ line-height: 16px;
65
+ font-size: 12px;
66
+ }
67
+ }
68
+ }
58
69
 
59
70
  &-nodata {
60
71
  height: 30px;
@@ -75,6 +86,15 @@
75
86
  bottom: 0px;
76
87
  z-index: 2;
77
88
  text-align: left;
89
+
90
+ &-list {
91
+ min-width: 120px;
92
+ margin: 0px;
93
+
94
+ li {
95
+ padding-left: 15px !important;
96
+ }
97
+ }
78
98
  }
79
99
 
80
100
  &:hover {
@@ -86,28 +106,5 @@
86
106
  }
87
107
  }
88
108
  }
89
-
90
109
  }
91
110
 
92
- .DshCascaderTable {
93
- .textarea {
94
- .ivu-input {
95
- border: none;
96
- box-shadow: none;
97
- background-color: transparent;
98
- min-height: 16px;
99
- padding: 0px;
100
- line-height: 16px;
101
- font-size: 12px;
102
- }
103
- }
104
- }
105
-
106
- .td-tree-dropdown-list {
107
- min-width: 120px;
108
- margin: 0px;
109
-
110
- li {
111
- padding-left: 15px !important;
112
- }
113
- }
@@ -3,6 +3,7 @@
3
3
  overflow: hidden;
4
4
  width: 100%;
5
5
  }
6
+
6
7
  &-poptip {
7
8
  &-tag {
8
9
  margin: 2px 0;
@@ -1,5 +1,5 @@
1
1
  .DshUnit {
2
- .ivu-input {
3
- font-size: 12px;
4
- }
2
+ // .ivu-input {
3
+ // font-size: 12px;
4
+ // }
5
5
  }