xieyonghong 2 anni fa
parent
commit
8f168aca3e

+ 4 - 2
src/components/FMonacoEditor/index.tsx

@@ -3,7 +3,9 @@ import { connect, mapProps } from '@formily/react';
 import { useCallback, useEffect, useRef, useState } from 'react';
 import type { MonacoEditorProps } from 'react-monaco-editor/lib/types';
 
-interface Props extends MonacoEditorProps {}
+interface Props extends MonacoEditorProps {
+  warpStyle?: any
+}
 
 export const JMonacoEditor = (props: Props) => {
   const [loading, setLoading] = useState(false);
@@ -36,7 +38,7 @@ export const JMonacoEditor = (props: Props) => {
           setLoading(true);
         }, 100);
       }}
-      style={{ height: '100%', width: '100%' }}
+      style={{ height: '100%', width: '100%', ...(props.warpStyle || {}) }}
     >
       {loading && (
         <MonacoEditor

+ 3 - 3
src/pages/notice/Config/Detail/index.tsx

@@ -805,8 +805,8 @@ const Detail = observer(() => {
   return (
     <PageContainer>
       <Card>
-        <Row>
-          <Col span={10}>
+        <Row gutter={24}>
+          <Col span={12}>
             <Form className={styles.form} form={form} layout={'vertical'}>
               <SchemaField scope={{ useAsyncDataSource, getTypes }} schema={schema} />
               <FormButtonGroup.Sticky>
@@ -823,7 +823,7 @@ const Detail = observer(() => {
               </FormButtonGroup.Sticky>
             </Form>
           </Col>
-          <Col span={12} push={2}>
+          <Col span={12}>
             {docMap?.[typeItem]?.[providerItem]}
           </Col>
         </Row>

+ 6 - 3
src/pages/notice/Template/Detail/index.tsx

@@ -1529,6 +1529,9 @@ const Detail = observer(() => {
                   height: 250,
                   theme: 'vs',
                   language: 'json',
+                  warpStyle: {
+                    border: "1px solid #d9d9d9"
+                  },
                   editorDidMount: (editor1: any) => {
                     editor1.onDidScrollChange?.(() => {
                       editor1.getAction('editor.action.formatDocument').run();
@@ -1755,8 +1758,8 @@ const Detail = observer(() => {
   return (
     <PageContainer>
       <Card>
-        <Row>
-          <Col span={10}>
+        <Row gutter={24}>
+          <Col span={12}>
             <Form className={styles.form} form={form} layout={'vertical'}>
               <SchemaField
                 schema={schema}
@@ -1789,7 +1792,7 @@ const Detail = observer(() => {
               </FormButtonGroup.Sticky>
             </Form>
           </Col>
-          <Col span={12} push={2}>
+          <Col span={12}>
             {docMap?.[typeItem]?.[providerItem]}
           </Col>
         </Row>