在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ js滑塊取最大值和最小值問題

js滑塊取最大值和最小值問題

const minwidth = (this.$refs.progress.clientWidth / barwidth + this.percentum) * this.percentmax // 10 - 90

const maxwidth = this.$refs.progress.clientWidth / barwidth * this.percentmax // 0 - 80

minwidth 滑動(dòng)取到的是10-90,maxwidth 滑動(dòng)取到的是0-80 ,怎么取10-80

回答
編輯回答
別硬撐
minwidth = (minwidth-10) * (8/9) + 10;
maxwidth = maxwidth * (8/9) + 10;

可以拿已知的這個(gè)范圍通過計(jì)算換算成目標(biāo)范圍啊

2017年12月19日 17:31