222
schangxiang@126.com
2025-04-30 9bec4dcae002f36aa23231da11cb03a156b40110
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>
    }
  },
})