|
@@ -2,9 +2,11 @@ import { BasicType, YTAvoid } from 'basic'
|
|
|
import { DiaLogPageEnum, DiaLogParam } from 'basic/src/main/ets/models/YTDiaLogModel'
|
|
import { DiaLogPageEnum, DiaLogParam } from 'basic/src/main/ets/models/YTDiaLogModel'
|
|
|
import { HistoryApis } from '../../Apis/HistoryApis'
|
|
import { HistoryApis } from '../../Apis/HistoryApis'
|
|
|
import { HistoryEventDetail } from '../../model/Index'
|
|
import { HistoryEventDetail } from '../../model/Index'
|
|
|
|
|
+import { BubbleStorage } from '../../model/Storage'
|
|
|
import { NumberKeyBoard, NumberKeyBoardStyle } from './NumberKeyboard'
|
|
import { NumberKeyBoard, NumberKeyBoardStyle } from './NumberKeyboard'
|
|
|
import { YtDatePicker } from './YtDatePicker'
|
|
import { YtDatePicker } from './YtDatePicker'
|
|
|
import { _YtHeader } from './_YtHeader'
|
|
import { _YtHeader } from './_YtHeader'
|
|
|
|
|
+import { AppStorageV2 } from '@kit.ArkUI'
|
|
|
|
|
|
|
|
|
|
|
|
|
@Builder
|
|
@Builder
|
|
@@ -15,6 +17,7 @@ export function getBuilder(param: DiaLogParam, onBack: (ans?: ESObject) => void)
|
|
|
else if (param.pageEnum == DiaLogPageEnum.Confirm) DoubleConfirm(onBack, param.param)
|
|
else if (param.pageEnum == DiaLogPageEnum.Confirm) DoubleConfirm(onBack, param.param)
|
|
|
else if (param.pageEnum == DiaLogPageEnum.TextInput) InputComp({onBack: onBack, param: param.param})
|
|
else if (param.pageEnum == DiaLogPageEnum.TextInput) InputComp({onBack: onBack, param: param.param})
|
|
|
else if (param.pageEnum == DiaLogPageEnum.HistoryToday) HistoryToday({onBack: onBack, param: param.param})
|
|
else if (param.pageEnum == DiaLogPageEnum.HistoryToday) HistoryToday({onBack: onBack, param: param.param})
|
|
|
|
|
+ else if (param.pageEnum == DiaLogPageEnum.BubbleSetting) BubbleSetting({onBack: onBack, param: param.param})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 底部菜单
|
|
// 底部菜单
|
|
@@ -87,7 +90,7 @@ function DoubleConfirm(onBack: (ans?:ESObject) => void, param?: BasicType) {
|
|
|
.backgroundColor('#F5F5F7')
|
|
.backgroundColor('#F5F5F7')
|
|
|
.padding({ left: 36, top: 9, right: 36, bottom: 9})
|
|
.padding({ left: 36, top: 9, right: 36, bottom: 9})
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
- onBack()
|
|
|
|
|
|
|
+ onBack('false')
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
Text('确定')
|
|
Text('确定')
|
|
@@ -359,6 +362,74 @@ struct HistoryToday{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@ComponentV2
|
|
|
|
|
+struct BubbleSetting{
|
|
|
|
|
+ @Event onBack: (ans?:ESObject) => void
|
|
|
|
|
+ @Param @Require param: BasicType
|
|
|
|
|
+
|
|
|
|
|
+ @Local bubbleConnect: BubbleStorage = AppStorageV2.connect(BubbleStorage, () => new BubbleStorage())!
|
|
|
|
|
+
|
|
|
|
|
+ build() {
|
|
|
|
|
+ Column({space: 9}){
|
|
|
|
|
+ Row(){
|
|
|
|
|
+ Image($r('app.media.icon_close'))
|
|
|
|
|
+ .width(24)
|
|
|
|
|
+ .aspectRatio(1)
|
|
|
|
|
+ .onClick(() => { this.onBack() })
|
|
|
|
|
+ }
|
|
|
|
|
+ .width("100%")
|
|
|
|
|
+ .justifyContent(FlexAlign.End)
|
|
|
|
|
+ .padding({right: 14, top: 10, bottom: 10})
|
|
|
|
|
+
|
|
|
|
|
+ Column({space: 25}){
|
|
|
|
|
+ ForEach(['气泡出现频率', '气泡消失时间'], (item: string, index) => {
|
|
|
|
|
+ Row({space: 15}){
|
|
|
|
|
+ Text(`${item}:`)
|
|
|
|
|
+ .fontSize(16)
|
|
|
|
|
+ .fontWeight(500)
|
|
|
|
|
+ .fontColor('#FF333333')
|
|
|
|
|
+
|
|
|
|
|
+ Row({space: 12}){
|
|
|
|
|
+ TextInput({text: `${index == 0 ? this.bubbleConnect.bubbleFrequency : this.bubbleConnect.bubbleDisappearTime}`})
|
|
|
|
|
+ .width(45)
|
|
|
|
|
+ .height(30)
|
|
|
|
|
+ .padding(0)
|
|
|
|
|
+ .maxLength(3)
|
|
|
|
|
+ .borderRadius(5)
|
|
|
|
|
+ .type(InputType.Number)
|
|
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
|
|
+ .border({width: 1, color: '#FFFFA001'})
|
|
|
|
|
+ .onChange((text: string) => {
|
|
|
|
|
+ if(text){
|
|
|
|
|
+ let num = parseInt(text) || 1
|
|
|
|
|
+ if(index == 0){
|
|
|
|
|
+ this.bubbleConnect.bubbleFrequency = num
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.bubbleConnect.bubbleDisappearTime = num
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ Text('s')
|
|
|
|
|
+ .fontSize(16)
|
|
|
|
|
+ .fontWeight(500)
|
|
|
|
|
+ .fontColor('#FF333333')
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ .width("100%")
|
|
|
|
|
+ .alignItems(HorizontalAlign.Center)
|
|
|
|
|
+ }
|
|
|
|
|
+ .width(294)
|
|
|
|
|
+ .height(163)
|
|
|
|
|
+ .borderRadius(20)
|
|
|
|
|
+ .backgroundColor(Color.White)
|
|
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|