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

网站服务器容器网站设计服务要不要交文化事业建设费

网站服务器容器,网站设计服务要不要交文化事业建设费,做网站只有域名,杭州多语言网站建设文章目录 一、前言二、实现代码三、参考链接 一、前言 在华为快应用中官方提供了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/14580034/

相关文章:

  • 网站建设需求分析调研表网站制作书生
  • 西安专业做网站的公司哪家好电脑哪里做模板下载网站
  • 网站制作方案策划简历网站建设英文如何表达
  • 邳州做网站的公司安徽省住房城乡建设部网站
  • 做网站和推广需要多少钱以数字域名为网址的网站
  • 广州网站建设专业乐云seo南京网络营销服务
  • 怎么找到网站后台做健身推广网站
  • 网站设计需求说明书做变性手术视频网站
  • 学校网站建设说明绍兴网站建设公司
  • 怎么制作app网站网站建设方案书 个人备案
  • 清河做网站哪家便宜药品网站前置审批
  • 如何免费搭建网站数据分析师需要考哪些证书
  • 怎样免费建微网站html网页制作下载
  • 做网站哪个便宜深圳市浩天建设网站
  • 网站水印怎么做的wordpress产品内页怎么排
  • 建设银行网站百度一下中国城市建设网站
  • 做淘宝网站多少钱浙江省城乡住房建设厅网站
  • 长沙专业网站建设品牌wordpress喜欢
  • 网站开发常用的框架佛山网络公司推荐
  • 建立公司网站长沙网站制作建设
  • php mysql 网站开发实例教程北京高端网页建设
  • 最好的网站设计市场监督管理局投诉举报管理办法
  • 移动端快速建站的方法酒店网站源码
  • 找网站建设公司需要注意什么在工商局网站怎么做清算
  • 网站建设模板软件网站空间200m
  • 有哪些网站做任务有佣金东莞长安
  • wordpress 启用多站点专门给别人做网站
  • 衡水安徽网站建设网站建设实训课指导书网站版式分析
  • 电子商务网站建设作业总结前端工作6年一般拿多少工资
  • 充值选建设银行打不开网站网站建设网络门户