当前位置: 首页 > news >正文

个人网站建设 开题报告检察网站建设

个人网站建设 开题报告,检察网站建设,立白内部网站,广告牌设计模板图片一、操作环境 操作系统: Windows 11 专业版、IDE:DevEco Studio 3.1.1 Release、SDK:HarmonyOS 3.1.0#xff08;API 9#xff09; 二、效果图 可实现两种选择方式#xff0c;可带时分选择#xff0c;也可不带#xff0c;使用更加方便。 三、代码 SelectedDateDialog…一、操作环境 操作系统:  Windows 11 专业版、IDE:DevEco Studio 3.1.1 Release、SDK:HarmonyOS 3.1.0API 9 二、效果图 可实现两种选择方式可带时分选择也可不带使用更加方便。 三、代码 SelectedDateDialog.ets文件 /*** 时间选择*/ CustomDialog export struct SelectedDateDialog {private selectedDate: Dateprivate isShowTime: Visibility Visibility.Hidden //是否展示时分栏private callback: (value: Date) voidcontroller: CustomDialogController //自定义dialog必须声明aboutToAppear() {console.log(时间选择展示 JSON.stringify(this.selectedDate))}build() {Column() {Row() {DatePicker({start: new Date(2000-1-1), //起始时间end: new Date(2050-1-1), //结束时间selected: this.selectedDate //默认所选时间}).width(this.isShowTime Visibility.Visible ? 60% : 100%) //不显示时分则宽为100.height(100%).lunar(false) //日期是否显示农历。 - true展示农历。 - false不展示农历。 默认值false.onChange(value {// console.log(轮换结果 JSON.stringify(value))this.selectedDate.setFullYear(value.year, value.month, value.day)})TimePicker({ selected: this.selectedDate }).width(35%).height(100%).visibility(this.isShowTime).useMilitaryTime(true) //24小时制.onChange(value {// console.info(select current date is: JSON.stringify(value))if (value.hour 0) {this.selectedDate.setHours(value.hour, value.minute)}})}.width(100%).height(80%)Blank()Button(确定).borderRadius(3).width(40%).margin({ bottom: 20 }).onClick((event: ClickEvent) {console.log(选择时间 JSON.stringify(this.selectedDate))this.callback?.(this.selectedDate)this.controller.close()})}.width(100%).height(50%)} } 使用其中的参数isShowTime控制是否显示时分栏的选择Visibility.Visible为显示Visibility.Hidden不显示 在page中的调用方式 State selectInspectionTime: Date new Date()selectInspectionDialog: CustomDialogControllerinitSelectInspectionDialog() {this.selectInspectionDialog new CustomDialogController({builder: SelectedDateDialog({ selectedDate: this.selectInspectionTime, isShowTime: Visibility.Visible,callback: (value) {let time value.getFullYear() - (value.getMonth() 1) - value.getDate() T value.getHours() : value.getMinutes() //月份从0开始故需1} }),cancel: this.closeInspectionDialog, //点击空白区域回调autoCancel: true,alignment: DialogAlignment.Bottom,offset: { dx: 0, dy: -20 },gridCount: 4,customStyle: false})}closeInspectionDialog() {console.info(Click the callback in the blank area)this.selectInspectionDialog.close()}openDialog() {//点击事件调用打开dialogthis.selectInspectionDialog.open()}
http://www.dnsts.com.cn/news/49696.html

相关文章:

  • 单页面网站跳出率wordpress磁力插件
  • 哪里网站建设联系关于做网站策划书
  • 深圳市住房和建设局网站怎么打不开了怎么把自己的网站推广出去
  • 模板网站建设一条龙报修网站模板
  • 做网站不给源码吗百度知道下载安装
  • 广西网站建设推广17网站一起做网店广州
  • 多种语言网站制作建设人才服务信息网国家网站么
  • 怎么做页游网站运营盐城中瑞做网站公司
  • 自助企业建站模版网站建设费用有哪些
  • 做wap网站wordpress 邮箱发布
  • 湘潭做网站找磐石网络一流上海红酒网站建设
  • 企业网站的综合要求北京短视频制作
  • 领英定制通网站建设dw做的网站如何使用
  • 深圳网站建设公司推荐乐云seo中美最新消息
  • 成品网站w灬源码伊甸程序员培训要多长时间
  • 泰州网站建设策划方案从电子商务网站f型眼球轨迹分析其网站布局
  • 海口网站建设优化公司镇平微网站建设
  • 网站建设 蜀美网络wordpress作者链接
  • 遵义建设厅官方网站php网站设计
  • 淄博做网站的宁波定制网站建设
  • 商城网站页面模板有没有免费看的视频
  • 门户网站属于新媒体吗雅虎搜索引擎首页
  • 做外贸手机网站凡客网
  • 兰州做网站一咨询兰州做网站公司专业网站建设分类标准
  • 河南网站制作公司个人备案网站名称怎么写
  • 谁给个好网站wordpress预览pdf
  • ajax做网站建设部网站办事大厅栏目
  • 旅游做网站企业移动网站建设商
  • 制作网站生成器.net网站开发的例子
  • 网页设计公司网站制作校园招生网站建设的简报