--增加判断对象为空方法
--增加表单检索方法 --增加公司资料编辑页面 --增加码单管理页面 --增加码单添加页面 --编辑个人资料、地址管理、码单管理引入图标
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
.form-list{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 30px 30px 0;
|
||||
|
||||
.form-list-label{
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
color: #000000;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.form-list-right{
|
||||
width: 506px;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.form-list-right-meet{
|
||||
background: #f6f6f6;
|
||||
width: 506px;
|
||||
min-height: 80px;
|
||||
border-radius: 20px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 20px;
|
||||
display: flex;justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.form-list-right input,.form-list-right textarea{
|
||||
flex: 0 0 auto;
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
color: #000000;
|
||||
}
|
||||
.form-list-right textarea{
|
||||
height: 186px;
|
||||
border-radius: 10px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.form-list-right .phcolor{
|
||||
color: #ababab;
|
||||
}
|
||||
.form-list-right-placeholder{
|
||||
color: #ababab;
|
||||
}
|
||||
.form-list-right-enter .icon-a-moreback{
|
||||
font-size: 28px;
|
||||
}
|
||||
.add-address-default{
|
||||
display: flex;align-items: center;justify-content: space-between;
|
||||
margin: 70px 30px 0;
|
||||
font-size: 26px;
|
||||
font-weight: 700;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.add-address-save{
|
||||
width: 668px;
|
||||
height: 82px;
|
||||
background: #007aff;
|
||||
border-radius: 40px;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
display: flex;align-items: center;justify-content: center;
|
||||
margin: 620px auto 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
import { Input, Text, Textarea, View } from "@tarojs/components"
|
||||
import { memo } from "react"
|
||||
import "./index.scss"
|
||||
|
||||
interface ListParams{
|
||||
label: string, //左边label
|
||||
onInput?: ()=>any, // 输入框输入
|
||||
onClick?:()=>any, //点击列表
|
||||
placeholder?:string, // 提示文本
|
||||
children?: any, // 插槽
|
||||
type?: string // 类型:1.input,2.textarea,3.select
|
||||
value?: any
|
||||
}
|
||||
|
||||
// 表单列表
|
||||
const FromList = memo((props:ListParams)=>{
|
||||
const {type="input",value=""} = props;
|
||||
|
||||
return (
|
||||
<View className="form-list">
|
||||
<View className="form-list-label">{props.label}</View>
|
||||
<View onClick={props?.onClick} className="form-list-right">
|
||||
{
|
||||
props.children??
|
||||
<View onClick={props?.onClick} className="form-list-right-meet">
|
||||
{
|
||||
type=="input"?<Input value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />:
|
||||
type=="textarea"?<Textarea value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />:
|
||||
<>
|
||||
{
|
||||
props.value?<View>{value}</View>:
|
||||
<View className="form-list-right-placeholder">
|
||||
{props.placeholder}
|
||||
</View>
|
||||
}
|
||||
<View className="form-list-right-enter"><Text className="iconfont icon-a-moreback"></Text></View>
|
||||
</>
|
||||
}
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
export default FromList;
|
||||
Reference in New Issue
Block a user