index.jsx 539 B

12345678910111213141516171819
  1. import { ElDropdown, ElIcon } from 'element-plus'
  2. import { CaretBottom } from '@element-plus/icons-vue'
  3. import './index.less'
  4. export default {
  5. name: 'CipDropdown',
  6. setup (props, { attrs, slots }) {
  7. return () => <ElDropdown>
  8. {{
  9. default: () => <div class={'cip-dropdown__title'}>
  10. {slots.default?.()}
  11. {!attrs.disabled && <ElIcon class={'cip-dropdown__icon'}>
  12. <CaretBottom />
  13. </ElIcon>}
  14. </div>,
  15. dropdown: () => slots.dropdown?.()
  16. }}
  17. </ElDropdown>
  18. }
  19. }