mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
优化提示 amis-saas-8098
Change-Id: I2ac257a3f0b2dbf2946020a646b2796ce5f69692
This commit is contained in:
parent
f1cc039081
commit
e4832f9adf
@ -2,13 +2,14 @@
|
|||||||
* 动作配置面板
|
* 动作配置面板
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {PluginActions, RendererPluginAction} from 'amis-editor-core';
|
import {PluginActions, RendererPluginAction, tipedLabel} from 'amis-editor-core';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {ActionConfig, ComponentInfo} from './types';
|
import {ActionConfig, ComponentInfo} from './types';
|
||||||
import ActionConfigPanel from './action-config-panel';
|
import ActionConfigPanel from './action-config-panel';
|
||||||
import {BASE_ACTION_PROPS} from './comp-action-select';
|
import {BASE_ACTION_PROPS} from './comp-action-select';
|
||||||
import {findActionNode} from './helper';
|
import {findActionNode} from './helper';
|
||||||
import {PlainObject, SchemaNode} from 'amis-core';
|
import {PlainObject, SchemaNode} from 'amis-core';
|
||||||
|
import {getSchemaTpl} from 'amis-model-design';
|
||||||
|
|
||||||
interface ActionDialogProp {
|
interface ActionDialogProp {
|
||||||
show: boolean;
|
show: boolean;
|
||||||
@ -282,15 +283,13 @@ export default class ActionDialog extends React.Component<ActionDialogProp> {
|
|||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: 'stopPropagation',
|
// name: 'stopPropagation',
|
||||||
// label: '阻断条件',
|
// label: tipedLabel('阻断条件', '满足条件时,将会阻断当前事件的后续动作的执行'),
|
||||||
// type: 'ae-expressionFormulaControl',
|
// type: 'ae-expressionFormulaControl',
|
||||||
// evalMode: true,
|
// evalMode: true,
|
||||||
// variables: '${variables}',
|
// variables: '${variables}',
|
||||||
// mode: 'horizontal',
|
// mode: 'horizontal',
|
||||||
// size: 'lg',
|
// size: 'lg',
|
||||||
// visibleOn: 'data.actionType',
|
// visibleOn: 'data.actionType'
|
||||||
// description:
|
|
||||||
// '满足条件时,将会阻断当前事件的后续动作的执行'
|
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
name: 'expression',
|
name: 'expression',
|
||||||
|
@ -2,8 +2,10 @@ import {Button} from 'amis';
|
|||||||
import {
|
import {
|
||||||
defaultValue,
|
defaultValue,
|
||||||
getSchemaTpl,
|
getSchemaTpl,
|
||||||
RendererPluginAction
|
RendererPluginAction,
|
||||||
|
tipedLabel
|
||||||
} from 'amis-editor-core';
|
} from 'amis-editor-core';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {normalizeApi} from 'amis-core';
|
import {normalizeApi} from 'amis-core';
|
||||||
import {
|
import {
|
||||||
@ -511,24 +513,17 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
{
|
{
|
||||||
name: 'options',
|
name: 'options',
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
label: false,
|
label: tipedLabel('静默请求', '开启后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'),
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'checkbox',
|
type: 'switch',
|
||||||
name: 'silent',
|
name: 'silent',
|
||||||
option: '静默模式',
|
label: false,
|
||||||
mode: 'inline',
|
onText: '开启',
|
||||||
className: 'm-r-none',
|
offText: '关闭',
|
||||||
value: false,
|
mode: 'horizontal',
|
||||||
remark: {
|
pipeIn: defaultValue(false)
|
||||||
className: 'ae-BaseRemark',
|
|
||||||
icon: 'fa fa-question-circle',
|
|
||||||
shape: 'circle',
|
|
||||||
placement: 'left',
|
|
||||||
content:
|
|
||||||
'勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -737,7 +732,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
descDetail: (info: any) => {
|
descDetail: (info: any) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-right">
|
||||||
{info?.rendererLabel}
|
{info?.rendererLabel}
|
||||||
</span>
|
</span>
|
||||||
组件切换为静态
|
组件切换为静态
|
||||||
@ -750,7 +745,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
descDetail: (info: any) => {
|
descDetail: (info: any) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<span className="variable-left variable-right">
|
<span className="variable-right">
|
||||||
{info?.rendererLabel}
|
{info?.rendererLabel}
|
||||||
</span>
|
</span>
|
||||||
组件切换为输入态
|
组件切换为输入态
|
||||||
@ -815,14 +810,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
{
|
{
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
name: '__resetPage',
|
name: '__resetPage',
|
||||||
label: '重置页码',
|
label: tipedLabel('重置页码', '选择“是”时,将重新请求第一页数据。'),
|
||||||
labelRemark: {
|
|
||||||
className: 'm-l-xs',
|
|
||||||
icon: 'fa fa-question-circle',
|
|
||||||
rootClose: true,
|
|
||||||
content: '选择“是”时,将重新请求第一页数据。',
|
|
||||||
placement: 'top'
|
|
||||||
},
|
|
||||||
onText: '是',
|
onText: '是',
|
||||||
offText: '否',
|
offText: '否',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
@ -832,14 +820,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
{
|
{
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
name: '__addParam',
|
name: '__addParam',
|
||||||
label: '追加数据',
|
label: tipedLabel('追加数据', '当选择“是”,且目标组件是增删改查组件时,数据接口请求时将带上这些数据,其他类型的目标组件只有在数据接口是post请求时才会带上这些数据。'),
|
||||||
labelRemark: {
|
|
||||||
className: 'm-l-xs',
|
|
||||||
icon: 'fa fa-question-circle',
|
|
||||||
rootClose: true,
|
|
||||||
content: `当选择“是”,且目标组件是增删改查组件时,数据接口请求时将带上这些数据,其他类型的目标组件只有在数据接口是post请求时才会带上这些数据。`,
|
|
||||||
placement: 'top'
|
|
||||||
},
|
|
||||||
onText: '是',
|
onText: '是',
|
||||||
offText: '否',
|
offText: '否',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
@ -849,14 +830,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
{
|
{
|
||||||
type: 'switch',
|
type: 'switch',
|
||||||
name: '__customData',
|
name: '__customData',
|
||||||
label: '自定义数据',
|
label: tipedLabel('自定义数据', '数据默认为源组件所在数据域,开启“自定义”可以定制所需数据'),
|
||||||
labelRemark: {
|
|
||||||
className: 'm-l-xs',
|
|
||||||
icon: 'fa fa-question-circle',
|
|
||||||
rootClose: true,
|
|
||||||
content: `数据默认为源组件所在数据域,开启“自定义”可以定制所需数据`,
|
|
||||||
placement: 'top'
|
|
||||||
},
|
|
||||||
onText: '是',
|
onText: '是',
|
||||||
offText: '否',
|
offText: '否',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
@ -957,14 +931,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
type: 'radios',
|
type: 'radios',
|
||||||
name: 'dataMergeMode',
|
name: 'dataMergeMode',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
label: '追加方式',
|
label: tipedLabel('追加方式', '选择“合并”时,会将数据合并到目标组件的数据域。<br/>选择“覆盖”时,数据会直接覆盖目标组件的数据域。'),
|
||||||
labelRemark: {
|
|
||||||
className: 'm-l-xs',
|
|
||||||
icon: 'fa fa-question-circle',
|
|
||||||
rootClose: true,
|
|
||||||
content: `选择“合并”时,会将数据合并到目标组件的数据域。<br/>选择“覆盖”时,数据会直接覆盖目标组件的数据域。`,
|
|
||||||
placement: 'top'
|
|
||||||
},
|
|
||||||
pipeIn: defaultValue('merge'),
|
pipeIn: defaultValue('merge'),
|
||||||
visibleOn: `data.__addParam && data.actionType === "reload" && ${IS_DATA_CONTAINER}`,
|
visibleOn: `data.__addParam && data.actionType === "reload" && ${IS_DATA_CONTAINER}`,
|
||||||
options: [
|
options: [
|
||||||
|
Loading…
Reference in New Issue
Block a user