mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix:补充特性动作的描述
This commit is contained in:
parent
8175a4ca85
commit
512aef23a5
@ -19,9 +19,11 @@ import {ValidatorTag} from '../../validator';
|
|||||||
import {
|
import {
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getActionCommonProps
|
getActionCommonProps,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../../renderer/event-control/helper';
|
} from '../../renderer/event-control/helper';
|
||||||
import {resolveInputTableEventDataSchame} from '../../util';
|
import {resolveInputTableEventDataSchame} from '../../util';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export class ComboControlPlugin extends BasePlugin {
|
export class ComboControlPlugin extends BasePlugin {
|
||||||
static id = 'ComboControlPlugin';
|
static id = 'ComboControlPlugin';
|
||||||
@ -264,6 +266,14 @@ export class ComboControlPlugin extends BasePlugin {
|
|||||||
actionLabel: '添加项',
|
actionLabel: '添加项',
|
||||||
description: '添加新的项',
|
description: '添加新的项',
|
||||||
innerArgs: ['item'],
|
innerArgs: ['item'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
添加项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper({
|
schema: getArgsWrapper({
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
label: '添加项',
|
label: '添加项',
|
||||||
|
@ -25,13 +25,15 @@ import {ValidatorTag} from '../../validator';
|
|||||||
import {
|
import {
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getActionCommonProps
|
getActionCommonProps,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../../renderer/event-control/helper';
|
} from '../../renderer/event-control/helper';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import {
|
import {
|
||||||
resolveArrayDatasource,
|
resolveArrayDatasource,
|
||||||
resolveInputTableEventDataSchame
|
resolveInputTableEventDataSchame
|
||||||
} from '../../util';
|
} from '../../util';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export class TableControlPlugin extends BasePlugin {
|
export class TableControlPlugin extends BasePlugin {
|
||||||
static id = 'TableControlPlugin';
|
static id = 'TableControlPlugin';
|
||||||
@ -960,6 +962,14 @@ export class TableControlPlugin extends BasePlugin {
|
|||||||
actionLabel: '添加行',
|
actionLabel: '添加行',
|
||||||
description: '添加行数据',
|
description: '添加行数据',
|
||||||
innerArgs: ['item', 'index'],
|
innerArgs: ['item', 'index'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
添加行
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper({
|
schema: getArgsWrapper({
|
||||||
type: 'container',
|
type: 'container',
|
||||||
body: [
|
body: [
|
||||||
@ -1028,6 +1038,14 @@ export class TableControlPlugin extends BasePlugin {
|
|||||||
actionLabel: '删除行',
|
actionLabel: '删除行',
|
||||||
description: '删除某一行数据',
|
description: '删除某一行数据',
|
||||||
innerArgs: ['condition', 'index'],
|
innerArgs: ['condition', 'index'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
删除行
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper({
|
schema: getArgsWrapper({
|
||||||
type: 'container',
|
type: 'container',
|
||||||
body: [
|
body: [
|
||||||
@ -1109,12 +1127,30 @@ export class TableControlPlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'initDrag',
|
actionType: 'initDrag',
|
||||||
actionLabel: '开启排序',
|
actionLabel: '开启排序',
|
||||||
description: '开启表格拖拽排序功能'
|
description: '开启表格拖拽排序功能',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
开启
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
排序
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'cancelDrag',
|
actionType: 'cancelDrag',
|
||||||
actionLabel: '取消排序',
|
actionLabel: '取消排序',
|
||||||
description: '取消表格拖拽排序功能'
|
description: '取消表格拖拽排序功能',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
取消
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
排序
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -34,6 +34,15 @@ export const TreeCommonAction: RendererPluginAction[] = [
|
|||||||
actionLabel: '新增',
|
actionLabel: '新增',
|
||||||
description: '新增数据项',
|
description: '新增数据项',
|
||||||
innerArgs: ['item', 'parentValue'],
|
innerArgs: ['item', 'parentValue'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
新增
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
数据项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper({
|
schema: getArgsWrapper({
|
||||||
type: 'container',
|
type: 'container',
|
||||||
body: [
|
body: [
|
||||||
@ -71,6 +80,15 @@ export const TreeCommonAction: RendererPluginAction[] = [
|
|||||||
actionLabel: '编辑',
|
actionLabel: '编辑',
|
||||||
description: '编辑数据项',
|
description: '编辑数据项',
|
||||||
innerArgs: ['item', 'originValue'],
|
innerArgs: ['item', 'originValue'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
编辑
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
数据项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper({
|
schema: getArgsWrapper({
|
||||||
type: 'container',
|
type: 'container',
|
||||||
body: [
|
body: [
|
||||||
@ -109,6 +127,15 @@ export const TreeCommonAction: RendererPluginAction[] = [
|
|||||||
actionLabel: '删除',
|
actionLabel: '删除',
|
||||||
description: '删除数据项',
|
description: '删除数据项',
|
||||||
innerArgs: ['value'],
|
innerArgs: ['value'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
删除
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
数据项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper([
|
schema: getArgsWrapper([
|
||||||
getSchemaTpl('formulaControl', {
|
getSchemaTpl('formulaControl', {
|
||||||
label: '数据删除项的值',
|
label: '数据删除项的值',
|
||||||
|
@ -14,9 +14,11 @@ import {
|
|||||||
import {defaultValue, getSchemaTpl, tipedLabel} from 'amis-editor-core';
|
import {defaultValue, getSchemaTpl, tipedLabel} from 'amis-editor-core';
|
||||||
import {mockValue} from 'amis-editor-core';
|
import {mockValue} from 'amis-editor-core';
|
||||||
import {
|
import {
|
||||||
|
buildLinkActionDesc,
|
||||||
getArgsWrapper,
|
getArgsWrapper,
|
||||||
getEventControlConfig
|
getEventControlConfig
|
||||||
} from '../renderer/event-control/helper';
|
} from '../renderer/event-control/helper';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export class ImagePlugin extends BasePlugin {
|
export class ImagePlugin extends BasePlugin {
|
||||||
static id = 'ImagePlugin';
|
static id = 'ImagePlugin';
|
||||||
@ -119,12 +121,29 @@ export class ImagePlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'preview',
|
actionType: 'preview',
|
||||||
actionLabel: '预览',
|
actionLabel: '预览',
|
||||||
description: '预览图片'
|
description: '预览图片',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
预览
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'zoom',
|
actionType: 'zoom',
|
||||||
actionLabel: '调整图片比例',
|
actionLabel: '调整图片比例',
|
||||||
description: '将图片等比例放大或缩小',
|
description: '将图片等比例放大或缩小',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
调整
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
图片比例
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: {
|
schema: {
|
||||||
type: 'container',
|
type: 'container',
|
||||||
body: [
|
body: [
|
||||||
|
@ -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';
|
||||||
|
|
||||||
export class NavPlugin extends BasePlugin {
|
export class NavPlugin extends BasePlugin {
|
||||||
@ -253,7 +254,16 @@ export class NavPlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'updateItems',
|
actionType: 'updateItems',
|
||||||
actionLabel: '更新菜单项',
|
actionLabel: '更新菜单项',
|
||||||
description: '触发组件更新菜单项'
|
description: '触发组件更新菜单项',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
更新
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
菜单项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'collapse',
|
actionType: 'collapse',
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import {RendererPluginAction, registerEditorPlugin} from 'amis-editor-core';
|
import {RendererPluginAction, registerEditorPlugin} from 'amis-editor-core';
|
||||||
import {BaseEventContext, BasePlugin} from 'amis-editor-core';
|
import {BaseEventContext, BasePlugin} from 'amis-editor-core';
|
||||||
import {defaultValue, getSchemaTpl} from 'amis-editor-core';
|
import {defaultValue, getSchemaTpl} from 'amis-editor-core';
|
||||||
|
import React from 'react';
|
||||||
|
import {buildLinkActionDesc} from '../renderer/event-control';
|
||||||
|
|
||||||
export class OfficeViewerPlugin extends BasePlugin {
|
export class OfficeViewerPlugin extends BasePlugin {
|
||||||
static id = 'OfficeViewerPlugin';
|
static id = 'OfficeViewerPlugin';
|
||||||
@ -32,12 +34,28 @@ export class OfficeViewerPlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'print',
|
actionType: 'print',
|
||||||
actionLabel: '打印',
|
actionLabel: '打印',
|
||||||
description: '打印文档'
|
description: '打印文档',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
打印文档
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'saveAs',
|
actionType: 'saveAs',
|
||||||
actionLabel: '下载',
|
actionLabel: '下载',
|
||||||
description: '下载文档'
|
description: '下载文档',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
下载文档
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import {RendererPluginAction, registerEditorPlugin} from 'amis-editor-core';
|
import {RendererPluginAction, registerEditorPlugin} from 'amis-editor-core';
|
||||||
import {BasePlugin} from 'amis-editor-core';
|
import {BasePlugin} from 'amis-editor-core';
|
||||||
import {defaultValue, getSchemaTpl} from 'amis-editor-core';
|
import {defaultValue, getSchemaTpl} from 'amis-editor-core';
|
||||||
|
import React from 'react';
|
||||||
|
import {buildLinkActionDesc} from '../renderer/event-control';
|
||||||
|
|
||||||
export class QRCodePlugin extends BasePlugin {
|
export class QRCodePlugin extends BasePlugin {
|
||||||
static id = 'QRCodePlugin';
|
static id = 'QRCodePlugin';
|
||||||
@ -29,7 +31,15 @@ export class QRCodePlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'saveAs',
|
actionType: 'saveAs',
|
||||||
actionLabel: '下载',
|
actionLabel: '下载',
|
||||||
description: '触发二维码下载'
|
description: '触发二维码下载',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
下载二维码
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ import {DSBuilderManager} from '../builder/DSBuilderManager';
|
|||||||
import {DSFeatureEnum, ModelDSBuilderKey, ApiDSBuilderKey} from '../builder';
|
import {DSFeatureEnum, ModelDSBuilderKey, ApiDSBuilderKey} from '../builder';
|
||||||
import {
|
import {
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getActionCommonProps
|
getActionCommonProps,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../renderer/event-control/helper';
|
} from '../renderer/event-control/helper';
|
||||||
|
|
||||||
import type {Schema} from 'amis-core';
|
import type {Schema} from 'amis-core';
|
||||||
@ -177,7 +178,16 @@ export class ServicePlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'rebuild',
|
actionType: 'rebuild',
|
||||||
actionLabel: '重新构建',
|
actionLabel: '重新构建',
|
||||||
description: '触发schemaApi刷新,重新构建Schema'
|
description: '触发schemaApi刷新,重新构建Schema',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
重新构建
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
Schema
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'setValue',
|
actionType: 'setValue',
|
||||||
|
@ -29,7 +29,8 @@ import {reaction} from 'mobx';
|
|||||||
import {DSBuilderManager} from '../builder/DSBuilderManager';
|
import {DSBuilderManager} from '../builder/DSBuilderManager';
|
||||||
import {
|
import {
|
||||||
getEventControlConfig,
|
getEventControlConfig,
|
||||||
getArgsWrapper
|
getArgsWrapper,
|
||||||
|
buildLinkActionDesc
|
||||||
} from '../renderer/event-control/helper';
|
} from '../renderer/event-control/helper';
|
||||||
import {
|
import {
|
||||||
schemaArrayFormat,
|
schemaArrayFormat,
|
||||||
@ -453,6 +454,15 @@ export class TablePlugin extends BasePlugin {
|
|||||||
actionLabel: '设置选中项',
|
actionLabel: '设置选中项',
|
||||||
description: '设置表格的选中项',
|
description: '设置表格的选中项',
|
||||||
innerArgs: ['selected'],
|
innerArgs: ['selected'],
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
设置
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
选中项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
schema: getArgsWrapper([
|
schema: getArgsWrapper([
|
||||||
getSchemaTpl('formulaControl', {
|
getSchemaTpl('formulaControl', {
|
||||||
name: 'selected',
|
name: 'selected',
|
||||||
@ -472,17 +482,44 @@ export class TablePlugin extends BasePlugin {
|
|||||||
{
|
{
|
||||||
actionType: 'clearAll',
|
actionType: 'clearAll',
|
||||||
actionLabel: '清空选中项',
|
actionLabel: '清空选中项',
|
||||||
description: '清空表格所有选中项'
|
description: '清空表格所有选中项',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
清空
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
选中项
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'initDrag',
|
actionType: 'initDrag',
|
||||||
actionLabel: '开启排序',
|
actionLabel: '开启排序',
|
||||||
description: '开启表格拖拽排序功能'
|
description: '开启表格拖拽排序功能',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
开启
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
排序
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
actionType: 'cancelDrag',
|
actionType: 'cancelDrag',
|
||||||
actionLabel: '取消排序',
|
actionLabel: '取消排序',
|
||||||
description: '取消表格拖拽排序功能'
|
description: '取消表格拖拽排序功能',
|
||||||
|
descDetail: (info: any, context: any, props: any) => {
|
||||||
|
return (
|
||||||
|
<div className="action-desc">
|
||||||
|
取消
|
||||||
|
{buildLinkActionDesc(props.manager, info)}
|
||||||
|
排序
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user