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

网站服务器名字百度站长工具查询

网站服务器名字,百度站长工具查询,天津网站制作南昌,帝国cms下载站模板文章目录 一、前言二、实现代码三、参考链接 一、前言 在华为快应用中官方提供了slider控件#xff0c;但是这个控件的限制比较多#xff0c;比如滑块无法自定义#xff0c;所以这里进行下自定义#xff0c;自己修改样式。 二、实现代码 整体效果如下: 源码如下… 文章目录 一、前言二、实现代码三、参考链接 一、前言 在华为快应用中官方提供了slider控件但是这个控件的限制比较多比如滑块无法自定义所以这里进行下自定义自己修改样式。 二、实现代码 整体效果如下: 源码如下: custom_slider.ux templatediv idcontainerdiv idprogress-background/divdiv idprogress-second stylewidth: {{progressSecondWidth}}px/divdiv idslider styleleft: {{left}}px ontouchmovehandleTouchMove/div/div /templatescriptimport prompt from system.promptexport default {props: [progress,min,max,step],public: {progressSecondWidth: 0,left: 0,right: 0,//右侧可以滑动到的位置containerLeft: 0,containerRight: 0,stepWidth: 1, // 每一步滑动的距离这个根据step值进行计算minDuration: 5, //滑动最小间距,小于这个间距不算滑动},onInit: function () {this.$on(onShow, this.onShow)this.$watch(progress, progressChange)},progressChange(newValue, oldValue) {console.log(progressChange: JSON.stringify(newValue))if(newValue oldValue){return}this.sliderOtherProgress(newValue)},handleTouchMove(e) {let touchX e.touches[0].clientX - this.containerLeft; // 获取触摸点的全局X坐标if (touchX - this.progressSecondWidth -this.minDuration) {this.leftSlide()}if (touchX - this.progressSecondWidth this.minDuration) {this.rightSlide()}this.emitChange()},onShow(e) {let that thisthis.$element(container).getBoundingClientRect({success: function (data) {const { top, bottom, left, right, width, height } data;prompt.showToast({message: getBoundingClientRect结果 width:${width}, height:${height},top:${top}, bottom:${bottom}, left:${left}, right:${right}})that.containerLeft leftthat.containerRight rightthat.right right - left - 40 //40是滑块的宽度that.computerStepWidth()},fail: (errorData, errorCode) {prompt.showToast({message: 错误原因${JSON.stringify(errorData)}, 错误代码${errorCode}})},complete: function () {console.info(complete)}})},//向左滑动leftSlide() {let nextWidth this.progressSecondWidth - this.stepWidthif (nextWidth 0) {nextWidth 0}this.progressSecondWidth nextWidththis.left nextWidth;},//向右滑动rightSlide() {let nextWidth this.progressSecondWidth this.stepWidthif (nextWidth this.right) {nextWidth this.right}this.progressSecondWidth nextWidththis.left nextWidth;},computerStepWidth() {let progressMax 100;let progressMin 0;let progressStep 1;let currentProgress 0;if (this.max) {progressMax this.max}if (this.min) {progressMin this.min}if (this.step) {progressStep this.step}if (this.progress) {currentProgress this.progress}this.stepWidth this.right / (progressMax - progressMin) * progressStep //获取每一步滑动的距离let currentProgressWidth this.stepWidth * currentProgressthis.progressSecondWidth currentProgressWidth},sliderOtherProgress(progress){let nextWidth progress this.stepWidthif (nextWidth this.right) {nextWidth this.right}if (nextWidth 0) {nextWidth 0}this.progressSecondWidth nextWidththis.left nextWidth;this.emitChange()},emitChange() {let progress Math.ceil(this.progressSecondWidth / this.stepWidth)this.$emit(change, {progress})}} /scriptstyle langless#container {flex-grow: 1;height: 24px;display: flex;}#progress-background {flex-grow: 1;height: 4px;background-color: red;margin-top: 10px;border-radius: 4px;}#progress-second {height: 4px;background-color: pink;margin-top: 10px;border-radius: 4px;left: 0px;position: absolute;}#slider {width: 40px;height: 24px;background-color: #3b2204;position: absolute;border-radius: 12px;} /style 使用如下: import namecustom-slider src./custom_slider/import ... custom-slider onchangeprogressChange progress{{customSliderProgress}}/custom-slider scriptimport prompt from system.promptexport default {public: {customSliderProgress: 30,},progressChange(evt){console.log(---当前进度,evt.detail.progress);},} /script ...三、参考链接 touch
http://www.hkea.cn/news/14500314/

相关文章:

  • 美美淘-专做女鞋拿货选款网站口碑营销的特征
  • 查看别人网站的访问量上海响应式网站制作公司
  • 精美静态网站源码html5 网站模板
  • 企业宣传网站在哪里做织梦视频网站模板
  • 我想网上做网站怎样在国外网站做推广
  • 凡科网站做网站多少钱不做百度推广网站关键词被屏蔽
  • 优化网站最好的刷排名软件wordpress 微博相册
  • 网站ico制作长沙网站制作作
  • 湖北建设网站四库一平台google浏览器入口
  • 网站建设的制度建设利搜网站排名软件
  • 盐城哪有做网站建设的陕西省建设厅网站劳保统筹基金
  • 丹灶网站建设案例青岛网站建设公司正
  • 哈尔滨企业建站网站开发怎么提高网站seo优化关键字排名
  • 刚做的公司网站搜不到破解wordpress加密文章
  • 网站开发的背景是指什么微信公众号的h5网站开发
  • 长春网站建设翻译网站登录系统内部错误
  • 彩票网站开发制作软件网站费用单
  • 做一个营销型网站有哪些内容同德县网站建设公司
  • 用自己电脑做网站包装设计公司名字
  • 如何拉下对手网站惠州公司网站建设
  • 网站更新了文章看不到凌云县城乡建设局网站
  • 集团网站定制seo是什么车
  • 万网主机怎么上传网站动漫制作
  • 网站建设最高管理权限张雪峰软件工程的前景
  • 一站式服务理念wordpress的统计代码
  • html5 手机网站开发叫才如何建做校园购物网站
  • 网站程序开发后怎么上线html网站服务器搭建
  • 视频网站建设 知乎家在深圳业主
  • 黔西南州网站建设专注东莞微信网站建设
  • 北京的网站设计wordpress开启注册