Commit 9c8fe2c6 authored by 吴永生#A02208's avatar 吴永生#A02208

fix: MyInput组件开发

parent d0c51ac4
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-05 14:00:37 * @Date: 2022-07-05 14:00:37
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com * @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-07-20 20:33:09 * @LastEditTime: 2022-07-21 17:33:59
* @FilePath: /bkunyun/src/components/mui/MyInput.tsx * @FilePath: /bkunyun/src/components/mui/MyInput.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -40,11 +40,26 @@ const MyInput = (props: MyInputProps) => { ...@@ -40,11 +40,26 @@ const MyInput = (props: MyInputProps) => {
}, },
}, },
}, },
MuiInputLabel: {
styleOverrides: {
root: {
top: label ? "-5px" : "-10px",
},
},
},
MuiOutlinedInput: { MuiOutlinedInput: {
styleOverrides: { styleOverrides: {
root: { root: {
height: "36px", height: "36px",
lineHeight: "36px", lineHeight: "36px",
":hover": {
"& .MuiOutlinedInput-notchedOutline": error
? {}
: {
borderColor: "#1370ff",
},
},
}, },
input: { input: {
padding: "6.5px 14px", padding: "6.5px 14px",
......
import { memo } from "react"; import { memo } from "react";
import { InputAdornment } from "@mui/material"; import { InputAdornment } from "@mui/material";
import InputComponent from "@/components/mui/Input"; import InputComponent from "@/components/mui/MyInput";
const ProjectMembers = () => { const ProjectMembers = () => {
return ( return (
...@@ -9,7 +9,6 @@ const ProjectMembers = () => { ...@@ -9,7 +9,6 @@ const ProjectMembers = () => {
fullWidth={false} fullWidth={false}
label={"test"} label={"test"}
defaultValue={"sssssssss"} defaultValue={"sssssssss"}
size={"large"}
/> />
         
<InputComponent <InputComponent
...@@ -26,34 +25,17 @@ const ProjectMembers = () => { ...@@ -26,34 +25,17 @@ const ProjectMembers = () => {
disabled disabled
/> />
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<InputComponent fullWidth={false} label={"xsmall"} size={"xsmall"} /> <InputComponent fullWidth={false} label={"xsmall"} />
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<InputComponent <InputComponent fullWidth={false} placeholder={"测试机哦"} />
fullWidth={false}
placeholder={"测试机哦"}
endAdornment={
<InputAdornment position="end">11&nbsp;&nbsp;</InputAdornment>
}
/>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<InputComponent <InputComponent
fullWidth={false} fullWidth={false}
size={"small"} size={"small"}
placeholder={"xxxxxx"} placeholder={"nishuoshenm"}
endAdornment={
<InputAdornment position="end">11&nbsp;&nbsp;</InputAdornment>
}
/> />
<br /> <br /> <br /> <br />
<InputComponent <InputComponent fullWidth={true} />
fullWidth={true}
select={{
json: [
{ value: "1", label: "2" },
{ value: "3", label: "4" },
],
}}
/>
<br /> <br />
<br /> <br />
{/* <SelectComponent {/* <SelectComponent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment