adtec-core-package 0.8.9 → 0.9.0

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": "adtec-core-package",
3
- "version": "0.8.9",
3
+ "version": "0.9.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  <template #content>
13
13
  <!-- 此处的默认值先看tooltipContent有没有,没有就给默认content -->
14
14
  <slot name="tooltipContent"
15
- >{{ props.tooltipContent ? props.tooltipContent : props.content }}
15
+ >{{ props.tooltipContent ? props.tooltipContent : props.content }}
16
16
  </slot>
17
17
  </template>
18
18
  <div class="content" :style="{ width: props.width }" @mouseover="isShowTooltip">
@@ -46,10 +46,10 @@ const isShow = ref<boolean>(true)
46
46
  const contentRef = ref()
47
47
  const isShowTooltip = function (): void {
48
48
  // 计算span标签的offsetWidth与盒子元素的offsetWidth,给isShow赋值
49
- if (contentRef.value && contentRef.value.parentNode.offsetWidth > contentRef.value.offsetWidth) {
50
- isShow.value = true
51
- } else {
49
+ if (contentRef.value && contentRef.value.parentNode.offsetWidth < contentRef.value.offsetWidth) {
52
50
  isShow.value = false
51
+ } else {
52
+ isShow.value = true
53
53
  }
54
54
  }
55
55
  </script>
@@ -58,9 +58,5 @@ const isShowTooltip = function (): void {
58
58
  overflow: hidden;
59
59
  white-space: nowrap;
60
60
  text-overflow: ellipsis;
61
- :deep(.el-text) {
62
- height: 100%;
63
- vertical-align: middle;
64
- }
65
61
  }
66
62
  </style>