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

黑龙江建设银行交通违法网站怎样管理网站

黑龙江建设银行交通违法网站,怎样管理网站,网站建设包括哪些服务,改图宝在线编辑图片说实话#xff0c;uniapp和uview的关于只有时分秒的组件实在是不行。全是日历#xff0c;但是实际根本就不需要日历这玩意。百度了下#xff0c;终于看到了一个只有时分秒的组件。原地址#xff1a;原地址#xff0c;如若侵犯请联系我删除 templateview clas… 说实话uniapp和uview的关于只有时分秒的组件实在是不行。全是日历但是实际根本就不需要日历这玩意。百度了下终于看到了一个只有时分秒的组件。原地址原地址如若侵犯请联系我删除 templateview classhms!-- //显示时间的地方样式可以自行修改 --view classhmsText clickshow{{ hmsVal }}/view!-- //弹出选择时间的弹框 --uni-popup refpopup typebottom background-color#fffview classhms_contentview classhmsBtnview classclose clickclose取消/viewview classcomplete clickcompleteFun完成/view/viewpicker-view indicator-style100rpx changebindChange classpicker-view :valuepickerArrIndexpicker-view-columnview classitem v-for(item, index) in hours :keyindex{{ item }}时/view/picker-view-columnpicker-view-columnview classitem v-for(item, index) in minute :keyindex{{ item }}分/view/picker-view-columnpicker-view-columnview classitem v-for(item, index) in second :keyindex{{ item }}秒/view/picker-view-column/picker-view/view/uni-popup/view /template script export default {props: {//父组件传过来的初始值不是必须传不传默认值为00:00:00hmsval: {type: String,default() {return 00:00:00;}}},data() {return {hours: [],minute: [],second: [],h: 00,m: 00,s: 00,hmsVal: 00:00:00,//页面使用的显示值pickerArrIndex: [0, 0, 0]//picker-view 显示默认};},watch: {//监听父组件传过来的从新赋值给新的变量显示hmsval(newval, oldval) {this.hmsVal newval;}},created() {this.hoursFun();this.minuteFun();this.secondFun();},methods: {// 时hoursFun() {for (var i 0; i 23; i) {if (i 10) {i 0 i;this.hours.push(i);} else {this.hours.push(i);}}},// 分minuteFun() {for (var i 0; i 59; i) {if (i 10) {i 0 i;this.minute.push(i);} else {this.minute.push(i);}}},// 秒secondFun() {for (var i 0; i 59; i) {if (i 10) {i 0 i;this.second.push(i);} else {this.second.push(i);}}},//picker值改变的事件bindChange(e) {const val e.detail.value;this.h this.hours[val[0]] ? this.hours[val[0]] : this.h;this.m this.minute[val[1]] ? this.minute[val[1]] : this.m;this.s this.second[val[2]] ? this.second[val[2]] : this.s;},show() {// picker-view 显示默认值var hmsArr this.hmsVal.split(:);var hindex this.hours.findIndex(item item hmsArr[0]);var mindex this.minute.findIndex(item item hmsArr[1]);var sindex this.second.findIndex(item item hmsArr[2]);this.pickerArrIndex [hindex, mindex, sindex];this.$refs.popup.open();},// 关闭popupclose() {this.$refs.popup.close();},//点击完成completeFun() {//点击完成赋值this.hmsVal ${this.h}:${this.m}:${this.s};//新的值传给父组件this.$emit(complete, this.hmsVal)this.$refs.popup.close();}} };/script style langscss scoped .picker-view {height: 400rpx;background: #fff; } .item {line-height: 100rpx;text-align: center; } .hmsText {width: 160rpx;height: 50rpx;line-height: 50rpx;border: 1px solid #ddd;text-align: center;background: #fff;border-radius: 10rpx;margin-left: 10rpx; } .hmsBtn {display: flex;align-items: center;background: #fff;height: 80rpx;line-height: 80rpx;justify-content: space-between;padding: 0 20rpx;border-bottom: 1px solid #ddd;.complete {color: #0055ff;} } /style 父组件使用 uniHms hmsval21:20:00 completecomplete / 然后实际效果是 兄弟搞得不错可惜了我需要一个时间段 但是这是个很好的例子。于是按照这个修改加了一个时间段的时分秒选择器。这里我试了其他样式终究选了一个自己满意的时间范围选择格式如果需要可以自行修改样式大致逻辑方法是不变的 先上代码 templateview classhms!-- //显示时间的地方样式可以自行修改 --view classhmsText clickshow{{ hmsVal_start - hmsVal_end }}/view!-- //弹出选择时间的弹框 --uni-popup refpopup typebottom background-color#fffview classhms_contentview classhmsBtnview classclose clickclose取消/viewview classtip{{ hmsVal_start 至 hmsVal_end }}/viewview classcomplete clickcompleteFun完成/view/viewview classpickerpicker-view indicator-style100rpx changebindChange classpicker-view :valuepickerArrIndexLeftpicker-view-columnview classitem v-for(item, index) in hours :keyindex{{ item }}时/view/picker-view-columnpicker-view-columnview classitem v-for(item, index) in minute :keyindex{{ item }}分/view/picker-view-columnpicker-view-columnview classitem v-for(item, index) in second :keyindex{{ item }}秒/view/picker-view-column/picker-viewview classline-/viewpicker-view indicator-style100rpx changebindChange2 classpicker-view :valuepickerArrIndexRightpicker-view-columnview classitem v-for(item, index) in hours :keyindex{{ item }}时/view/picker-view-columnpicker-view-columnview classitem v-for(item, index) in minute :keyindex{{ item }}分/view/picker-view-columnpicker-view-columnview classitem v-for(item, index) in second :keyindex{{ item }}秒/view/picker-view-column/picker-view/view/view/uni-popup/view /template script export default {props: {//父组件传过来的初始值不是必须传不传默认值为00:00:00hmsval: {type: String,default() {return 00:00:00-00:00:00;}}},data() {return {hours: [],minute: [],second: [],/* 开始时间 */h: 00,m: 00,s: 00,/* 结束时间 */h2: 00,m2: 00,s2: 00,hmsVal_start: 00:00:00,//页面使用的显示值hmsVal_end: 00:00:00,//页面使用的显示值pickerArrIndexLeft: [0, 0, 0],//picker-view 显示默认pickerArrIndexRight: [0, 0, 0],//picker-view 显示默认};},watch: {//监听父组件传过来的从新赋值给新的变量显示hmsval: {immediate: true,handler(newval) {console.log(newval : , newval);if (newval ! 00:00:00-00:00:00) {this.hmsVal_start newval.split(-)[0]this.hmsVal_end newval.split(-)[1]}}}},created() {this.hoursFun();this.minuteFun();this.secondFun();},methods: {// 时hoursFun() {for (var i 0; i 23; i) {if (i 10) {i 0 i;this.hours.push(i);} else {this.hours.push(i);}}},// 分minuteFun() {for (var i 0; i 59; i) {if (i 10) {i 0 i;this.minute.push(i);} else {this.minute.push(i);}}},// 秒secondFun() {for (var i 0; i 59; i) {if (i 10) {i 0 i;this.second.push(i);} else {this.second.push(i);}}},//picker值改变的事件bindChange(e) {const val e.detail.value;this.h this.hours[val[0]] ? this.hours[val[0]] : this.h;this.m this.minute[val[1]] ? this.minute[val[1]] : this.m;this.s this.second[val[2]] ? this.second[val[2]] : this.s;this.hmsVal_start this.h : this.m : this.s},//picker值改变的事件bindChange2(e) {const val e.detail.value;this.h2 this.hours[val[0]] ? this.hours[val[0]] : this.h2;this.m2 this.minute[val[1]] ? this.minute[val[1]] : this.m2;this.s2 this.second[val[2]] ? this.second[val[2]] : this.s2;this.hmsVal_end this.h2 : this.m2 : this.s2},show() {// picker-view 显示默认值var hmsArr this.hmsVal_start.split(:);var hmsArr2 this.hmsVal_end.split(:);var hindex this.hours.findIndex(item item hmsArr[0]);var mindex this.minute.findIndex(item item hmsArr[1]);var sindex this.second.findIndex(item item hmsArr[2]);var hindex2 this.hours.findIndex(item item hmsArr2[0]);var mindex2 this.minute.findIndex(item item hmsArr2[1]);var sindex2 this.second.findIndex(item item hmsArr2[2]);this.pickerArrIndexLeft [hindex, mindex, sindex];this.pickerArrIndexRight [hindex2, mindex2, sindex2];this.$refs.popup.open();},// 关闭popupclose() {this.$refs.popup.close();},//点击完成completeFun() {//新的值传给父组件this.$emit(complete, this.hmsVal_start - this.hmsVal_end)this.$refs.popup.close();}} };/script style langscss scoped .picker-view {height: 400rpx;background: #fff; } .item {line-height: 100rpx;text-align: center; } .hmsText {line-height: 50rpx;text-align: center;background: #fff;margin-left: 10rpx; } .hmsBtn {display: flex;align-items: center;background: #fff;height: 80rpx;justify-content: space-between;padding: 0 20rpx;border-bottom: 1px solid #ddd;.complete {color: #0055ff;}.tip {color: #939393;} } .picker {display: flex;align-items: center;.line {font-weight: bolder;position: relative;top: 10rpx;} } /deep/.picker-view {width: 50%; } /style 父组件 uniHms hmsval21:20:00-23:56:00 completecomplete / 格式是时间-时间。 然后页面显示效果图 欧耶完成需要的和不需要的赶紧收藏起来只要干这行的说不定哪天就需要用到呢 另外补充一句uniapp组件文档很鸡肋哎。。。
http://www.zqtcl.cn/news/915790/

相关文章:

  • 网站开发工程师优势宁波seo网站
  • 做网站用什么编程软件php网站中水印怎么做
  • p2网站模板做视频官方网站
  • 网站建设季度考核评价工作php做网站有哪些优点
  • 设计某网站的登录和注册程序凡科建站添加文章
  • wordpress 批量打印wordpress 数据库优化
  • 购物网站开发设计类图网络架构指什么
  • 学校网站建设方法wordpress 调用用户名
  • 深圳创建网站公司哈尔滨全员核酸检测
  • 网站开发实施计划宠物网站 html模板
  • 在线生成手机网站商城网站平台怎么做
  • 深圳专业企业网站制作哪家好写作网站新手
  • 福建泉州曾明军的网站桥梁建设期刊的投稿网站
  • 国内设计网站公司wordpress电视主题下载
  • 自贡网站开发河南省建设网站首页
  • 昆明网站推广优化服务器代理
  • wordpress 网站统计插件福建省建设工程职业注册网站
  • 手机移动端网站是什么上海网站设计服务商
  • 多语言网站建设推广孝感门户网
  • 外贸soho 网站建设旅游电子商务网站建设调查问卷
  • 北京专业制作网站seo优化技术教程
  • 网站建设最低多少钱珠海在线网站制作公司
  • 网站建设完成之后要索取哪些医疗网站建设服务
  • 长沙招聘网站有哪些深圳seo论坛
  • 网站如何做网络推广山西住房建设厅官方网站
  • 优化排名推广技术网站平面设计创意
  • 山西网站建设哪家有tv域名的网站
  • 个人博客网站怎么赚钱公司招聘一个网站建设来做推广
  • 功能型网站有哪些中国门户网站有哪些
  • 网站制作教程步骤软件公司怎么赚钱