Skip to content

Commit

Permalink
fix: 问题处理
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Dec 26, 2023
1 parent b8649a2 commit 383c87d
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ImplementWidgetProps } from '@antv/li-sdk';
import classNames from 'classnames';
import Quill from 'quill';
import 'quill/dist/quill.snow.css';
import React, { useEffect, useMemo, useRef } from 'react';
import React, { useEffect, useRef } from 'react';
import type { Properties } from './registerForm';
import useStyle from './style';

Expand All @@ -12,7 +12,7 @@ const CLS_PREFIX = 'li-analysis-app-introduction';
export interface AppIntroductionControlProps extends Properties, ImplementWidgetProps {}

const AppIntroductionControl: React.FC<AppIntroductionControlProps> = (props) => {
const { position, width, height, content } = props;
const { position, width, content } = props;
const styles = useStyle();
const informationRef = useRef<HTMLDivElement>(null);
const quillRef = useRef<Quill>();
Expand All @@ -34,7 +34,7 @@ const AppIntroductionControl: React.FC<AppIntroductionControlProps> = (props) =>

return (
<CustomControl position={position} className={classNames(styles.appIntroduction, CLS_PREFIX)}>
<div style={{ width, height, overflow: 'hidden' }} ref={informationRef} />
<div style={{ width }} ref={informationRef} />
</CustomControl>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default implementWidget({
},
defaultProperties: {
position: 'topright' as const,
width: 300,
},
component,
registerForm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { WidgetRegisterForm } from '@antv/li-sdk';
export type Properties = {
position?: PositionName;
width?: number;
height?: number;
content?: any;
};

Expand All @@ -23,19 +22,7 @@ export default (): WidgetRegisterForm<Properties> => {
width: {
title: '宽度',
type: 'string',
default: 100,
'x-decorator': 'FormItem',
'x-component': 'NumberPicker',
'x-component-props': {
addonAfter: 'px',
min: 0,
precision: 0,
},
},
height: {
title: '高度',
type: 'string',
default: 150,
default: 300,
'x-decorator': 'FormItem',
'x-component': 'NumberPicker',
'x-component-props': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ function useStyle() {
return {
appIntroduction: css`
background-color: ${colorBgContainer};
.ql-editor {
overflow: hidden;
}
.ql-tooltip {
display: none;
}
`,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const Editor: React.FC<EditorProps> = (props) => {
placement="bottom"
arrow={false}
destroyTooltipOnHide={true}
// 渲染父节点上
onOpenChange={(open: boolean) => setOpen(open)}
getPopupContainer={() => editorContainerRef.current!}
/>
</div>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ export default genStyleHook('rich-editor', (token) => {
},
},

[`${componentCls}__popover`]: {},

[`${componentCls}__popover__content`]: {
background: colorBgElevated,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const InternalRichTextEditing: React.FC<InternalRichTextEditingProps> = (props)
open={isModalOpen}
onOk={handleOk}
onCancel={handleCancel}
width={1000}
width={800}
>
<Editor value={value} onChange={onSubmit} />
</Modal>
Expand Down

0 comments on commit 383c87d

Please sign in to comment.