提交 9a26e2aa authored 作者: chscls@163.com's avatar chscls@163.com

新增自定义按钮

上级 97ea6b19
...@@ -21,6 +21,7 @@ export default class TableList extends React.Component { ...@@ -21,6 +21,7 @@ export default class TableList extends React.Component {
isAll:value.isAll, isAll:value.isAll,
querys: value.querys, querys: value.querys,
sql: value.sql, sql: value.sql,
btns:value.btns,
columns:value.columns, columns:value.columns,
} }
} }
......
...@@ -1069,7 +1069,9 @@ class TreeList extends React.Component { ...@@ -1069,7 +1069,9 @@ class TreeList extends React.Component {
valueName, valueName,
notShowBack, notShowBack,
istableCom, // 是否有模板设计器调用 istableCom, // 是否有模板设计器调用
json:{treeSpan} value:{btns},
json:{treeSpan},
loading
} = this.props; } = this.props;
const { const {
showMobileDiv, showMobileDiv,
...@@ -1202,6 +1204,7 @@ class TreeList extends React.Component { ...@@ -1202,6 +1204,7 @@ class TreeList extends React.Component {
{notShowBack ? notShowBack : <Button icon="rollback" type="primary" onClick={this.goBack}> {notShowBack ? notShowBack : <Button icon="rollback" type="primary" onClick={this.goBack}>
返回 返回
</Button>} </Button>}
{btns&&btns.before&&btns.before.length>0?btns.before.map((r)=><Button {...r}/>):""}
{rights && !rights.includes('add') ? '' : {rights && !rights.includes('add') ? '' :
<Button icon="plus" type="primary" onClick={this.add}> <Button icon="plus" type="primary" onClick={this.add}>
新建 新建
...@@ -1228,6 +1231,7 @@ class TreeList extends React.Component { ...@@ -1228,6 +1231,7 @@ class TreeList extends React.Component {
<Button>批量删除</Button></Popconfirm> <Button>批量删除</Button></Popconfirm>
</span> </span>
)} )}
{btns&&btns.before&&btns.before.length>0?btns.before.map((r)=><Button {...r} loading={loading}/>):""}
</div> </div>
{ {
(!istableCom)||(this.props.value&&this.props.value.columns)? (!istableCom)||(this.props.value&&this.props.value.columns)?
......
...@@ -1117,7 +1117,10 @@ class FormList extends React.Component { ...@@ -1117,7 +1117,10 @@ class FormList extends React.Component {
valueName, valueName,
notShowBack, notShowBack,
istableCom, // 是否有模板设计器调用 istableCom, // 是否有模板设计器调用
value:{btns},
loading
} = this.props; } = this.props;
const { showMobileDiv, isView } = this.state; const { showMobileDiv, isView } = this.state;
let scrollWidth = document.documentElement.clientWidth || document.body.clientWidth; //可使宽度 let scrollWidth = document.documentElement.clientWidth || document.body.clientWidth; //可使宽度
...@@ -1280,6 +1283,7 @@ class FormList extends React.Component { ...@@ -1280,6 +1283,7 @@ class FormList extends React.Component {
返回 返回
</Button> </Button>
)} )}
{btns&&btns.before&&btns.before.length>0?btns.before.map((r)=><Button {...r} loading={loading}/>):""}
{rights && !rights.includes('add') ? ( {rights && !rights.includes('add') ? (
'' ''
) : ( ) : (
...@@ -1361,6 +1365,7 @@ class FormList extends React.Component { ...@@ -1361,6 +1365,7 @@ class FormList extends React.Component {
</Button> </Button>
</Popover> </Popover>
)} )}
{btns&&btns.after&&btns.after.length>0?btns.after.map((r)=><Button {...r} loading={loading}/>):""}
</div> </div>
{!istableCom || (this.props.value && this.props.value.columns) ? ( {!istableCom || (this.props.value && this.props.value.columns) ? (
<StandardTable <StandardTable
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论