222
schangxiang@126.com
2025-04-30 9bec4dcae002f36aa23231da11cb03a156b40110
PipeLineLems/web/src/components/TdButton/TdButton.tsx
@@ -26,9 +26,13 @@
      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})`,
@@ -36,10 +40,10 @@
      }
      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>
@@ -48,7 +52,7 @@
            disabled={props.disabled}
            onClick={() => emit('click')}
            icon={props.icon}
            class={styles.iconBtn}
            class="s-icon-btn"
          >
            {props.text}
          </IconButton>