Browse Source

tooltip增加阴影

lichunyang 1 day ago
parent
commit
360d0b2dff
2 changed files with 3 additions and 14 deletions
  1. 0 14
      src/components/layout/TopoButtonBar.vue
  2. 3 0
      src/style.css

+ 0 - 14
src/components/layout/TopoButtonBar.vue

@@ -569,18 +569,4 @@ const handleModeSwitch = (value) => {
   border-color: #409eff;
 }
 
-/* 自定义 Tooltip 样式 */
-:deep(.custom-tooltip) {
-  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.2); /* 底部投影效果 */
-  border: none;
-  background-color: #fff;
-  color: #333;
-  padding: 6px 12px;
-}
-
-/* 箭头样式 */
-:deep(.custom-tooltip .el-popper__arrow::before) {
-  background: #fff;
-  box-shadow: none;
-}
 </style>

+ 3 - 0
src/style.css

@@ -68,3 +68,6 @@ button:focus-visible {
     background-color: #f9f9f9;
   }
 }
+.el-popper {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3) !important; /* 默认阴影 */
+}