mirror of
https://github.com/YMFE/yapi.git
synced 2025-03-07 14:16:52 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
fdc4a97f16
@ -191,7 +191,7 @@ class MemberList extends Component {
|
||||
</div>);
|
||||
}
|
||||
}, {
|
||||
title: (this.state.role === 'owner' || this.state.role === 'admin') ? <div className="btn-container"><Button className="btn" type="primary" icon="plus" onClick={this.showAddMemberModal}>添加成员</Button></div> : '',
|
||||
title: (this.state.role === 'owner' || this.state.role === 'admin') ? <div className="btn-container"><Button className="btn" type="primary" onClick={this.showAddMemberModal}>添加成员</Button></div> : '',
|
||||
key: 'action',
|
||||
className: 'member-opration',
|
||||
render: (text, record) => {
|
||||
|
@ -41,7 +41,7 @@ class AddInterfaceForm extends Component {
|
||||
|
||||
<Form onSubmit={this.handleSubmit}>
|
||||
<FormItem
|
||||
{...formItemLayout}
|
||||
{...formItemLayout}
|
||||
label="分类名"
|
||||
>
|
||||
{getFieldDecorator('name', {
|
||||
@ -55,8 +55,7 @@ class AddInterfaceForm extends Component {
|
||||
</FormItem>
|
||||
|
||||
|
||||
<br />
|
||||
<FormItem wrapperCol={{ span: 24, offset: 8 }} >
|
||||
<FormItem className="catModalfoot" wrapperCol={{ span: 24, offset: 8 }} >
|
||||
<Button onClick={this.props.onCancel} style={{marginRight: "10px"}} >取消</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
|
@ -103,8 +103,7 @@ class AddInterfaceForm extends Component {
|
||||
<Input onBlur={this.handlePath} addonBefore={prefixSelector} placeholder="/path" />
|
||||
)}
|
||||
</FormItem>
|
||||
<br />
|
||||
<FormItem wrapperCol={{ span: 24, offset: 8 }} >
|
||||
<FormItem className="catModalfoot" wrapperCol={{ span: 24, offset: 8 }} >
|
||||
<Button onClick={this.props.onCancel} style={{ marginRight: "10px" }} >取消</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
|
@ -188,6 +188,7 @@ class InterfaceList extends Component {
|
||||
visible={this.state.visible}
|
||||
onCancel={() => this.setState({ 'visible': false })}
|
||||
footer={null}
|
||||
className="addcatmodal"
|
||||
>
|
||||
<AddInterfaceForm catid={this.state.catid} catdata={this.props.curProject.cat} onCancel={() => this.setState({ 'visible': false })} onSubmit={this.handleAddInterface} />
|
||||
</Modal>
|
||||
|
@ -259,6 +259,7 @@ class InterfaceMenu extends Component {
|
||||
visible={this.state.visible}
|
||||
onCancel={() => this.changeModal('visible', false)}
|
||||
footer={null}
|
||||
className="addcatmodal"
|
||||
>
|
||||
<AddInterfaceForm catdata={this.props.curProject.cat} catid={this.state.curCatid} onCancel={() => this.changeModal('visible', false)} onSubmit={this.handleAddInterface} />
|
||||
</Modal>
|
||||
@ -268,6 +269,7 @@ class InterfaceMenu extends Component {
|
||||
visible={this.state.add_cat_modal_visible}
|
||||
onCancel={() => this.changeModal('add_cat_modal_visible', false)}
|
||||
footer={null}
|
||||
className="addcatmodal"
|
||||
>
|
||||
<AddInterfaceCatForm onCancel={() => this.changeModal('add_cat_modal_visible', false)} onSubmit={this.handleAddInterfaceCat} />
|
||||
</Modal>
|
||||
@ -277,6 +279,7 @@ class InterfaceMenu extends Component {
|
||||
visible={this.state.change_cat_modal_visible}
|
||||
onCancel={() => this.changeModal('change_cat_modal_visible', false)}
|
||||
footer={null}
|
||||
className="addcatmodal"
|
||||
>
|
||||
<AddInterfaceCatForm catdata={this.state.curCatdata} onCancel={() => this.changeModal('change_cat_modal_visible', false)} onSubmit={this.handleChangeInterfaceCat} />
|
||||
</Modal>
|
||||
|
@ -239,3 +239,25 @@
|
||||
tr:nth-child(even){background: #fff;}
|
||||
}
|
||||
}
|
||||
.addcatmodal{
|
||||
.ant-modal-body{
|
||||
padding: 10px 0px;
|
||||
.ant-form-item{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.catModalfoot{
|
||||
border-top: 1px solid #e9e9e9;
|
||||
margin-bottom: 0px;
|
||||
padding-top: 10px;
|
||||
margin-top: 0px;
|
||||
.ant-form-item-control-wrapper{
|
||||
margin-left: 0px;
|
||||
}
|
||||
.ant-form-item-control {
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -49,7 +49,8 @@ class ProjectMessage extends Component {
|
||||
super(props);
|
||||
this.state = {
|
||||
protocol: 'http:\/\/',
|
||||
projectMsg: {}
|
||||
projectMsg: {},
|
||||
showDangerOptions: false
|
||||
}
|
||||
}
|
||||
static propTypes = {
|
||||
@ -139,6 +140,14 @@ class ProjectMessage extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
// 点击“查看危险操作”按钮
|
||||
toggleDangerOptions = () => {
|
||||
// console.log(this.state.showDangerOptions);
|
||||
this.setState({
|
||||
showDangerOptions: !this.state.showDangerOptions
|
||||
});
|
||||
}
|
||||
|
||||
async componentWillMount() {
|
||||
await this.props.getProjectMsg(this.props.projectId);
|
||||
const groupMsg = await this.props.fetchGroupMsg(this.props.projectMsg.group_id);
|
||||
@ -288,19 +297,20 @@ class ProjectMessage extends Component {
|
||||
|
||||
{/* 只有组长和管理员有权限删除项目 */}
|
||||
{projectMsg.role === 'owner' || projectMsg.role === 'admin' ?
|
||||
<FormItem
|
||||
{...formItemLayout}
|
||||
label="危险操作"
|
||||
className="danger-container"
|
||||
>
|
||||
<Card noHovering={true} className="card-danger">
|
||||
<div className="danger-container">
|
||||
<div className="title">
|
||||
<h2 className="content"><Icon type="exclamation-circle-o" /> 危险操作</h2>
|
||||
<Button onClick={this.toggleDangerOptions}>查 看<Icon type={this.state.showDangerOptions ? 'up' : 'down'} /></Button>
|
||||
</div>
|
||||
{this.state.showDangerOptions ? <Card noHovering={true} className="card-danger">
|
||||
<div className="card-danger-content">
|
||||
<h3>删除项目</h3>
|
||||
<p>项目一旦删除,将无法恢复数据,请慎重操作!</p>
|
||||
<p>只有组长和管理员有权限删除项目。</p>
|
||||
</div>
|
||||
<Button type="danger" ghost className="card-danger-btn" onClick={this.showConfirm}>删除</Button>
|
||||
</Card>
|
||||
</FormItem> : null}
|
||||
</Card> : null}
|
||||
</div> : null}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -193,9 +193,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 环境配置中首个item的删除按钮定位调整
|
||||
.env-first-row {
|
||||
.ant-col-2 {
|
||||
position: relative;
|
||||
bottom: .16rem;
|
||||
}
|
||||
}
|
||||
|
||||
// 危险操作
|
||||
.danger-container {
|
||||
.title {
|
||||
margin-bottom: .48rem;
|
||||
text-align: center;
|
||||
.content {
|
||||
color: rgba(39, 56, 72, 0.65);
|
||||
margin-bottom: .16rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ class List extends Component {
|
||||
title: '更新日期',
|
||||
dataIndex: 'up_time',
|
||||
key: 'up_time',
|
||||
width: 150
|
||||
width: 160
|
||||
}, {
|
||||
title: '功能',
|
||||
key: 'action',
|
||||
|
@ -168,9 +168,9 @@ em {
|
||||
}
|
||||
|
||||
// 页面级底部固定 需要添加padding以保证页面底部不被覆盖
|
||||
.has-affix-footer {
|
||||
padding-bottom: .92rem;
|
||||
}
|
||||
// .has-affix-footer {
|
||||
// padding-bottom: .92rem;
|
||||
// }
|
||||
|
||||
.popover-index {
|
||||
max-width: 3.2rem;
|
||||
|
@ -3,6 +3,8 @@
|
||||
<head>
|
||||
<meta id="cross-request-sign" charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="keywords" content="yapi接口管理,api管理,接口管理,api,接口,接口文档,api文档,接口管理系统" />
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。" />
|
||||
<title>YApi-高效、易用、功能强大的可视化接口管理平台</title>
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/image/favicon.png">
|
||||
<link rel="stylesheet" href="http://127.0.0.1:4000/prd/index@dev.css">
|
||||
|
@ -3,6 +3,8 @@
|
||||
<head>
|
||||
<meta id="cross-request-sign" charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="keywords" content="yapi接口管理,api管理,接口管理,api,接口,接口文档,api文档,接口管理系统" />
|
||||
<meta name="description" content="YApi 是高效、易用、功能强大的 api 管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。可以帮助开发者轻松创建、发布、维护 API,YApi 还为用户提供了优秀的交互体验,开发人员只需利用平台提供的接口数据写入工具以及简单的点击操作就可以实现接口的管理。" />
|
||||
<title>YApi-高效、易用、功能强大的可视化接口管理平台</title>
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/image/favicon.png">
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user