|
@@ -231,6 +231,34 @@ const Hr = () => {
|
|
|
/>
|
|
|
)}
|
|
|
</ProFormDependency>
|
|
|
+ <ProFormSwitch
|
|
|
+ fieldProps={{
|
|
|
+ onChange(checked) {
|
|
|
+ if (!checked) {
|
|
|
+ formRef.current?.setFieldsValue({ notification: [] })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ name="showNotification"
|
|
|
+ label={
|
|
|
+ <span className="flex items-center">
|
|
|
+ <EveryUser className="mr-1" className="flex items-baseline mr-1" />
|
|
|
+ 通知中心
|
|
|
+ </span>
|
|
|
+ }
|
|
|
+ />
|
|
|
+ <ProFormDependency name={['showNotification']}>
|
|
|
+ {({ showNotification }) => (
|
|
|
+ <ProFormCheckbox.Group
|
|
|
+ wrapperCol={{ offset: 1 }}
|
|
|
+ name="notification"
|
|
|
+ options={[
|
|
|
+ { value: 'access', label: '查看', disabled: !showNotification },
|
|
|
+ { value: 'add', label: '添加', disabled: !showNotification }
|
|
|
+ ]}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </ProFormDependency>
|
|
|
</ProForm>
|
|
|
)}
|
|
|
</div>
|