tianheng-ui 0.0.98 → 0.0.100

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,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.0.98",
4
+ "version": "0.0.100",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -388,7 +388,8 @@
388
388
  :style="{
389
389
  width: widget.options.width,
390
390
  height: widget.options.height,
391
- borderRadius: widget.options.borderRadius
391
+ borderRadius: widget.options.borderRadius,
392
+ verticalAlign:'middle'
392
393
  }"
393
394
  :src="item.url"
394
395
  :fit="widget.options.fit"
@@ -34,7 +34,7 @@
34
34
  :style="selfStyle"
35
35
  :src="item.url"
36
36
  :fit="widget.options.fit"
37
- :preview-src-list="widget.options.defaultValue"
37
+ :preview-src-list="imagePreviewList"
38
38
  :lazy="widget.options.isLazy"
39
39
  ></el-image>
40
40
  </div>
@@ -53,7 +53,15 @@ export default {
53
53
  style.width = this.widget.options.width;
54
54
  style.height = this.widget.options.height;
55
55
  style.borderRadius = `${this.widget.options.borderRadius || 0}`;
56
+ style.verticalAlign = "middle";
56
57
  return style;
58
+ },
59
+ imagePreviewList() {
60
+ const list = [];
61
+ this.widget.options.defaultValue.forEach(item => {
62
+ list.push(item.url);
63
+ });
64
+ return list;
57
65
  }
58
66
  }
59
67
  };
@@ -525,7 +525,6 @@ export default {
525
525
  const list = this.layoutComponents.filter(e => {
526
526
  return this.layoutFields.includes(e.type);
527
527
  });
528
- console.log(this.layoutComponents)
529
528
  return list;
530
529
  }
531
530
  },
@@ -11,7 +11,8 @@
11
11
  class="th-grid-item-content"
12
12
  :class="`th-grid-item-content_${position}`"
13
13
  >
14
- <i v-if="isIcon" :class="['th-icon', icon]"></i>
14
+ <slot v-if="$slots.icon" name="icon"></slot>
15
+ <i v-else-if="isIcon" :class="['th-icon', icon]"></i>
15
16
  <img v-else class="th-grid-item-img" src="" alt="" />
16
17
  <slot v-if="$slots.title" name="title"></slot>
17
18
  <p v-else class="th-grid-item-title">{{ title }}</p>