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

高端网站鉴赏济南app开发制作

高端网站鉴赏,济南app开发制作,软硬件开发公司,网页设计实训心得体会300字其它都是正常的#xff0c;就是拉上去拉下来自己又回弹回去了#xff0c;拉不到最底部也拉不到最顶部#xff0c;拉来拉去都会是这样的category/index.vueimport CategoryHeader from ./header;import CategoryTab from ./tab;import CategoryConte…其它都是正常的就是拉上去拉下来自己又回弹回去了拉不到最底部也拉不到最顶部拉来拉去都会是这样的category/index.vueimport CategoryHeader from ./header;import CategoryTab from ./tab;import CategoryContent from ./content;export default {name: Category,components: {CategoryHeader,CategoryTab,CategoryContent},data(){return{curId: }},methods:{getCurrentId(id){this.curId  id;}}};import ~assets/scss/mixins;.category{overflow: hidden;width:100%;height:100%;background-color:$bgc-theme;}.g-content-container{display:flex;}.sidebar{width: 80px;height:100%;}.main{flex:1;height:100%;}tab.vueclasstab-item:class{tab-item-active: item.id  curId}v-for(item,index) in items:keyindexclickswitchTab(item.id){{item.name}}import MeScroll from base/scroll;import {categoryNames} from ./config;export default {name:CategoryTab,components: {MeScroll},data() {return {curId:};},// 因为数据只需要赋值一次所以就把数据写在methods的init()里created(){this.init();this.switchTab(this.items[0].id);},methods:{init(){this.itemscategoryNames;},switchTab(id){if(this.curId  id){return;}this.curId  id;this.$emit(switch-tab,id)}}};import ~assets/scss/mixins;$tab-item-height: 46px;.tab {width: 100%;-item {height: $tab-item-height;background-color: #fff;border-right: 1px solid $border-color;border-bottom: 1px solid $border-color;color: #080808;font-size: $font-size-l;font-weight: bold;text-align: center;line-height: $tab-item-height;include ellipsis();:last-child {border-bottom: none;}-active {background: none;border-right: none;color: #f23030;}}}base/scroll/index.vue// 滚动条也是使用swiper插件import { swiper, swiperSlide } from vue-awesome-swiper;import MeLoading from base/loading;import {PULL_DOWN_HEIGHT,PULL_DOWN_TEXT_INIT,PULL_DOWN_TEXT_START,PULL_DOWN_TEXT_ING,PULL_DOWN_TEXT_END,PULL_UP_HEIGHT,PULL_UP_TEXT_INIT,PULL_UP_TEXT_START,PULL_UP_TEXT_ING,PULL_UP_TEXT_END} from ./config;export default {components: {swiper,swiperSlide,MeLoading},props: {scrollbar: {type: Boolean,default: true},//这个data是接收data: {type: [Array, Object]},pullDown: {type: Boolean,default: false},pullUp: {type: Boolean,default: false}},watch: {data() {this.update();}},created(){this.init();},methods: {update() {// 外部调用的api//如果它存在的话再调用swiper下面的update()this.$refs.swiper  this.$refs.swiper.swiper.update();},scrollToTop(speed,runCallbacks) {// 不是什么回到顶部而是返回到第一个幻灯片this.$refs.swiper  this.$refs.swiper.swiper.slideTo(0,speed,runCallbacks)},init(){this.pulling false;this.pullDownText PULL_DOWN_TEXT_INIT;this.pullUpText PULL_UP_TEXT_INIT;this.swiperOption {direction: vertical,slidesPerView: auto, //一页能看几张图片auto是自适应freeMode: true, //如果设置了这个大力滑可以滑很远setWrapperSize: true, //自动给sliderwrapper设置高度scrollbar: {el: this.scrollbar ? .swiper-scrollbar : null,hide: true //是否自动隐藏},on: {sliderMove: this.scroll,touchEnd: this.touchEnd,transitionEnd:this.scrollEnd}}},// 内部自己使用的scroll() {//this.$refs.swiper是通过refs找到这个组件//后面的.swiper就是找到它组件的对象swiper里又很多的属性const swiper  this.$refs.swiper.swiper;// 传什么时候显示返回顶部按钮什么时候隐藏this.$emit(scroll,swiper.translate,this.$refs.swiper.swiper);if (this.pulling) {return;}if (swiper.translate  0) {//大于0就是下拉if (!this.pullDown) {return;}if (swiper.translate  PULL_DOWN_HEIGHT) {this.$refs.pullDownLoading.setText(PULL_DOWN_TEXT_START);} else {this.$refs.pullDownLoading.setText(PULL_DOWN_TEXT_INIT);}} //下拉//判断是否到达底部else if (swiper.isEnd) {if (!this.pullUp) {return;}const isPullUp Math.abs(swiper.translate)  swiper.height - PULL_UP_HEIGHT parseInt(swiper.$wrapperEl.css(height)); //判断是否到达上拉的触发条件//abs的意思是绝对值if (isPullUp) {this.$refs.pullUpLoading.setText(PULL_UP_TEXT_START);} else {this.$refs.pullUpLoading.setText(PULL_UP_TEXT_INIT);}}},//滑动停止后触发的事件scrollEnd(){this.$emit(scroll-end,this.$refs.swiper.swiper.translate,this.$refs.swiper.swiper,this.pulling);},touchEnd() {if (this.pulling) {return;}const swiper  this.$refs.swiper.swiper;if (swiper.translate  PULL_DOWN_HEIGHT) {//下拉if (!this.pullDown) {return;}this.pulling  true;swiper.allowTouchMove  false; //正在加载时禁止触摸swiper.setTransition(swiper.params.speed); //通过参数找到初始的速度swiper.setTranslate(PULL_DOWN_HEIGHT); //拖过头了就移动到100的位置swiper.params.virtualTranslate  true; //定住不给回弹this.$refs.pullDownLoading.setText(PULL_DOWN_TEXT_ING);this.$emit(pull-down, this.pullDownEnd);}//上拉,判断是否到底部else if(swiper.isEnd){const totalHeight  parseInt(swiper.$wrapperEl.css(height));const isPullUp   Math.abs(swiper.translate)  swiper.height - PULL_UP_HEIGHT totalHeight; //判断是否满足触发的条件if(isPullUp){//上拉if(!this.pullUp){return;}this.pulling  true;//正在加载中不能够继续加载swiper.allowTouchMove  false;//禁止触摸swiper.setTranslate(-(totalHeight  PULL_UP_HEIGHT - swiper.height));swiper.params.virtualTranslate  true;//定住不给回弹this.$refs.pullUpLoading.setText(PULL_UP_TEXT_ING);this.$emit(pull-up,this.pullUpEnd);}}},pullDownEnd() {//下拉后恢复原值const swiper  this.$refs.swiper.swiper;this.pulling  false;this.$refs.pullDownLoading.setText(PULL_DOWN_TEXT_END);swiper.params.virtualTranslate  false; //开始可以回弹swiper.allowTouchMove  true; //可以触摸swiper.setTransition(swiper.params.speed);swiper.setTranslate(0); //回到0的位置console.log(swiper.params)// 下拉回弹后显示headersetTimeout(() {this.$emit(pull-down-transition-end);},swiper.params.speed);},pullUpEnd(){//上拉后恢复原值const swiper  this.$refs.swiper.swiper;this.pulling  false;this.$refs.pullUpLoading.setText(PULL_UP_TEXT_END);swiper.params.virtualTranslate  false;//开始可以回弹swiper.allowTouchMove  true;}}};.swiper-container {overflow: hidden;width: 100%;height: 100%;}.swiper-slide {height: auto;}.mine-scroll-pull-up,.mine-scroll-pull-down {position: absolute;left: 0;width: 100%;}.mine-scroll-pull-down {bottom: 100%;height: 80px;}.mine-scroll-pull-up {top: 100%;height: 30px;}
http://wiki.neutronadmin.com/news/181281/

相关文章:

  • 网站建设可以经营吗企业为什么要开发网址
  • 淳安县住房和城乡建设局网站旅游网站模板大全
  • 在哪个网站上找国外客户做外贸六师五家渠市建设局网站
  • saas电商建站系统百度关键字搜索到自己的网站
  • 作弊网站山东东平建设工程招标网站
  • 网站性能优化怎么做丽水专业网站建设价格
  • 怎么建设一个手机网站软件开发在大学属于什么专业
  • 北京p2p网站建设绿色资源网下载
  • 重庆响应式网站方案东莞知名企业
  • 论网站建设技术的作者是谁大型网站 中小型网站
  • 网站相对路径和绝对路径wordpress m3u8
  • 昆山网站制作哪家好游戏软件开发公司排名
  • 门户网站模板 免费vx小程序怎么开发
  • 网站空间的价格网页制作免费的素材网站
  • 福州公司做网站手机商务彩铃制作教程
  • 网站编程脚本语言建设银行流水账网站查询
  • 深圳龙华做网站公司网站建设的最新技术
  • 网站建设和使用情况揭阳市seo上词外包
  • 广东网站设计的公司福州本地推广
  • 网站建设与开发英文文献关键词挖掘查询工具爱站网
  • 公司网站开发实训报告网站的主流趋势
  • 小程序网站开发运行合同封面型网页网站有哪些
  • 用wordpress开发网站模板免费创建论坛网站
  • 上海网站建设工作室工程资料外包公司
  • 做网站名词网站建设费用模板
  • 网站订制公司自媒体wordpress
  • 网站建设云南找人做仿网站
  • 轮播网站响应式网站 谷歌 移动网站
  • 北京高端网站建设优势开源展示型网站
  • 代理会计公司网站模版长沙网站建站公司