账号管理 - 业务逻辑

1 功能分析
1 查询 + 重置 --> 没有问题  [ 找到属于这部分内容的代码 ]

2 新增 + 导入 --> [ 搞懂新增单独的组件页面 ]

3 批量操作 --> [ 结合执法仪管理 ]

4 修改密码等多个功能连接
2 代码分析 — import 部分
import React,{ createRef } from 'react'
import {connect} from 'dva'
import ___ from '@/utils/i18n'
import { Select } from 'antd'
import moment from 'moment'
import md5 from 'js-md5'

import ProTable from '@ant-design/pro-table';
import ProProvider from '@ant-design/pro-provider';
import ExcelBar from '@/components/Excel/Bar'
import PageHeaderWrapper from '@/components/PageHeaderWrapper'
import UnitTree from '@/components/SearchForm/UnitTree'
import CreatePlatForm from './components/CreatePlatformForm'
import OnlinePlatformAccount from './components/OnlinePlatformAccount'

import Icon from '@ant-design/icons'
import {Menu, Divider, Dropdown, Button, Modal, message, Form, Input, DatePicker} from 'antd'
import {PlusOutlined, ImportOutlined} from '@ant-design/icons'
import { query } from '@/services/userApi'


UI 组件相关
1 Ref 相关使用 -- ProComponents
----------------------------------------------------------------------------------
  import React from 'react'

  class XX extends React.Component {
    ref = React.createRef()   // 1 创建 Ref
	hh = () => ref.current.reload()   // 2 刷新列表数据的方法 -- 还有很多方法

	render() {
	  return (
	    <div>
	      <ProTable actionRef={this.ref} />   // 用于触发刷新操作等, 许多组件标签内部, 需要传入这个
	      <ProDescriptions actionRef={ref} />   // 函数式组件
	      <ProDescriptions actionRef={(ref) => (this.ref = ref)} />   // class
	    </div>
	  )
	}
  }

  ### 文档 --> ProComponents -> ActionRef
----------------------------------------------------------------------------------


2 Ref 相关使用 (表单域) -- Ant Design
----------------------------------------------------------------------------------
  1 函数式组件
    const [form] = Form.useForm()
    form.setFieldsValue()

  2 class 组件
    formRef = React.createRef()
    this.formRef.current.setFieldsValue()
----------------------------------------------------------------------------------
文档怪异行为 — 临时记录
文档 --> const ref = useRef<ActionType>()   // 真的不是很懂
实际 --> const ref = React.createRef()


自我理解
组件标签的 API, 说白了就是, 组件通信 --> 作用就是 --> 在使用组件的时候, 传入需要的参数
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值