bri-components 1.2.20 → 1.2.22

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 (42) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/2.bri-components.min.js +1 -1
  4. package/lib/3.bri-components.min.js +1 -1
  5. package/lib/5.bri-components.min.js +1 -1
  6. package/lib/6.bri-components.min.js +1 -1
  7. package/lib/bri-components.min.js +7 -7
  8. package/lib/styles/bri-components.css +1 -1
  9. package/package.json +1 -1
  10. package/src/abolish/DshFlatTable.vue +6 -6
  11. package/src/components/controls/base/DshInput.vue +3 -8
  12. package/src/components/controls/controlMixin.js +4 -4
  13. package/src/components/controls/senior/flatTable.vue +58 -50
  14. package/src/components/controls/senior/selectDepartments.vue +2 -1
  15. package/src/components/controls/senior/selectUsers/selectUsers.vue +6 -2
  16. package/src/components/form/DshAdvSearchForm.vue +9 -7
  17. package/src/components/form/DshDefaultSearch.vue +2 -2
  18. package/src/components/form/DshForm.vue +14 -10
  19. package/src/components/form/searchMixin.js +16 -7
  20. package/src/components/list/BriFlatTable.vue +8 -4
  21. package/src/components/list/BriTable.vue +1 -0
  22. package/src/components/list/DshBox/DshCard.vue +2 -2
  23. package/src/components/list/DshBox/DshCrossTable.vue +4 -4
  24. package/src/components/list/DshBox/DshList.vue +3 -15
  25. package/src/components/list/DshBox/DshPanel.vue +2 -2
  26. package/src/components/list/DshCascaderTable.vue +4 -4
  27. package/src/components/other/BriIframe.vue +11 -4
  28. package/src/components/small/BriButton.vue +11 -5
  29. package/src/components/small/{DshTdRender.js → DshListRender.js} +1 -1
  30. package/src/components/unit/{DshFormItem.vue → DshFormUnit.vue} +13 -13
  31. package/src/components/unit/{DshUnit.vue → DshListUnit.vue} +14 -5
  32. package/src/components/unit/unitMixin.js +2 -5
  33. package/src/index.js +11 -9
  34. package/src/styles/components/form/DshAdvSearchForm.less +2 -2
  35. package/src/styles/components/form/DshDefaultSearch.less +4 -4
  36. package/src/styles/components/form/DshForm.less +3 -2
  37. package/src/styles/components/index.less +2 -2
  38. package/src/styles/components/small/DshModal.less +66 -60
  39. package/src/styles/components/unit/{DshFormItem.less → DshFormUnit.less} +4 -4
  40. package/src/styles/components/unit/DshListUnit.less +3 -0
  41. package/src/utils/table.js +1 -1
  42. package/src/styles/components/unit/DshUnit.less +0 -5
@@ -2,9 +2,9 @@
2
2
  <div
3
3
  :class="[
4
4
  {
5
- 'DshFormItem': true,
6
- 'DshFormItem-required': canEdit && formItem._required,
7
- 'DshFormItem-line': formItem._line,
5
+ 'DshFormUnit': true,
6
+ 'DshFormUnit-required': canEdit && formItem._required,
7
+ 'DshFormUnit-line': formItem._line,
8
8
  },
9
9
  formControlClass,
10
10
  formItem.formControlClass
@@ -19,19 +19,19 @@
19
19
  <!-- label -->
20
20
  <div
21
21
  v-if="!formItem._noLabel"
22
- class="DshFormItem-label"
22
+ class="DshFormUnit-label"
23
23
  :style="labelStyle"
24
24
  >
25
25
  <!-- 左 -->
26
- <span class="DshFormItem-label-left">
26
+ <span class="DshFormUnit-label-left">
27
27
  <bri-tooltip
28
28
  :content="formItem._name"
29
29
  transfer
30
30
  >
31
31
  <span :class="{
32
- 'DshFormItem-label-name': true,
33
- 'DshFormItem-label-name-edit': canEdit,
34
- 'DshFormItem-label-name-show': !canEdit
32
+ 'DshFormUnit-label-name': true,
33
+ 'DshFormUnit-label-name-edit': canEdit,
34
+ 'DshFormUnit-label-name-show': !canEdit
35
35
  }">
36
36
  <slot name="label">
37
37
  {{ formItem._name }}
@@ -39,7 +39,7 @@
39
39
  <!-- 有更新标记-->
40
40
  <span
41
41
  v-if="changedFields.includes(formItem._key)"
42
- class="DshFormItem-label-name-sign"
42
+ class="DshFormUnit-label-name-sign"
43
43
  >!有更新</span>
44
44
  </slot>
45
45
 
@@ -55,7 +55,7 @@
55
55
  <!-- 右 -->
56
56
  <span
57
57
  v-if="canEdit"
58
- class="DshFormItem-label-right"
58
+ class="DshFormUnit-label-right"
59
59
  >
60
60
  <slot name="extra">
61
61
  <bri-tooltip
@@ -63,7 +63,7 @@
63
63
  transfer
64
64
  style="height: 14px;"
65
65
  >
66
- <span class="DshFormItem-label-description dsh-ellipsis">
66
+ <span class="DshFormUnit-label-description dsh-ellipsis">
67
67
  {{ formItem._description && `* ${formItem._description}` }}
68
68
  </span>
69
69
  </bri-tooltip>
@@ -72,7 +72,7 @@
72
72
  </div>
73
73
 
74
74
  <!-- 控件 -->
75
- <div class="DshFormItem-control">
75
+ <div class="DshFormUnit-control">
76
76
  <!-- 控件位置放置的dom -->
77
77
  <slot name="control"></slot>
78
78
 
@@ -100,7 +100,7 @@
100
100
  import unitMixin from "./unitMixin.js";
101
101
 
102
102
  export default {
103
- name: "DshFormItem",
103
+ name: "DshFormUnit",
104
104
  mixins: [
105
105
  unitMixin
106
106
  ],
@@ -1,16 +1,16 @@
1
1
  <template>
2
- <div class="DshUnit">
2
+ <div class="DshListUnit">
3
3
  <template v-if="formItem._type === 'index'">
4
4
  <span>{{ indexStr || rowIndex + 1 }}</span>
5
5
  </template>
6
6
 
7
7
  <template v-else-if="formItem.render">
8
- <dsh-td-render
8
+ <dsh-list-render
9
9
  :column="formItem"
10
10
  :row="formData"
11
11
  :index="rowIndex"
12
12
  :render="formItem.render"
13
- ></dsh-td-render>
13
+ ></dsh-list-render>
14
14
  </template>
15
15
 
16
16
  <template v-else>
@@ -36,11 +36,16 @@
36
36
  import unitMixin from "./unitMixin.js";
37
37
 
38
38
  export default {
39
- name: "DshUnit",
39
+ name: "DshListUnit",
40
40
  mixins: [
41
41
  unitMixin
42
42
  ],
43
43
  props: {
44
+ canEdit: {
45
+ type: Boolean,
46
+ default: false
47
+ },
48
+
44
49
  indexStr: String,
45
50
  rowIndex: Number,
46
51
  parentData: {
@@ -55,6 +60,10 @@
55
60
  },
56
61
  computed: {},
57
62
  created () {},
58
- methods: {}
63
+ methods: {
64
+ blur (...params) {
65
+ this.$emit("blur", ...params);
66
+ }
67
+ }
59
68
  };
60
69
  </script>
@@ -29,13 +29,10 @@ export default {
29
29
  created () { },
30
30
  methods: {
31
31
  change (...params) {
32
- this.$emit("change", ...params);
32
+ this.$emit("change", this.formItem, ...params);
33
33
  },
34
34
  refChange (...params) {
35
- this.$emit("refChange", ...params);
36
- },
37
- blur (...params) {
38
- this.$emit("blur", ...params);
35
+ this.$emit("change", this.formItem, ...params);
39
36
  }
40
37
  }
41
38
  };
package/src/index.js CHANGED
@@ -21,8 +21,7 @@ import DshForm from "./components/form/DshForm.vue";
21
21
  import DshAdvSearchForm from "./components/form/DshAdvSearchForm.vue";
22
22
  import DshDefaultSearch from "./components/form/DshDefaultSearch.vue";
23
23
  // unit
24
- import DshFormItem from "./components/unit/DshFormItem.vue";
25
- import DshUnit from "./components/unit/DshUnit.vue";
24
+ import DshListUnit from "./components/unit/DshListUnit.vue";
26
25
 
27
26
  // controls
28
27
  import BriControlInput from "./components/controls/BriControlInput.vue";
@@ -50,7 +49,7 @@ import DshTabs from "./components/small/DshTabs.vue";
50
49
  import DshTags from "./components/small/DshTags.vue";
51
50
  import DshTitle from "./components/small/DshTitle.vue";
52
51
  import DshRender from "./components/small/render.js";
53
- import DshTdRender from "./components/small/DshTdRender.js";
52
+ import DshListRender from "./components/small/DshListRender.js";
54
53
 
55
54
  /* -------------------- 局部组件 ----------------------- */
56
55
  // error
@@ -63,6 +62,9 @@ import BriCard from "./components/list/BriCard.vue";
63
62
  import BriTree from "./components/list/BriTree.vue";
64
63
  import BriTreeItem from "./components/list/BriTreeItem.vue";
65
64
 
65
+ // unit
66
+ import DshFormUnit from "./components/unit/DshFormUnit.vue";
67
+
66
68
  // controls
67
69
  import BriInputs from "./components/controls/base/BriInputs.vue";
68
70
  import DshNumberange from "./components/controls/base/DshNumberange.vue";
@@ -110,8 +112,7 @@ const map = {
110
112
  DshAdvSearchForm,
111
113
  DshDefaultSearch,
112
114
  // unit
113
- DshFormItem,
114
- DshUnit,
115
+ DshListUnit,
115
116
 
116
117
  // controls
117
118
  BriControlInput,
@@ -138,7 +139,7 @@ const map = {
138
139
  DshTags,
139
140
  DshTitle,
140
141
  DshRender,
141
- DshTdRender
142
+ DshListRender
142
143
  };
143
144
  const install = function (Vue, opts = {}) {
144
145
  ViewUI.LoadingBar.config({
@@ -195,8 +196,9 @@ export {
195
196
  DshAdvSearchForm,
196
197
  DshDefaultSearch,
197
198
  // unit
198
- DshFormItem,
199
- DshUnit,
199
+ DshListUnit,
200
+
201
+ DshFormUnit,
200
202
 
201
203
  // controls
202
204
  DshInput,
@@ -246,7 +248,7 @@ export {
246
248
  DshTags,
247
249
  DshTitle,
248
250
  DshRender,
249
- DshTdRender,
251
+ DshListRender,
250
252
 
251
253
  DshBtnModal
252
254
  };
@@ -57,7 +57,7 @@
57
57
  margin-bottom: 10px!important;
58
58
  cursor: pointer;
59
59
 
60
- .DshFormItem-label-right {
60
+ .DshFormUnit-label-right {
61
61
  flex: 6;
62
62
  }
63
63
 
@@ -75,7 +75,7 @@
75
75
  &-blank {
76
76
  text-align: center;
77
77
  line-height: 30px;
78
- color: @textColor;
78
+ color: @placeholderColor;
79
79
  }
80
80
 
81
81
  &-extra {
@@ -61,18 +61,18 @@
61
61
  overflow: hidden!important;
62
62
  }
63
63
 
64
- .DshFormItem-label {
64
+ .DshFormUnit-label {
65
65
  width: 80px;
66
66
  text-align: right;
67
67
  margin-right: 16px;
68
68
 
69
- .DshFormItem-label-left {
70
- .DshFormItem-label-name {
69
+ .DshFormUnit-label-left {
70
+ .DshFormUnit-label-name {
71
71
  font-family: "Microsoft YaHei";
72
72
  }
73
73
  }
74
74
 
75
- .DshFormItem-label-right {
75
+ .DshFormUnit-label-right {
76
76
  text-align: left;
77
77
  }
78
78
  }
@@ -7,8 +7,9 @@
7
7
  line-height: normal;
8
8
  }
9
9
  .ivu-form-item-error-tip {
10
- top: 90%;
11
- left: 15px;
10
+ top: 100%;
11
+ left: 16px;
12
+ padding-top: 0px;
12
13
  font-size: 12px;
13
14
  }
14
15
  }
@@ -20,8 +20,8 @@
20
20
  @import "./form/DshAdvSearchForm.less";
21
21
  @import "./form/DshDefaultSearch.less";
22
22
  // unit
23
- @import "./unit/DshFormItem.less";
24
- @import "./unit/DshUnit.less";
23
+ @import "./unit/DshFormUnit.less";
24
+ @import "./unit/DshListUnit.less";
25
25
 
26
26
  // controls
27
27
  @import "./controls/BriControlInput.less";
@@ -118,8 +118,8 @@
118
118
  .ivu-modal {
119
119
  // width: 1000px !important;
120
120
  // height: 800px !important;
121
- width: 65% !important;
122
- height: 80% !important;
121
+ width: 60% !important;
122
+ height: 85% !important;
123
123
  min-width: 500px;
124
124
  min-height: 400px;
125
125
 
@@ -167,75 +167,81 @@
167
167
  }
168
168
  }
169
169
 
170
+ .ivu-modal-mask {
171
+ background-color: rgba(55, 55, 55, 0.8);
172
+ }
170
173
 
171
174
  // 默认模态框brimodal
172
- // 通用样式
173
175
  .bri-modal {
174
- .ivu-modal-wrap {
175
- .ivu-modal {
176
- &-content {
177
- height: 100%;
178
- display: flex;
179
- flex-direction: column;
180
-
181
- .DshModal-close,
182
- .ivu-modal-close {
183
- top: 20px;
184
- right: 24px;
185
- color: @contentColor;
186
- font-size: @smallTitleSize;
187
-
188
- .ivu-icon-ios-close {
189
- font-size: 22px;
176
+ #bri-modal-common () {
177
+ .ivu-modal-wrap {
178
+ .ivu-modal {
179
+ &-content {
180
+ height: 100%;
181
+ display: flex;
182
+ flex-direction: column;
183
+
184
+ .DshModal-close,
185
+ .ivu-modal-close {
186
+ top: 20px;
187
+ right: 24px;
190
188
  color: @contentColor;
189
+ font-size: @smallTitleSize;
190
+
191
+ .ivu-icon-ios-close {
192
+ font-size: 22px;
193
+ color: @contentColor;
194
+ }
191
195
  }
192
- }
193
-
194
- .ivu-modal-header {
195
- width: 100%;
196
- height: 44px;
197
- padding: 20px 24px 0px 24px;
198
- border-bottom: none;
199
-
200
- &-inner {
201
- color: rgba(0, 0, 0, 0.9);
202
- font-size: 16px;
203
- font-weight: 500;
204
- line-height: 24px;
205
- height: 24px;
196
+
197
+ .ivu-modal-header {
198
+ width: 100%;
199
+ height: 44px;
200
+ padding: 20px 24px 0px 24px;
201
+ border-bottom: none;
202
+
203
+ &-inner {
204
+ color: rgba(0, 0, 0, 0.9);
205
+ font-size: 16px;
206
+ font-weight: 500;
207
+ line-height: 24px;
208
+ height: 24px;
209
+ }
210
+ }
211
+
212
+ .ivu-modal-body {
213
+ flex: 1;
214
+ overflow: auto;
215
+ padding: 16px 24px 20px;
206
216
  }
207
- }
208
-
209
- .ivu-modal-body {
210
- flex: 1;
211
- overflow: auto;
212
- padding: 16px 24px 20px;
213
217
  }
214
218
  }
215
219
  }
216
220
  }
217
- }
218
-
219
- // 小框 无固定高度,上下居中
220
- .bri-modal-center {
221
- .bri-modal();
221
+
222
+ #bri-modal-common();
222
223
 
223
- .ivu-modal-wrap {
224
- width: 100%;
225
- height: 100%;
226
- display: flex;
227
- flex-direction: column;
228
- align-items: center;
229
- justify-content: center;
230
-
231
- .ivu-modal {
232
- top: 0px;
224
+ // 小框 无固定高度,上下居中
225
+ &-center {
226
+ #bri-modal-common();
227
+
228
+ .ivu-modal-wrap {
229
+ width: 100%;
230
+ height: 100%;
231
+ display: flex;
232
+ flex-direction: column;
233
+ align-items: center;
234
+ justify-content: center;
235
+
236
+ .ivu-modal {
237
+ top: 0px;
238
+ }
233
239
  }
234
240
  }
241
+
242
+ // modal内部公用样式
243
+ &-footer {
244
+ text-align: right;
245
+ margin-top: 16px;
246
+ }
235
247
  }
236
-
237
- // modal内部公用样式
238
- .bri-modal-footer {
239
- text-align: right;
240
- margin-top: 16px;
241
- }
@@ -1,9 +1,9 @@
1
- .DshFormItem {
1
+ .DshFormUnit {
2
2
  margin: 5px 6px;
3
3
  padding: 3px 10px;
4
4
 
5
5
  &-required {
6
- .DshFormItem-label-name:before {
6
+ .DshFormUnit-label-name:before {
7
7
  content: '*';
8
8
  display: inline-block;
9
9
  line-height: 1.5;
@@ -67,7 +67,7 @@
67
67
  justify-content: space-between;
68
68
  align-items: center;
69
69
 
70
- .DshFormItem-label {
70
+ .DshFormUnit-label {
71
71
  max-width: 280px;
72
72
  // min-width: 100px;
73
73
  font-size: @textSize;
@@ -92,7 +92,7 @@
92
92
  }
93
93
  }
94
94
 
95
- .DshFormItem-control {
95
+ .DshFormUnit-control {
96
96
  flex: 1;
97
97
  min-width: 50px;
98
98
  display: flex;
@@ -0,0 +1,3 @@
1
+ .DshListUnit {
2
+
3
+ }
@@ -44,7 +44,7 @@ const transformToColumns = function (form, {
44
44
  }
45
45
  : {
46
46
  renderBodyCell: ({ row, column, rowIndex }, h) => {
47
- return h("dsh-unit", {
47
+ return h("dsh-list-unit", {
48
48
  props: {
49
49
  canEdit: false,
50
50
  rowIndex: rowIndex,
@@ -1,5 +0,0 @@
1
- .DshUnit {
2
- // .ivu-input {
3
- // font-size: 12px;
4
- // }
5
- }