wenlele
9 months ago
9 changed files with 157 additions and 42 deletions
@ -0,0 +1,58 @@ |
|||||
|
import React, { useState, useEffect } from 'react'; |
||||
|
import { connect } from 'react-redux'; |
||||
|
import { v4 } from 'uuid'; |
||||
|
import moment from 'moment'; |
||||
|
import { Form, Input, Modal, Select, Row, Col, message } from 'antd'; |
||||
|
const { TextArea } = Input; |
||||
|
|
||||
|
|
||||
|
const Replacement = ({ dispatch, actions, user, close, onOk, }) => { |
||||
|
|
||||
|
const [form] = Form.useForm(); |
||||
|
|
||||
|
|
||||
|
return ( |
||||
|
<Modal |
||||
|
// className="global-modal"
|
||||
|
title={'重置密码'} |
||||
|
width={470} |
||||
|
open={true} |
||||
|
onOk={() => { |
||||
|
form.validateFields().then(v => { |
||||
|
onOk(v) |
||||
|
}) |
||||
|
}} |
||||
|
onCancel={() => close()} |
||||
|
> |
||||
|
<Form |
||||
|
style={{}} |
||||
|
form={form} |
||||
|
labelAlign='right' |
||||
|
labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} |
||||
|
onFinish={r => { |
||||
|
}} |
||||
|
> |
||||
|
|
||||
|
<Form.Item label='发布密码' name='password' |
||||
|
rules={[{ required: true, }, { pattern: /^[a-zA-Z0-9]+$/, message: "请输入发布密码,至少6位数字或字母" }]} |
||||
|
> |
||||
|
<Input.Password autocomplete='new-password' onPaste={e => { |
||||
|
e.preventDefault(); |
||||
|
}} style={{ width: 150 }} placeholder='请输入发布密码' /> |
||||
|
</Form.Item> |
||||
|
</Form> |
||||
|
</Modal> |
||||
|
|
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
function mapStateToProps (state) { |
||||
|
const { auth, global } = state; |
||||
|
return { |
||||
|
user: auth.user, |
||||
|
actions: global.actions, |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
export default connect(mapStateToProps)(Replacement); |
Loading…
Reference in new issue