mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
移除 window.alert 提示. 修复 tinymce 弹窗内菜单展示问题.
This commit is contained in:
parent
7f11c804d0
commit
ffc9e3d09a
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
.ruby-version
|
||||
test.sass
|
||||
npm-debug.log
|
||||
yarn.lock
|
||||
|
||||
# Folders
|
||||
.idea/
|
||||
|
6
scss/components/form/_tinymce.scss
Normal file
6
scss/components/form/_tinymce.scss
Normal file
@ -0,0 +1,6 @@
|
||||
.tox-tinymce-aux {
|
||||
z-index: $zindex-modal;
|
||||
}
|
||||
.tox-fullscreen .tox.tox-tinymce-aux {
|
||||
z-index: $zindex-modal;
|
||||
}
|
@ -551,6 +551,7 @@ $Satus-icon-width: px2rem(14px);
|
||||
@import '../components/form/file';
|
||||
@import '../components/form/editor';
|
||||
@import '../components/form/rich-text';
|
||||
@import '../components/form/tinymce';
|
||||
@import '../components/form/range';
|
||||
@import '../components/form/repeat';
|
||||
@import '../components/form/tree';
|
||||
|
@ -234,6 +234,7 @@ pre {
|
||||
@import '../components/form/file';
|
||||
@import '../components/form/editor';
|
||||
@import '../components/form/rich-text';
|
||||
@import '../components/form/tinymce';
|
||||
@import '../components/form/range';
|
||||
@import '../components/form/repeat';
|
||||
@import '../components/form/tree';
|
||||
|
@ -97,6 +97,7 @@ $Form-input-borderColor: #cfdadd;
|
||||
@import '../components/form/file';
|
||||
@import '../components/form/editor';
|
||||
@import '../components/form/rich-text';
|
||||
@import '../components/form/tinymce';
|
||||
@import '../components/form/range';
|
||||
@import '../components/form/repeat';
|
||||
@import '../components/form/tree';
|
||||
|
@ -30,7 +30,7 @@ export interface ScopedComponentType extends React.Component<RendererProps> {
|
||||
}
|
||||
|
||||
export interface IScopedContext {
|
||||
parent?: AlisIScopedContext;
|
||||
parent?: AliasIScopedContext;
|
||||
registerComponent: (component: ScopedComponentType) => void;
|
||||
unRegisterComponent: (component: ScopedComponentType) => void;
|
||||
getComponentByName: (name: string) => ScopedComponentType;
|
||||
@ -39,12 +39,12 @@ export interface IScopedContext {
|
||||
send: (target: string, ctx: RendererData) => void;
|
||||
close: (target: string) => void;
|
||||
}
|
||||
type AlisIScopedContext = IScopedContext;
|
||||
type AliasIScopedContext = IScopedContext;
|
||||
export const ScopedContext = React.createContext(createScopedTools(''));
|
||||
|
||||
function createScopedTools(
|
||||
path?: string,
|
||||
parent?: AlisIScopedContext,
|
||||
parent?: AliasIScopedContext,
|
||||
env?: RendererEnv
|
||||
): IScopedContext {
|
||||
const components: Array<ScopedComponentType> = [];
|
||||
|
@ -846,7 +846,7 @@ export default class ImageControl extends React.Component<
|
||||
|
||||
[].slice.call(files, 0, allowed).forEach((file: FileX) => {
|
||||
if (maxSize && file.size > maxSize) {
|
||||
alert(
|
||||
this.props.env.alert(
|
||||
__(
|
||||
'您选择的文件 {{filename}} 大小为 {{actualSize}} 超出了最大为 {{maxSize}} 的限制,请重新选择。',
|
||||
{
|
||||
|
@ -241,7 +241,7 @@ export default class Task extends React.Component<TaskProps, TaskState> {
|
||||
}
|
||||
|
||||
if (interval && !isEffectiveApi(checkApi)) {
|
||||
return alert('checkApi 没有设置, 不能及时获取任务状态');
|
||||
return env.alert('checkApi 没有设置, 不能及时获取任务状态');
|
||||
}
|
||||
|
||||
isEffectiveApi(checkApi, data) &&
|
||||
@ -254,7 +254,7 @@ export default class Task extends React.Component<TaskProps, TaskState> {
|
||||
|
||||
handleLoaded(ret: Payload) {
|
||||
if (!Array.isArray(ret.data)) {
|
||||
return alert(
|
||||
return this.props.env.alert(
|
||||
'返回格式不正确, 期望 response.data 为数组, 包含每个 task 的状态信息'
|
||||
);
|
||||
}
|
||||
@ -279,9 +279,9 @@ export default class Task extends React.Component<TaskProps, TaskState> {
|
||||
} = this.props;
|
||||
|
||||
if (!retry && !isEffectiveApi(submitApi)) {
|
||||
return alert('submitApi 没有配置');
|
||||
return env.alert('submitApi 没有配置');
|
||||
} else if (retry && !isEffectiveApi(reSubmitApi)) {
|
||||
return alert('reSubmitApi 没有配置');
|
||||
return env.alert('reSubmitApi 没有配置');
|
||||
}
|
||||
|
||||
this.setState(
|
||||
|
@ -127,10 +127,10 @@ export interface PlainObject {
|
||||
|
||||
export interface RendererData {
|
||||
[propsName: string]: any;
|
||||
__prev?: RendererDataAlis;
|
||||
__prev?: RendererDataAlias;
|
||||
__super?: RendererData;
|
||||
}
|
||||
type RendererDataAlis = RendererData;
|
||||
type RendererDataAlias = RendererData;
|
||||
|
||||
export type FunctionPropertyNames<T> = {
|
||||
[K in keyof T]: T[K] extends Function ? K : never;
|
||||
|
Loading…
Reference in New Issue
Block a user