outaozhen vor 5 Jahren
Ursprung
Commit
a928c74729

+ 40 - 0
src/components/Editcell/index.jsx

@@ -0,0 +1,40 @@
+import { Input,Form } from 'antd'
+import React, { useContext, useState, useEffect, useRef } from 'react'
+import { connect } from 'dva'
+
+const Editcell = props => {
+  const { options, dispatch, onSelect } = props
+  useEffect(() => {
+    if (!options.length) {
+      dispatch({
+        type: 'district/fetch'
+      })
+    }
+  }, [])
+
+  return (
+    <div>
+      <Form
+        name="basic"
+      >
+        <Form.Item
+          label="Username"
+          name="username"
+        >
+          <Input />
+        </Form.Item>
+        <Form.Item
+          label="Password"
+          name="Password"
+        >
+          <Input.Password />
+        </Form.Item>
+      </Form>
+    </div>
+  )
+}
+
+export default connect(({ district, loading }) => ({
+  options: district.data,
+  loadingDistrict: loading.effects['district/fetch']
+}))(Editcell)

+ 2 - 1
src/components/PopContent/Contacts/ContanctForm.jsx

@@ -1,9 +1,10 @@
 import { Form, Row, Col, Input, Button, Cascader, Select, Tag } from 'antd'
-import React, { useEffect } from 'react'
+import React, { useEffect,useRef,useState } from 'react'
 // eslint-disable-next-line import/no-unresolved
 // import '../Contacts/index.scss'
 
 const ContanctForm = props => {
+  const actionRef = useRef()
   const [form] = Form.useForm()
   const { client } = props
   // 浏览器实际宽度

+ 18 - 0
src/components/PopContent/index.scss

@@ -17,3 +17,21 @@
   overflow-x: hidden;
   overflow-y: auto;
 }
+.editable-cell {
+  position: relative;
+}
+
+.editable-cell-value-wrap {
+  padding: 5px 12px;
+  cursor: pointer;
+}
+
+.editable-row:hover .editable-cell-value-wrap {
+  padding: 4px 11px;
+  border: 1px solid #d9d9d9;
+  border-radius: 4px;
+}
+
+[data-theme='dark'] .editable-row:hover .editable-cell-value-wrap {
+  border: 1px solid #434343;
+}

+ 7 - 1
src/pages/Customer/Company/index.jsx

@@ -1,12 +1,18 @@
 import React from 'react'
-import { Card, Cascader } from 'antd'
+import { Card } from 'antd'
 import LazyCascader from '@/components/LazyCascader'
+import Editcell from '@/components/Editcell'
 
 const Company = () => {
   return (
     <Card bordered={false}>
       dasdasddad
+      <br/>
+      <br/>
       <LazyCascader />
+      <div className="zh-pd-20">
+        <Editcell />
+      </div>
     </Card>
   )
 }