| | |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | style: { |
| | | type: Object, |
| | | default: () => ({}), |
| | | }, |
| | | }, |
| | | emits: ['click'], |
| | | setup(props, { attrs, slots, emit }) { |
| | | setup(props, { slots, emit }) { |
| | | return () => { |
| | | const style = { |
| | | filter: `grayscale(${props.disabled ? 1 : 0})`, |
| | |
| | | } |
| | | return ( |
| | | <div |
| | | class={{ [styles.text]: true, [styles.hover]: props.hover }} |
| | | class={{ [styles.text]: true, 's-row--td-hover': props.hover }} |
| | | style={style} |
| | | > |
| | | <div class={styles.name}> |
| | | <div class="s-td-name" style={props.style}> |
| | | <Text truncated={true} tip={props.tip}> |
| | | {slots.default?.()} |
| | | </Text> |
| | |
| | | disabled={props.disabled} |
| | | onClick={() => emit('click')} |
| | | icon={props.icon} |
| | | class={styles.iconBtn} |
| | | class="s-icon-btn" |
| | | > |
| | | {props.text} |
| | | </IconButton> |