mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix:修复部分动作无法跳转问题
This commit is contained in:
parent
212acc3564
commit
a3d1092797
@ -31,7 +31,8 @@ import {
|
|||||||
import {
|
import {
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getActionCommonProps
|
getActionCommonProps,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../../renderer/event-control/helper';
|
} from '../../renderer/event-control/helper';
|
||||||
import {CRUD2Schema} from 'amis';
|
import {CRUD2Schema} from 'amis';
|
||||||
import {deepRemove, findObj, findSchema} from './utils';
|
import {deepRemove, findObj, findSchema} from './utils';
|
||||||
@ -117,8 +118,9 @@ export class BaseCRUDPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.__rendererLabel}</span>
|
触发
|
||||||
触发数据查询
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
数据查询
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -138,8 +140,9 @@ export class BaseCRUDPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.__rendererLabel}</span>
|
加载
|
||||||
加载更多数据
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
更多数据
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,10 @@ import {
|
|||||||
defaultValue,
|
defaultValue,
|
||||||
getSchemaTpl
|
getSchemaTpl
|
||||||
} from 'amis-editor-core';
|
} from 'amis-editor-core';
|
||||||
import {getEventControlConfig} from '../renderer/event-control/helper';
|
import {
|
||||||
|
buildLinkActionDesc,
|
||||||
|
getEventControlConfig
|
||||||
|
} from '../renderer/event-control/helper';
|
||||||
import {getActionCommonProps} from '../renderer/event-control/helper';
|
import {getActionCommonProps} from '../renderer/event-control/helper';
|
||||||
|
|
||||||
export class CollapsePlugin extends BasePlugin {
|
export class CollapsePlugin extends BasePlugin {
|
||||||
@ -123,8 +126,8 @@ export class CollapsePlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
|
||||||
展开
|
展开
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import {
|
|||||||
} from 'amis-editor-core';
|
} from 'amis-editor-core';
|
||||||
import type {Schema} from 'amis';
|
import type {Schema} from 'amis';
|
||||||
import {
|
import {
|
||||||
|
buildLinkActionDesc,
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getEventControlConfig
|
getEventControlConfig
|
||||||
} from '../../renderer/event-control/helper';
|
} from '../../renderer/event-control/helper';
|
||||||
@ -200,8 +201,9 @@ export class TreeControlPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.__rendererLabel}</span>
|
展开
|
||||||
展开到第
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
到第
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-left variable-right">
|
||||||
{info?.args?.openLevel}
|
{info?.args?.openLevel}
|
||||||
</span>
|
</span>
|
||||||
@ -226,17 +228,18 @@ export class TreeControlPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
收起
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
{info?.args?.closeLevel ? (
|
{info?.args?.closeLevel ? (
|
||||||
<>
|
<>
|
||||||
收起到第
|
到第
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-left variable-right">
|
||||||
{info?.args?.closeLevel}
|
{info?.args?.closeLevel}
|
||||||
</span>
|
</span>
|
||||||
层
|
层
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
'收起'
|
''
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -289,17 +292,17 @@ export class TreeControlPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
搜索
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
{info?.args?.keyword ? (
|
{info?.args?.keyword ? (
|
||||||
<>
|
<>
|
||||||
搜索
|
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-left variable-right">
|
||||||
{info?.args?.keyword}
|
{info?.args?.keyword}
|
||||||
</span>
|
</span>
|
||||||
的选项
|
的选项
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
'搜索'
|
''
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -12,7 +12,8 @@ import {
|
|||||||
} from 'amis-editor-core';
|
} from 'amis-editor-core';
|
||||||
import {
|
import {
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getActionCommonProps
|
getActionCommonProps,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../../renderer/event-control/helper';
|
} from '../../renderer/event-control/helper';
|
||||||
import {resolveOptionEventDataSchame, resolveOptionType} from '../../util';
|
import {resolveOptionEventDataSchame, resolveOptionType} from '../../util';
|
||||||
|
|
||||||
@ -216,8 +217,9 @@ export class TabsTransferPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.__rendererLabel}</span>
|
修改
|
||||||
修改选中tab
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
选中tab
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import {RegionWrapper as Region} from 'amis-editor-core';
|
|||||||
import {Tab} from 'amis';
|
import {Tab} from 'amis';
|
||||||
import {tipedLabel} from 'amis-editor-core';
|
import {tipedLabel} from 'amis-editor-core';
|
||||||
import {
|
import {
|
||||||
|
buildLinkActionDesc,
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getEventControlConfig
|
getEventControlConfig
|
||||||
} from '../renderer/event-control/helper';
|
} from '../renderer/event-control/helper';
|
||||||
@ -122,7 +123,8 @@ export class TabsPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
激活第
|
激活
|
||||||
|
{buildLinkActionDesc(props.manager, info)}第
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-left variable-right">
|
||||||
{info?.args?.activeKey}
|
{info?.args?.activeKey}
|
||||||
</span>
|
</span>
|
||||||
@ -147,10 +149,12 @@ export class TabsPlugin extends BasePlugin {
|
|||||||
actionType: 'deleteTab',
|
actionType: 'deleteTab',
|
||||||
actionLabel: '删除指定选项卡',
|
actionLabel: '删除指定选项卡',
|
||||||
description: '删除指定hash的tab项',
|
description: '删除指定hash的tab项',
|
||||||
descDetail: (info: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
删除hash为
|
删除
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
hash为
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-left variable-right">
|
||||||
{info?.args?.deleteHash}
|
{info?.args?.deleteHash}
|
||||||
</span>
|
</span>
|
||||||
|
@ -19,7 +19,8 @@ import {
|
|||||||
import {
|
import {
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getActionCommonProps
|
getActionCommonProps,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../renderer/event-control/helper';
|
} from '../renderer/event-control/helper';
|
||||||
|
|
||||||
export class WizardPlugin extends BasePlugin {
|
export class WizardPlugin extends BasePlugin {
|
||||||
@ -261,8 +262,9 @@ export class WizardPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.__rendererLabel}</span>
|
提交
|
||||||
提交当前步骤数据
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
当前步骤数据
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -274,9 +276,11 @@ export class WizardPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
{info?.__rendererName === 'carousel' ? '滚动' : null}
|
||||||
{info?.__rendererName === 'carousel' ? '滚动至上一张' : null}
|
{info?.__rendererName === 'wizard' ? '返回' : null}
|
||||||
{info?.__rendererName === 'wizard' ? '返回前一步' : null}
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
{info?.__rendererName === 'carousel' ? '至上一张' : null}
|
||||||
|
{info?.__rendererName === 'wizard' ? '前一步' : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -288,9 +292,11 @@ export class WizardPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
{info?.__rendererName === 'carousel' ? '滚动' : null}
|
||||||
{info?.__rendererName === 'carousel' ? '滚动至下一张' : null}
|
{info?.__rendererName === 'wizard' ? '提交' : null}
|
||||||
{info?.__rendererName === 'wizard' ? '提交当前步骤数据' : null}
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
{info?.__rendererName === 'carousel' ? '至下一张' : null}
|
||||||
|
{info?.__rendererName === 'wizard' ? '当前步骤数据' : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -303,8 +309,9 @@ export class WizardPlugin extends BasePlugin {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.__rendererLabel}</span>
|
切换
|
||||||
切换到第
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
到第
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-left variable-right">
|
||||||
{info?.args?.step}
|
{info?.args?.step}
|
||||||
</span>
|
</span>
|
||||||
|
@ -3,6 +3,7 @@ import {defaultValue} from 'amis-editor-core';
|
|||||||
import without from 'lodash/without';
|
import without from 'lodash/without';
|
||||||
import {registerActionPanel} from '../../actionsPanelManager';
|
import {registerActionPanel} from '../../actionsPanelManager';
|
||||||
import {renderCmptSelect, renderCmptIdInput} from './helper';
|
import {renderCmptSelect, renderCmptIdInput} from './helper';
|
||||||
|
import {buildLinkActionDesc} from '../../helper';
|
||||||
|
|
||||||
registerActionPanel('staticStatus', {
|
registerActionPanel('staticStatus', {
|
||||||
label: '组件展示态',
|
label: '组件展示态',
|
||||||
@ -14,10 +15,7 @@ registerActionPanel('staticStatus', {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">
|
{buildLinkActionDesc(props.manager, info)}切换为静态展示
|
||||||
{info?.rendererLabel || info.componentId}
|
|
||||||
</span>
|
|
||||||
组件切换为静态
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -536,8 +536,7 @@ export const COMMON_ACTION_SCHEMA_MAP: {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
收起{buildLinkActionDesc(props.manager, info)}
|
||||||
收起
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -546,8 +545,7 @@ export const COMMON_ACTION_SCHEMA_MAP: {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
选中{buildLinkActionDesc(props.manager, info)}所有选项
|
||||||
选中所有选项
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -556,8 +554,7 @@ export const COMMON_ACTION_SCHEMA_MAP: {
|
|||||||
descDetail: (info: any, context: any, props: any) => {
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
return (
|
return (
|
||||||
<div className="action-desc">
|
<div className="action-desc">
|
||||||
<span className="variable-right">{info?.rendererLabel}</span>
|
获取{buildLinkActionDesc(props.manager, info)}焦点
|
||||||
获取焦点
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user