From dbb886f05af928ec4bd8b632fe7204f2551ef866 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周日, 04 5月 2025 22:09:04 +0800
Subject: [PATCH] 2222
---
PipeLineLems/web/src/components/Select/Option.tsx | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/PipeLineLems/web/src/components/Select/Option.tsx b/PipeLineLems/web/src/components/Select/Option.tsx
index a012420..bb822a2 100644
--- a/PipeLineLems/web/src/components/Select/Option.tsx
+++ b/PipeLineLems/web/src/components/Select/Option.tsx
@@ -1,13 +1,25 @@
import { defineComponent } from 'vue'
-import IconButton from '@/components/IconButton/IconButton'
-import { CaretBottom } from '@element-plus/icons-vue'
+import Icon from '@/components/Icon/Icon'
+import styles from './Select.module.scss'
export default defineComponent<{ [key: string]: any }>({
name: 'Option',
setup(props, { attrs, slots, emit }) {
return () => {
- return <el-option {...attrs}></el-option>
+ if (attrs.tip) {
+ return (
+ <el-option {...attrs}>
+ <div class={styles.option}>
+ <span>{attrs.label}</span>
+ <el-tooltip effect="dark" content={attrs.tip} placement="top">
+ <Icon icon="wen" width={16} height={16} />
+ </el-tooltip>
+ </div>
+ </el-option>
+ )
+ }
+ return <el-option {...attrs}>{slots.default?.()}</el-option>
}
},
})
--
Gitblit v1.9.3