bri-components 1.2.12 → 1.2.14

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 (32) hide show
  1. package/lib/1.bri-components.min.js +1 -1
  2. package/lib/bri-components.min.js +10 -10
  3. package/package.json +2 -2
  4. package/src/components/controls/BriControlInput.vue +9 -2
  5. package/src/components/controls/base/BriUpload/BriUpload.vue +19 -29
  6. package/src/components/controls/base/BriUpload/uploadList.vue +50 -45
  7. package/src/components/controls/base/BriUpload/uploadMixin.js +16 -1
  8. package/src/components/controls/base/DshCascader/DshCascader.vue +6 -7
  9. package/src/components/controls/base/DshCheckbox.vue +1 -2
  10. package/src/components/controls/base/DshCoordinates.vue +7 -15
  11. package/src/components/controls/controlMixin.js +5 -2
  12. package/src/components/controls/senior/BriLabels.vue +0 -1
  13. package/src/components/controls/senior/cascaderTable.vue +10 -9
  14. package/src/components/controls/senior/selectUsers/selectUsers.vue +18 -17
  15. package/src/components/list/BriFlatTable.vue +11 -3
  16. package/src/components/list/DshCascaderTable.vue +1 -0
  17. package/src/components/list/DshPage.vue +12 -14
  18. package/src/components/other/BriLoading.vue +2 -2
  19. package/src/components/small/DshTags.vue +21 -2
  20. package/src/components/unit/DshFormItem.vue +3 -1
  21. package/src/styles/common/control.less +12 -24
  22. package/src/styles/components/controls/BriControlInput.less +4 -0
  23. package/src/styles/components/controls/base/BriUpload/BriUpload.less +2 -2
  24. package/src/styles/components/controls/base/DshCascader/DshCascader.less +7 -12
  25. package/src/styles/components/controls/base/DshCheckbox.less +43 -48
  26. package/src/styles/components/controls/base/DshInput.less +1 -1
  27. package/src/styles/components/controls/base/DshNumber.less +9 -14
  28. package/src/styles/components/controls/base/DshSelect.less +81 -72
  29. package/src/styles/components/list/BriFlatTable.less +71 -0
  30. package/src/styles/components/list/DshCascaderTable.less +22 -25
  31. package/src/styles/components/small/DshTags.less +1 -0
  32. package/src/styles/components/unit/DshUnit.less +3 -3
@@ -80,6 +80,7 @@
80
80
  class="table-row"
81
81
  >
82
82
  <template v-for="col in rowColumnsArr[rowIndex]">
83
+ <!-- 树节点单元格、汇总单元格 -->
83
84
  <td
84
85
  v-if="['tree', 'summary'].includes(col.colType)"
85
86
  :key="col._key"
@@ -29,7 +29,7 @@
29
29
  mode: {
30
30
  type: String,
31
31
  default: "small",
32
- validator: function (value) {
32
+ validator (value) {
33
33
  return ["simple", "default", "small"].indexOf(value) !== -1;
34
34
  }
35
35
  },
@@ -49,34 +49,32 @@
49
49
  },
50
50
  computed: {
51
51
  obj () {
52
- let obj = {};
53
- if (this.mode === "default") {
54
- obj = {
52
+ const modeMap = {
53
+ default: {
55
54
  showTotal: true,
56
55
  showElevator: false,
57
56
  showSizer: true
58
- };
59
- } else if (this.mode === "small") {
60
- obj = {
57
+ },
58
+ small: {
61
59
  showTotal: true,
62
60
  showElevator: false,
63
61
  showSizer: true
64
- };
65
- } else if (this.mode === "simple") {
66
- obj = {
62
+ },
63
+ simple: {
67
64
  // // 简洁分页不能使用总数、电梯和切换数量
68
65
  // showTotal: true,
69
66
  // showElevator: false,
70
67
  // showSizer: false
71
- };
72
- }
68
+ }
69
+ };
70
+
73
71
  return {
74
72
  page: 1,
75
73
  pagesize: 10,
76
- pagesizeOpts: [10, 12, 15, 20, 30, 40, 50],
74
+ pagesizeOpts: [10, 15, 20, 30, 40, 50],
77
75
  transfer: false,
78
76
  placement: "bottom",
79
- ...obj,
77
+ ...(modeMap[this.mode] || {}),
80
78
  ...this.propsObj
81
79
  };
82
80
  },
@@ -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"
@@ -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
  // 改变标签状态
@@ -137,7 +137,9 @@
137
137
  formControlClass: String
138
138
  },
139
139
  data () {
140
- return {};
140
+ return {
141
+ showTipModal: false // tipsRender使用,不可删除
142
+ };
141
143
  },
142
144
  computed: {},
143
145
  created () {},
@@ -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
  }
@@ -2,19 +2,19 @@
2
2
  width: 100%;
3
3
 
4
4
  &-edit {
5
+
5
6
  // 多选
6
7
  &-multiple {
7
8
  width: 100%;
8
-
9
- &-edit {
10
9
 
11
- }
10
+ &-edit {}
12
11
  }
13
12
 
14
13
  // 单选 -新模式
15
14
  &-custom {
16
15
  width: 100%;
17
16
  }
17
+
18
18
  // 单选 -默认模式
19
19
  &-single {
20
20
  width: 100%;
@@ -23,22 +23,18 @@
23
23
 
24
24
  // 查看
25
25
  &-show {
26
- &-multiple {
27
-
28
- }
26
+ &-multiple {}
29
27
 
30
- &-single {
31
-
32
- }
28
+ &-single {}
33
29
  }
34
30
 
35
31
  // 多选类型且独自一行时
36
32
  &-row {
37
- &-edit {
33
+ &-edit {}
38
34
 
39
- }
40
35
  &-show {
41
36
  height: auto;
37
+
42
38
  .text,
43
39
  .overflow {
44
40
  width: 100%;
@@ -66,7 +62,6 @@
66
62
  .ivu-cascader-menu {
67
63
  max-height: 400px;
68
64
  height: auto;
69
- max-width: 300px;
70
65
  }
71
66
  }
72
67
  }
@@ -11,7 +11,6 @@
11
11
 
12
12
  &-color {
13
13
  .ivu-checkbox-border {
14
- margin-bottom: 5px;
15
14
  margin-right: 16px;
16
15
  height: 32px;
17
16
  border: none;
@@ -50,71 +49,67 @@
50
49
  }
51
50
  }
52
51
  });
53
- }
52
+ }
54
53
 
55
- &-disabled {
56
- .ivu-checkbox-disabled+span {
57
- color: #515a6e;
58
- }
54
+ &-disabled {
55
+ .ivu-checkbox-disabled+span {
56
+ color: #515a6e;
59
57
  }
58
+ }
60
59
 
61
- &-scroll {
62
- overflow-x: auto;
63
- overflow-y: hidden;
64
- white-space: nowrap;
60
+ &-scroll {
61
+ overflow-x: auto;
62
+ overflow-y: hidden;
63
+ white-space: nowrap;
65
64
 
66
- &::-webkit-scrollbar {
67
- height: 6px;
68
- }
65
+ &::-webkit-scrollbar {
66
+ height: 6px;
67
+ }
69
68
 
70
- &:-webkit-scrollbar-thumb {
71
- border-radius: 3px;
72
- background: rgba(51, 51, 51, .1);
73
- background-clip: border-box;
74
- }
69
+ &:-webkit-scrollbar-thumb {
70
+ border-radius: 3px;
71
+ background: rgba(51, 51, 51, .1);
72
+ background-clip: border-box;
75
73
  }
76
74
  }
75
+ }
77
76
 
78
- &-item {
79
-
80
- }
77
+ &-item {}
81
78
 
82
- &-show {
79
+ &-show {}
83
80
 
84
- }
81
+ .ivu-select-multiple {
82
+ .ivu-select-selection {
83
+ height: 32px;
84
+ .dsh-flex-row-between-center();
85
85
 
86
- .ivu-select-multiple {
87
- .ivu-select-selection {
88
- height: 32px;
89
- .dsh-flex-row-between-center();
90
-
91
- & > div {
92
- width: 100%;
93
- height: 100%;
94
- word-break: keep-all;
95
- white-space: nowrap;
96
- overflow: auto;
97
- .bri-scrollbar3();
86
+ &>div {
87
+ width: 100%;
88
+ height: 100%;
89
+ word-break: keep-all;
90
+ white-space: nowrap;
91
+ overflow: auto;
92
+ .bri-scrollbar3();
98
93
 
99
- .ivu-tag {
100
- margin: 2px 4px 0px 0px;
101
- background-color: @borderColor;
102
- }
94
+ .ivu-tag {
95
+ margin: 2px 4px 0px 0px;
96
+ background-color: @borderColor;
103
97
  }
104
98
  }
99
+ }
105
100
 
106
- &.ivu-select-disabled {
107
- .ivu-select-selection {
108
- & > div {
109
- .ivu-tag {
110
- background-color: @border-disabled;
111
- }
101
+ &.ivu-select-disabled {
102
+ .ivu-select-selection {
103
+ &>div {
104
+ .ivu-tag {
105
+ background-color: @border-disabled;
112
106
  }
113
107
  }
114
108
  }
109
+ }
115
110
 
116
- .ivu-select-item-selected:after {
117
- content: none;
118
- }
111
+ .ivu-select-item-selected:after {
112
+ content: none;
119
113
  }
114
+ }
120
115
  }
@@ -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
  }