This commit is contained in:
Taric Xin
2022-02-23 11:17:11 +08:00
parent 6bbe864c56
commit 6c4ccbd840
2 changed files with 8 additions and 2 deletions

View File

@ -78,7 +78,10 @@ export class CartConfigActionModalComponent implements OnInit {
{ label: '停用', value: true } { label: '停用', value: true }
], ],
ui: { ui: {
widget: 'radio' widget: 'radio',
visibleIf: {
itemValue: (value: number) => this.configType !== 3
}
} as SFRadioWidgetSchema, } as SFRadioWidgetSchema,
default: staff?.statePaused || false default: staff?.statePaused || false
} }

View File

@ -83,6 +83,7 @@ export class CartConfigComponent implements OnInit {
{ {
title: '启用状态', title: '启用状态',
className: 'text-center', className: 'text-center',
iif: () => this.tabType !== 3,
index: 'statePaused', index: 'statePaused',
type: 'badge', type: 'badge',
badge: { badge: {
@ -156,7 +157,9 @@ export class CartConfigComponent implements OnInit {
configAction(item?: any) { configAction(item?: any) {
const modal = this.nzModalService.create({ const modal = this.nzModalService.create({
nzContent: CartConfigActionModalComponent, nzContent: CartConfigActionModalComponent,
nzComponentParams: item ? { i: { ...item,itemValue:item.name }, configType: this.tabType } : { i: { id: 0 }, configType: this.tabType }, nzComponentParams: item
? { i: { ...item, itemValue: item.name }, configType: this.tabType }
: { i: { id: 0 }, configType: this.tabType },
nzFooter: null nzFooter: null
}); });
modal.afterClose.subscribe(res => { modal.afterClose.subscribe(res => {