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

做美团网站怎么做word做网站

做美团网站怎么做,word做网站,58网站建设58xiamen,办公室装修专业网站uniapp实现全局悬浮框(按钮,页面,图片自行设置) 可拖动 话不多说直接上干货 1,在components新建组件(省去了每个页面都要引用组件的麻烦) 2,实现代码 templateview classcall-plate :styletop: top px;left: left px; touchmovetemplateview classcall-plate :styletop: top px;left: left px; touchmovetouchmove touchendtouchend touchstarttouchstart v-ifpopupShow通话中悬浮框/view /templatescriptexport default {name: call-screen,emits: [hide, confirm],props: {/*** 默认号码*/number: {type: String,default: }},data() {return {popupShow: true, // 是否显示当前页面top: 0,left: 0,startTop: 0,startLeft: 0,startClientTop: 0,startClientLeft: 0,}},watch: {},computed: {i18n() {return this.$t}},created() {let that thisthis.popupShow getApp().globalData.callShowthis.top getApp().globalData.callShowTop // 获取全局存储的位置,也可以使用本地缓存存储this.left getApp().globalData.callShowLeftuni.$on(getApp().globalData.$global.CALL_SHOW_UPDATE, this.callShowUpdate)uni.$on(getApp().globalData.$global.CALL_SHOW_OPEN, this.callShowOpen)uni.$on(getApp().globalData.$global.CALL_SHOW_CLOSE, this.callShowClose)},destroyed() {// 销毁通知uni.$off(getApp().globalData.$global.CALL_SHOW_UPDATE, this.callShowUpdate)uni.$off(getApp().globalData.$global.CALL_SHOW_OPEN, this.callShowOpen)uni.$off(getApp().globalData.$global.CALL_SHOW_CLOSE, this.callShowClose)},methods: {touchmove(e) {// 单指触摸if (e.touches.length ! 1) {return false;}// console.log(e)this.top e.changedTouches[0].pageY - this.startClientTop this.startTopthis.left e.changedTouches[0].pageX - this.startClientLeft this.startLeft},touchend(e) {// console.log(------结束,top: this.top ,left: this.left)// console.log(e)getApp().globalData.callShowTop this.topgetApp().globalData.callShowLeft this.leftuni.$emit(getApp().globalData.$global.CALL_SHOW_UPDATE) // 更新每个页面悬浮框位置},touchstart(e) {// console.log(------开始)// console.log(e)this.startTop this.topthis.startLeft this.leftthis.startClientTop e.changedTouches[0].pageYthis.startClientLeft e.changedTouches[0].pageX},callShowUpdate() {// 更新每个页面悬浮框位置this.top getApp().globalData.callShowTopthis.left getApp().globalData.callShowLeft},callShowOpen() {// 打开每个页面悬浮框this.popupShow truegetApp().globalData.callShow true},callShowClose() {// 关闭每个页面悬浮框this.popupShow falsegetApp().globalData.callShow false},}} /scriptstyle langscss scoped.call-plate {display: flex;position: absolute;width: 90px;height: 160px;z-index: 9999999;background-color: yellow;} /style在 App.vue中全局存储悬浮框位置信息 globalData: {callShowTop: 100, // 悬浮框topcallShowLeft: 100, // 悬浮框leftcallShow: false, // 悬浮框是否显示 },3,在每个需要用到悬浮框的页面引入 templateview classcontent!--组件引用--call-screen/call-screen/view /template 发通知控制显示隐藏悬浮框 uni.$emit(that.global.CALL_SHOW_CLOSE) uni.$emit(that.global.CALL_SHOW_OPEN)4,实现效果 每个页面切换后都会更新最新位置
http://www.hkea.cn/news/14289093/

相关文章:

  • 专业做淘宝网站公司吗广州娱乐场所最新通知
  • iis建设网站项目发布网
  • 做一年的网站能赚多少钱哪个地图软件可以看清村庄
  • 现在市场网站建设怎么样个人网站制作工具箱安卓版
  • wordpress网站换空间新乡网站建设价格
  • 企业建设H5响应式网站的5大好处欢迎进入河南国安建设集团有限公司网站
  • 园林专业设计学习网站百度收录教程
  • 企业为什么建设网站樟木头镇网站建设
  • 重庆网站建设兼职深圳整合营销
  • 装修网站模板建设网官网住房和城乡厅官网
  • 吉林市建设工程档案馆网站孝感市网站建设公司
  • led营销型网站建设建设网站的技巧
  • 广东网站建设制作价格学生个人网站制作软件
  • 网站建设的目地网上书店网站建设设计的收获
  • 个体网站建设wordpress备份和恢复
  • 只做美食类目产品的网站中国铁路建设监理协会官方网站
  • 平面设计跟网站建设公司邮箱登陆
  • 建站系统下载 discuz家装公司排名前20
  • 怎样解析网站域名网站备案的原则
  • 网站接入服务单位名称做网站小编怎么样
  • 做推广哪个网站最好西安大型网站建设
  • 播州区建设局网站龙岗区
  • 想给公司做个网站 怎么做互联网推广策划
  • 网站开发怎么做到前后端怎么免费建立公司网站
  • 深圳网站建设找哪家公司好网站监控的软件怎么做
  • 想要自己做一个网站怎么做厦门模板建站
  • 柳州哪里有网站建设杭州万户网络
  • 学设计的素材网站北京上地做网站
  • 建设网银登录网站企业策划包括哪些内容
  • 做网站导航按钮怎么猛网络营销的特点包括哪些