|
|
@@ -49,8 +49,10 @@ function BottomMenu(onBack: (ans:string) => void, params?: Array<BasicType>) {
|
|
|
|
|
|
// 时间选择器
|
|
|
@Builder
|
|
|
-function DatePickerBuilder(onBack: (ans:string) => void, param?: BasicType){
|
|
|
- YtDatePicker({selectDateBack: (date: Date) => {
|
|
|
+function DatePickerBuilder(onBack: (ans?:string) => void, param?: BasicType){
|
|
|
+ YtDatePicker({
|
|
|
+ selectDateBack: (date?: Date) => {
|
|
|
+ if(!date) return onBack()
|
|
|
// 转换为 YY-MM-DD HH:mm:ss 格式
|
|
|
const year = date.getFullYear().toString();
|
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
@@ -58,7 +60,11 @@ function DatePickerBuilder(onBack: (ans:string) => void, param?: BasicType){
|
|
|
|
|
|
const result = `${year}-${month}-${day}`;
|
|
|
onBack(result)
|
|
|
- }, selectedDate: param?.date ? new Date(param.date) : new Date()})
|
|
|
+ },
|
|
|
+ selectedDate: param?.date ? new Date(param.date) : new Date(),
|
|
|
+ linearInfo: { colors: [['#95C50A', 1]] },
|
|
|
+ needCancel: true
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 对话框
|
|
|
@@ -221,7 +227,7 @@ struct InputComp{
|
|
|
.fontSize(12)
|
|
|
.fontWeight(400)
|
|
|
.borderRadius(45)
|
|
|
- .backgroundColor('#C1EDE9')
|
|
|
+ // .backgroundColor('#C1EDE9')
|
|
|
.padding({ left: 20,top: 8, right: 20, bottom: 8})
|
|
|
.onClick(() => {
|
|
|
this.onBack()
|
|
|
@@ -235,8 +241,8 @@ struct InputComp{
|
|
|
.fontSize(12)
|
|
|
.fontWeight(400)
|
|
|
.borderRadius(45)
|
|
|
- .fontColor(Color.White)
|
|
|
- .backgroundColor('#30E3CE')
|
|
|
+ .fontColor(Color.Black)
|
|
|
+ // .backgroundColor('#30E3CE')
|
|
|
.padding({ left: 20,top: 8, right: 20, bottom: 8})
|
|
|
.onClick(() => {
|
|
|
this.onBack(this.ans)
|
|
|
@@ -251,14 +257,15 @@ struct InputComp{
|
|
|
.borderRadius(8)
|
|
|
.defaultFocus(true)
|
|
|
.maxLength(13)
|
|
|
- .backgroundColor(Color.White)
|
|
|
+ .backgroundColor('#F6F6F6')
|
|
|
.onSubmit(() => {
|
|
|
this.onBack(this.ans)
|
|
|
})
|
|
|
}
|
|
|
.width("100%")
|
|
|
+ .borderRadius({ topLeft: 10, topRight: 10 })
|
|
|
+ .backgroundColor(this.param.color ?? '#ffff')
|
|
|
.padding({ bottom: 42, left: 16, right: 16, top: 24 })
|
|
|
- .backgroundColor('#B2F4EE')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -275,12 +282,15 @@ function GenderPickerBuilder(onBack: (ans?:string) => void, param?: BasicType){
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.width("100%")
|
|
|
|
|
|
- Row(){
|
|
|
+ Row({space: 16}){
|
|
|
Text("女生")
|
|
|
.fontSize(16)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
.fontWeight(500)
|
|
|
- .backgroundColor('#E3FBFA')
|
|
|
+ .fontColor(param?.number == 2 ? Color.White : Color.Black)
|
|
|
+ .backgroundColor(param?.number == 2 ? '#FF5F84' : '#F6F6F6')
|
|
|
.borderRadius(10)
|
|
|
+ .layoutWeight(1)
|
|
|
.padding({ left: 38, right: 38, top: 12, bottom: 12 })
|
|
|
.onClick(() => {
|
|
|
onBack('女')
|
|
|
@@ -289,9 +299,11 @@ function GenderPickerBuilder(onBack: (ans?:string) => void, param?: BasicType){
|
|
|
Text("男生")
|
|
|
.fontSize(16)
|
|
|
.fontWeight(500)
|
|
|
- .fontColor(Color.White)
|
|
|
- .backgroundColor('#30E3CE')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .fontColor(param?.number == 1 ? Color.White : Color.Black)
|
|
|
+ .backgroundColor(param?.number == 1 ? '#FF5F84' : '#F6F6F6')
|
|
|
.borderRadius(10)
|
|
|
+ .layoutWeight(1)
|
|
|
.padding({ left: 38, right: 38, top: 12, bottom: 12 })
|
|
|
.onClick(() => {
|
|
|
onBack('男')
|
|
|
@@ -302,6 +314,6 @@ function GenderPickerBuilder(onBack: (ans?:string) => void, param?: BasicType){
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
}
|
|
|
.width("100%")
|
|
|
- .backgroundColor('#B2F4EE')
|
|
|
+ .backgroundColor(Color.White)
|
|
|
.padding({ bottom: 60, left: 16, right: 16, top: 24 })
|
|
|
}
|