outaozhen 3 лет назад
Родитель
Сommit
69defc677a
1 измененных файлов с 55 добавлено и 63 удалено
  1. 55 63
      src/pages/Role/Product/index.tsx

+ 55 - 63
src/pages/Role/Product/index.tsx

@@ -237,46 +237,38 @@ const Product = () => {
                       name="showCloud"
                       label={<span className="flex items-center">云版管理</span>}
                     />
-                    <ProFormDependency name={['showCloud']}>
-                      {({ showCloud }) => (
-                        <ProFormCheckbox.Group
-                          wrapperCol={{ offset: 1 }}
-                          name="building"
-                          label="大司空云计价"
-                          options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
-                        />
-                      )}
-                    </ProFormDependency>
-                    <ProFormDependency name={['showCloud']}>
-                      {({ showCloud }) => (
-                        <ProFormCheckbox.Group
-                          wrapperCol={{ offset: 1 }}
-                          name="curing"
-                          label="养护云造价"
-                          options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
-                        />
-                      )}
-                    </ProFormDependency>
-                    <ProFormDependency name={['showCloud']}>
-                      {({ showCloud }) => (
-                        <ProFormCheckbox.Group
-                          wrapperCol={{ offset: 1 }}
-                          name="highway"
-                          label="公路云计价"
-                          options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
-                        />
-                      )}
-                    </ProFormDependency>
-                    <ProFormDependency name={['showCloud']}>
-                      {({ showCloud }) => (
-                        <ProFormCheckbox.Group
-                          wrapperCol={{ offset: 1 }}
-                          name="gs"
-                          label="大司空概算"
-                          options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
-                        />
-                      )}
-                    </ProFormDependency>
+                    <div className="ml-6">
+                      <ProFormDependency name={['showCloud']}>
+                        {({ showCloud }) => (
+                          <>
+                            <ProFormCheckbox.Group
+                              wrapperCol={{ offset: 1 }}
+                              name="building"
+                              label="大司空云计价"
+                              options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
+                            />
+                            <ProFormCheckbox.Group
+                              wrapperCol={{ offset: 1 }}
+                              name="curing"
+                              label="养护云造价"
+                              options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
+                            />
+                            <ProFormCheckbox.Group
+                              wrapperCol={{ offset: 1 }}
+                              name="highway"
+                              label="公路云计价"
+                              options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
+                            />
+                            <ProFormCheckbox.Group
+                              wrapperCol={{ offset: 1 }}
+                              name="gs"
+                              label="大司空概算"
+                              options={[{ value: 'access', label: '查看', disabled: !showCloud }]}
+                            />
+                          </>
+                        )}
+                      </ProFormDependency>
+                    </div>
                     <ProFormSwitch
                       fieldProps={{
                         onChange(checked) {
@@ -288,29 +280,29 @@ const Product = () => {
                       name="showRoad"
                       label={<span className="flex items-center">大司空2.0</span>}
                     />
-                    <ProFormDependency name={['showRoad']}>
-                      {({ showRoad }) => (
-                        <ProFormCheckbox.Group
-                          wrapperCol={{ offset: 1 }}
-                          name="personal"
-                          label="个人版"
-                          options={[{ value: 'access', label: '查看', disabled: !showRoad }]}
-                        />
-                      )}
-                    </ProFormDependency>
-                    <ProFormDependency name={['showRoad']}>
-                      {({ showRoad }) => (
-                        <ProFormCheckbox.Group
-                          wrapperCol={{ offset: 1 }}
-                          name="enterprise"
-                          label="企业版"
-                          options={[
-                            { value: 'access', label: '查看', disabled: !showRoad },
-                            { value: 'add', label: '添加企业', disabled: !showRoad }
-                          ]}
-                        />
-                      )}
-                    </ProFormDependency>
+                    <div className="ml-6">
+                      <ProFormDependency name={['showRoad']}>
+                        {({ showRoad }) => (
+                          <>
+                            <ProFormCheckbox.Group
+                              wrapperCol={{ offset: 1 }}
+                              name="personal"
+                              label="个人版"
+                              options={[{ value: 'access', label: '查看', disabled: !showRoad }]}
+                            />
+                            <ProFormCheckbox.Group
+                              wrapperCol={{ offset: 1 }}
+                              name="enterprise"
+                              label="企业版"
+                              options={[
+                                { value: 'access', label: '查看', disabled: !showRoad },
+                                { value: 'add', label: '添加企业', disabled: !showRoad }
+                              ]}
+                            />
+                          </>
+                        )}
+                      </ProFormDependency>
+                    </div>
                   </ProForm>
                 )}
               </div>