omi icon indicating copy to clipboard operation
omi copied to clipboard

使用tag注册组件不警告类型警告或者错误

Open WaterAndBin opened this issue 1 year ago • 0 comments

如题 image image t-button并不会报任务类型的检测或者错误,TButton却正常报错了,显示并未传参 请问这种情况要咋处理? t-button代码

export interface ButtonProps {
  msg: string;
}

@tag("t-button")
export default class TButton extends Component<ButtonProps> {
  static props = {
    msg: {
      type: String,
      changed() {
        (this as any).updateData();
      },
    },
  };

  render(props: ButtonProps) {
    const { msg } = props;
    return (
      <button style="border: solid;">
        hallo,{msg},<slot></slot>
      </button>
    );
  }
}

WaterAndBin avatar Aug 12 '24 09:08 WaterAndBin