|
|
@@ -17,14 +17,17 @@
|
|
17
|
17
|
[disabled]="button.disabled || button.loading || disabled"
|
|
18
|
18
|
class="flex items-center gap-2"
|
|
19
|
19
|
>
|
|
20
|
|
- <mat-icon *ngIf="!button.loading">{{ button.icon || 'add' }}</mat-icon>
|
|
21
|
|
- <mat-progress-spinner
|
|
22
|
|
- *ngIf="button.loading"
|
|
23
|
|
- diameter="20"
|
|
24
|
|
- mode="indeterminate"
|
|
25
|
|
- class="inline-block"
|
|
26
|
|
- ></mat-progress-spinner>
|
|
27
|
|
- {{ button.loading ? '处理中...' : button.title }}
|
|
|
20
|
+ <div class="flex items-center gap-2">
|
|
|
21
|
+ <mat-icon *ngIf="!button.loading">{{ button.icon || 'add' }}</mat-icon>
|
|
|
22
|
+ <mat-progress-spinner
|
|
|
23
|
+ *ngIf="button.loading"
|
|
|
24
|
+ diameter="20"
|
|
|
25
|
+ mode="indeterminate"
|
|
|
26
|
+ class="inline-block"
|
|
|
27
|
+ [color]="button.color || 'primary'"
|
|
|
28
|
+ ></mat-progress-spinner>
|
|
|
29
|
+ <span>{{ button.loading ? '处理中...' : button.title }}</span>
|
|
|
30
|
+ </div>
|
|
28
|
31
|
</button>
|
|
29
|
32
|
}
|
|
30
|
33
|
</div>
|
|
|
@@ -37,14 +40,17 @@
|
|
37
|
40
|
[disabled]="disabled || loading"
|
|
38
|
41
|
class="flex items-center gap-2"
|
|
39
|
42
|
>
|
|
40
|
|
- <mat-icon *ngIf="!loading">{{ buttonIcon }}</mat-icon>
|
|
41
|
|
- <mat-progress-spinner
|
|
42
|
|
- *ngIf="loading"
|
|
43
|
|
- diameter="20"
|
|
44
|
|
- mode="indeterminate"
|
|
45
|
|
- class="inline-block"
|
|
46
|
|
- ></mat-progress-spinner>
|
|
47
|
|
- {{ loading ? '处理中...' : buttonText }}
|
|
|
43
|
+ <div class="flex items-center gap-2">
|
|
|
44
|
+ <mat-icon *ngIf="!loading">{{ buttonIcon }}</mat-icon>
|
|
|
45
|
+ <mat-progress-spinner
|
|
|
46
|
+ *ngIf="loading"
|
|
|
47
|
+ diameter="20"
|
|
|
48
|
+ mode="indeterminate"
|
|
|
49
|
+ class="inline-block"
|
|
|
50
|
+ [color]="buttonColor"
|
|
|
51
|
+ ></mat-progress-spinner>
|
|
|
52
|
+ <span>{{ loading ? '处理中...' : buttonText }}</span>
|
|
|
53
|
+ </div>
|
|
48
|
54
|
</button>
|
|
49
|
55
|
}
|
|
50
|
56
|
</div>
|