html文件按钮的设置(按钮的初始状态为禁用)
<button [disabled]="!allow">测试按钮</button>
ts文件下类的定义
export class MyownComponent{allow=false;constructor(){setTimeout(()=>{this.allow=true},2000)}}
两秒后按钮改为启用状态
时间:2022-07-01 03:57:46
html文件按钮的设置(按钮的初始状态为禁用)
<button [disabled]="!allow">测试按钮</button>
ts文件下类的定义
export class MyownComponent{allow=false;constructor(){setTimeout(()=>{this.allow=true},2000)}}
两秒后按钮改为启用状态
成功的关键(The Key to Success)1200字英语作文
2024-07-31
高一学生优秀作文集锦:五篇1200字以上的写人范文 最新精选
2024-07-31