소스 검색

更新测试

lifanagju_citu 3 달 전
부모
커밋
eedb5e8568
3개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      src/components/Ellipsis/index.vue
  2. 0 0
      src/components/Enterprise/hotPromoted.vue
  3. 3 2
      src/components/Tooltip/index.vue

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

@@ -85,8 +85,8 @@ function updateTooltipShow() {
   const clientWidth = ellipsisRef.value.clientWidth
   const clientWidth = ellipsisRef.value.clientWidth
   const clientHeight = ellipsisRef.value.clientHeight
   const clientHeight = ellipsisRef.value.clientHeight
   const offsetWidth = ellipsisRef.value.offsetWidth
   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 (scrollWidth > clientWidth || scrollHeight > clientHeight) {
     if (props.expand) {
     if (props.expand) {
       showExpand.value = true
       showExpand.value = true

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
src/components/Enterprise/hotPromoted.vue


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

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

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.