当前位置: 首页 > 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.hkea.cn/news/14276649/

相关文章:

  • 湖南常德石门县网站怎么优化推广
  • 商城网站建设code521搜索引擎营销推广方案
  • 兰山网站建设公司给自己做网站
  • 网站建设设计案例网站logo实验报告网站付费推广方式
  • 宁波市网站建设公司东莞外贸网站建站
  • 喊别人做的网站不肯给代码新品发布会英语
  • 大良营销网站建设精英凡科专属网站免费注册
  • 河北网站建设电话WordPress搭建邮件服务器
  • 网站首页自动下拉广告网站建设广找金手指排名贰肆
  • 个人网站创建床上爱做网站
  • 要屏蔽一个网站要怎么做沈阳微信网站
  • 切图做网站如何做电商网站的设计与实现视频教程
  • 我先做个网站怎么做的dedecms网站的下载
  • 一个网站做seo服装公司网站规划建设
  • 最好的购物网站合肥网站建设的公司
  • 深圳做企业网站公司网站改版 请示
  • 广州正规网站建设网站制作咨询
  • 建设银行手机银行网站wordpress网站描述插件
  • 做网站公司松江登烈建站
  • 教育行业网站建设价格在线做静态头像的网站
  • 网站做任务 炸金花做网站之前需要准备什么
  • 怎么让google收录网站电子商务网站建设的步骤
  • 教育网站制作设计招标网站排行榜
  • 网站服务器检测推荐友情链接
  • 免费视图网站建设淘宝联盟怎么做网站推广
  • 18款禁用网站app入口广东建设银行网站
  • 重庆 网站 建设百度公司图片
  • 网站建设功能列表网站建设是什么专业里的科目
  • 杭州做网站一般多少钱免费收录链接网
  • 安康网站制作公司seo基础知识