Browse Source

更新测试

lifanagju_citu 3 months ago
parent
commit
eedb5e8568

+ 2 - 2
src/components/Ellipsis/index.vue

@@ -85,8 +85,8 @@ function updateTooltipShow() {
   const clientWidth = ellipsisRef.value.clientWidth
   const clientHeight = ellipsisRef.value.clientHeight
   const offsetWidth = ellipsisRef.value.offsetWidth
-  // computedTooltipMaxWidth.value = `${offsetWidth + 24}px`
-  computedTooltipMaxWidth.value = `100vw`
+  computedTooltipMaxWidth.value = `${offsetWidth + 24}px`
+  // computedTooltipMaxWidth.value = `100vw`
   if (scrollWidth > clientWidth || scrollHeight > clientHeight) {
     if (props.expand) {
       showExpand.value = true

File diff suppressed because it is too large
+ 0 - 0
src/components/Enterprise/hotPromoted.vue


+ 3 - 2
src/components/Tooltip/index.vue

@@ -15,7 +15,7 @@ import {
 const props = defineProps({
   maxWidth: { // 文本最大宽度,单位 px
     type: [String, Number],
-    default: 100
+    default: 240
   },
   content: { // 展示的内容 string | slot
     type: String,
@@ -252,7 +252,8 @@ async function getPosition() {
   }
   if (['top', 'bottom'].includes(tooltipPlace.value)) {
     top.value = tooltipCardHeight.value + (props.arrow ? 4 + 12 : 6)
-    left.value = ((tooltipCardWidth.value - contentWidth.value) / 2) + contentWidth.value.offsetLeft
+    // left.value = ((tooltipCardWidth.value - contentWidth.value) / 2) + contentWidth.value.offsetLeft
+    left.value = (tooltipCardWidth.value - contentWidth.value) / 2
   } else {
     top.value = (tooltipCardHeight.value - contentHeight.value) / 2
     left.value = tooltipCardWidth.value + (props.arrow ? 4 + 12 : 6)

Some files were not shown because too many files changed in this diff