bri-components 1.3.3 → 1.3.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -248,41 +248,30 @@
248
248
  .BriUpload {
249
249
  width: 100%;
250
250
  height: 100%;
251
- position: relative;
252
- overflow: hidden;
253
251
  border: 1px solid @borderColor;
254
252
  border-radius: @borderRadius;
255
253
  background-color: @white;
254
+ overflow: hidden;
255
+ position: relative;
256
256
 
257
- // 外围
258
- &-old {
259
- overflow: hidden;
257
+ &-old,
258
+ &-new,
259
+ &-inline {
260
260
  display: flex;
261
261
 
262
262
  &-wrapper {
263
- min-width: 120px;
264
- height: 100%;
265
- margin: 16px 0px 16px 16px;
266
- border-radius: 0px;
267
- border: none;
263
+ border: none!important;
264
+ border-radius: 0px !important;
265
+
268
266
  &:hover {
269
- border: none
267
+ border: none;
270
268
  }
271
269
  }
272
270
 
273
271
  &-add {
274
272
  .dsh-flex-col-center-center();
275
- width: 120px;
276
- height: 120px;
277
- position: relative;
278
- border: 1px @borderColor dashed;
279
- color: @themeColor;
280
- border-radius: @borderRadius;
281
273
  cursor: pointer;
282
- &:hover {
283
- border-color: @themeColor;
284
- background-color: @theme-focus;
285
- }
274
+ position: relative;
286
275
  }
287
276
 
288
277
  &-circle {
@@ -292,11 +281,38 @@
292
281
  bottom: 0;
293
282
  right: 0;
294
283
  margin: auto;
295
- width: 50px !important;
296
- height: 50px !important;
297
284
  border-radius: 50%;
298
- background-color: @inputBg-readonly;
285
+ }
286
+ }
287
+
288
+ &-old {
289
+ overflow: hidden;
290
+
291
+ &-wrapper {
292
+ min-width: 120px;
293
+ height: 100%;
294
+ margin: 16px 0px 16px 16px;
295
+ }
299
296
 
297
+ &-add {
298
+ width: 120px;
299
+ height: 120px;
300
+ border: 1px @borderColor dashed;
301
+ border-radius: @borderRadius;
302
+ color: @themeColor;
303
+
304
+ &:hover {
305
+ border-color: @themeColor;
306
+ background-color: @theme-focus;
307
+ }
308
+ }
309
+
310
+ &-circle {
311
+ width: 50px!important;
312
+ height: 50px!important;
313
+ background-color: @inputBg-readonly;
314
+ color: @themeColor;
315
+
300
316
  i {
301
317
  color: @scuess-color;
302
318
  font-size: 40px;
@@ -306,27 +322,20 @@
306
322
 
307
323
  &-new,
308
324
  &-inline {
309
- display: flex;
310
-
311
325
  &-wrapper {
312
326
  min-width: 30px;
313
- background-color: @border-readonly;
314
327
  height: 30px;
315
328
  line-height: 30px;
316
- border: none;
317
- border-radius: 0px !important;
318
- &:hover {
319
- border: none
320
- }
329
+ background-color: @border-readonly;
321
330
  }
322
331
 
323
332
  &-add {
324
- .dsh-flex-row-center-center();
325
333
  height: 30px;
326
- background-color: @btn-hover;
327
- color: @textColor;
328
334
  border: none;
329
335
  border-radius: 0px;
336
+ background-color: @btn-hover;
337
+ color: @textColor;
338
+
330
339
  &:hover {
331
340
  color: @themeColor;
332
341
  background-color: @theme-focus;
@@ -334,15 +343,10 @@
334
343
  }
335
344
 
336
345
  &-circle {
337
- position: absolute;
338
- top: 50%;
339
- left: 50%;
340
- width: 24px !important;
341
- height: 24px !important;
342
- margin-top: -12px;
343
- margin-left: -12px;
346
+ width: 24px!important;
347
+ height: 24px!important;
344
348
  background-color: #f4f5fa;
345
- border-radius: 50%;
349
+
346
350
  i {
347
351
  color: @scuess-color;
348
352
  font-size: 24px;
@@ -191,7 +191,11 @@ export default {
191
191
  const parameterTypeName = (this.parameterPropsObj._data.find(parameterTypeItem => parameterTypeItem._key === parameterType) || { name: `${parameterType}不存在` }).name;
192
192
 
193
193
  const operators = fieldData[!dynamicList.length && ["set"].includes(this.mode) ? "operatorsSet" : "operators"] || fieldData.operators || [];
194
- const fieldOperator = initContion.fieldOperator || (["reference"].includes(fieldType) ? "eq" : (operators[0] || {})._key);
194
+ const fieldOperator = initContion.fieldOperator || (
195
+ ["reference"].includes(fieldType) && !["set"].includes(this.mode)
196
+ ? "eq"
197
+ : (operators[0] || {})._key
198
+ );
195
199
  const fieldOperatorName = (operators.find(operatorItem => operatorItem._key === fieldOperator) || { name: `${fieldOperator}不存在` }).name;
196
200
 
197
201
  return {
@@ -341,7 +345,7 @@ export default {
341
345
  : item[key]
342
346
  )
343
347
  : item[key]
344
- }), {})
348
+ }), {})
345
349
  );
346
350
  };
347
351
 
@@ -1,7 +1,7 @@
1
1
  /* -------------------- 表格 -------------- */
2
2
  // 转化表单字段属性 to 表格参数, 是否需要过滤tag
3
3
  const transformToColumns = function (form, {
4
- headerFilter = false
4
+ headFilter = false
5
5
  } = {}) {
6
6
  return form
7
7
  .map(col => {
@@ -14,7 +14,7 @@ const transformToColumns = function (form, {
14
14
  align: col._align || typeData.align,
15
15
  fixed: col._fixed,
16
16
  width: col._width || typeData.width,
17
- sortBy: headerFilter ? col._sortBy || typeData.sortBy : undefined,
17
+ sortBy: headFilter ? col._sortBy || typeData.sortBy : undefined,
18
18
  renderHeaderCell: ({ row, column }, h) => {
19
19
  return h("div", {
20
20
  class: { "bri-table-ellipsis": column.sortBy != undefined || column.filter || column.filterCustom },
@@ -57,9 +57,9 @@ const transformToColumns = function (form, {
57
57
  : {}
58
58
  ),
59
59
  ...(
60
- ["select", "checkbox"].includes(col._type)
60
+ ["select", "checkbox"].includes(col._type) && col._hideHeadFilter !== true
61
61
  ? {
62
- filter: headerFilter ? {
62
+ filter: headFilter ? {
63
63
  isMultiple: true,
64
64
  maxHeight: 250,
65
65
  filterList: (
@@ -70,12 +70,12 @@ const transformToColumns = function (form, {
70
70
  : col._selectFilterVals.includes(item._key)
71
71
  )
72
72
  : col._data
73
- ).map(item => ({
74
- ...item,
75
- value: item._key,
76
- label: item.name,
77
- selected: false
78
- })),
73
+ ).map(item => ({
74
+ ...item,
75
+ value: item._key,
76
+ label: item.name,
77
+ selected: false
78
+ })),
79
79
  filterConfirm: (filterList) => {
80
80
  let conditionItem = {
81
81
  logic: "field",