bri-components 1.2.77 → 1.2.78

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.2.77",
3
+ "version": "1.2.78",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -214,6 +214,9 @@ export default {
214
214
  modKey () {
215
215
  return this.propsObj.modKey;
216
216
  },
217
+ screenKey () {
218
+ return this.propsObj.screenKey;
219
+ },
217
220
 
218
221
  /* 移动端在用 */
219
222
  // 只做校验而隐藏的的field框,所用的propsObj
@@ -173,9 +173,6 @@
173
173
 
174
174
  return btnList;
175
175
  },
176
- screenKey () {
177
- return this.propsObj.screenKey;
178
- },
179
176
  importParams () {
180
177
  return {
181
178
  _key: this.controlKey,
@@ -3,7 +3,7 @@
3
3
  <!-- 加载 -->
4
4
  <bri-loading
5
5
  v-if="isLoading"
6
- class="DshPanel-loading"
6
+ class="DshCard-loading"
7
7
  ></bri-loading>
8
8
  <template>
9
9
  <!-- 有数据 -->
@@ -18,14 +18,17 @@
18
18
  v-for="(row, dataIndex) in data"
19
19
  :key="dataIndex"
20
20
  :xs="24"
21
- :sm="12"
21
+ :sm="subMode === 'logo' ? 24 : 12"
22
22
  :md="12"
23
- :lg="8"
24
- :xl="6"
25
- :xxl="4"
23
+ :lg="subMode === 'logo' ? 12 : 8"
24
+ :xl="subMode === 'logo' ? 8 : 6"
25
+ :xxl="subMode === 'logo' ? 6 : 4"
26
26
  >
27
27
  <div
28
- class="row-item"
28
+ :class="{
29
+ 'row-item': true,
30
+ 'row-item-logo': true,
31
+ }"
29
32
  @click="clickRow(row)"
30
33
  >
31
34
  <!-- 复选框 -->
@@ -48,7 +51,7 @@
48
51
  @click.native.stop="0"
49
52
  ></dsh-dropdown>
50
53
 
51
- <!-- 背景图 -->
54
+ <!-- 图片 -->
52
55
  <div class="row-item-image">
53
56
  <img
54
57
  :src="getCardBgImgSrc(row)"
@@ -179,7 +182,7 @@
179
182
  },
180
183
 
181
184
  getCardBgImgSrc (row) {
182
- const fileList = row[this.propsObj.imageField] || [];
185
+ const fileList = row[this.imageField] || [];
183
186
  const imgObj = fileList.find(fileItem => fileItem.mimetype.includes("image")) || {
184
187
  url: this.$imageSrcMap.app.projectCard
185
188
  };
@@ -188,9 +191,9 @@
188
191
  };
189
192
  },
190
193
  computed: {
191
-
192
194
  selfPropsObj () {
193
195
  return {
196
+ subMode: "default", // "default", "logo"
194
197
  multiple: false,
195
198
  imageField: "",
196
199
  titleField: "",
@@ -201,6 +204,9 @@
201
204
  ...this.propsObj
202
205
  };
203
206
  },
207
+ subMode () {
208
+ return this.selfPropsObj.subMode;
209
+ },
204
210
  multiple () {
205
211
  return !!this.selfPropsObj.multiple;
206
212
  },
@@ -228,7 +234,7 @@
228
234
  selfColumns () {
229
235
  return this.columns
230
236
  .filter(colItem => ![this.imageField, this.titleField].includes(colItem._key))
231
- .slice(0, 2);
237
+ .slice(0, this.subMode === "logo" ? 4 : 2);
232
238
  },
233
239
 
234
240
  selectIds: {
@@ -291,8 +297,7 @@
291
297
  box-sizing: border-box;
292
298
  width: 100%;
293
299
  margin-bottom: 20px;
294
- // border-radius: 4px;
295
- box-shadow: 0px 4px 8px 0px rgba(222, 222, 222, 0.75);
300
+ box-shadow: 0 4px 5px 5px rgba(0, 0, 0, 0.05), 0 4px 5px 0 rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
296
301
  background: #FFFFFF;
297
302
  cursor: pointer;
298
303
  overflow: hidden;
@@ -318,8 +323,6 @@
318
323
 
319
324
  &-image {
320
325
  height: 122px;
321
- // padding: 10px;
322
- // padding-bottom: 0px;
323
326
  overflow: hidden;
324
327
 
325
328
  img {
@@ -328,9 +331,12 @@
328
331
  }
329
332
 
330
333
  &-info {
334
+ flex: 1;
335
+ min-height: 0px;
331
336
  padding: 8px;
332
337
  padding-bottom: 10px;
333
338
  background: #F7FBFF;
339
+ overflow: hidden;
334
340
 
335
341
  .title {
336
342
  height: 24px;
@@ -381,6 +387,35 @@
381
387
  }
382
388
  }
383
389
  }
390
+
391
+ &-logo {
392
+ padding: 10px;
393
+ border-radius: 6px;
394
+ flex-direction: row;
395
+
396
+ .row-item {
397
+ &-image {
398
+ width: 64px;
399
+ height: 64px;
400
+ margin-top: 8px;
401
+ border: 1px solid #e5e5e5;
402
+ border-radius: 8px;
403
+
404
+ img {
405
+ width: 100%;
406
+ height: 100%;
407
+ }
408
+ }
409
+
410
+ &-info {
411
+ background-color: #ffffff;
412
+ }
413
+ }
414
+
415
+ &:hover {
416
+
417
+ }
418
+ }
384
419
  }
385
420
 
386
421
  }
@@ -618,7 +618,7 @@
618
618
  }
619
619
 
620
620
  &-tip {
621
- .dsh-subtip();
621
+ #dsh-nodata-small();
622
622
  line-height: 16px;
623
623
  }
624
624
  }
@@ -36,15 +36,6 @@
36
36
  color: #ffffff;
37
37
  }
38
38
 
39
- #dsh-nodata {
40
- width: 100%;
41
- min-height: 60px;
42
- padding: 20px 10px;
43
- text-align: center;
44
- font-size: 14px;
45
- color: @placeholderColor;
46
- }
47
-
48
39
  #btn-style {
49
40
  background: #F4F8FF;
50
41
  border: 1px solid #6694ED;
@@ -24,6 +24,15 @@
24
24
  font-weight: 500;
25
25
  color: @placeholderColor;
26
26
  }
27
+ #dsh-nodata-small {
28
+ width: 100%;
29
+ margin: auto;
30
+ padding: 10px 10px;
31
+ text-align: center;
32
+ font-size: 12px;
33
+ font-weight: 500;
34
+ color: @placeholderColor;
35
+ }
27
36
 
28
37
  .dsh-subtip {
29
38
  width: 100%;