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

电商网站后台怎么做360竞价推广

电商网站后台怎么做,360竞价推广,住建部和城乡建设官网,广州天河区做网站1&#xff0c;需求&#xff1a; 在elementUI的抽屉基础上&#xff0c;添加可拖动侧边栏宽度的功能&#xff0c;实现效果如下&#xff1a; 2&#xff0c;在原组件上添加自定义命令 <el-drawer v-drawerDrag"left" :visible.sync"drawerVisible" direc…

1,需求:

在elementUI的抽屉基础上,添加可拖动侧边栏宽度的功能,实现效果如下:
在这里插入图片描述

2,在原组件上添加自定义命令

在这里插入图片描述

    <el-drawer v-drawerDrag="'left'" :visible.sync="drawerVisible" direction="ltr"><div id="showId" style="padding: 1rem;font-size: 12px;overflow-x: hidden;" v-html="form.introduce"></div></el-drawer>

v-drawerDrag 属性是我们在原组件新加的命令,传入left或者right,需要与 direction 的let和rtl对应,

3,drawer-drag.js

export default {bind(el, binding, vnode, oldVnode) {// 默认抽屉宽度,当宽度小于此值不在压缩const minWidth = 400const dragDom = el.querySelector('.el-drawer')dragDom.style.overflow = 'auto'const resizeElL = document.createElement('div')const img = new Image(24, 38)img.src = require('@/assets/images/stretch.png')dragDom.appendChild(img)dragDom.appendChild(resizeElL)resizeElL.style.cursor = 'w-resize'resizeElL.style.position = 'absolute'resizeElL.style.height = '100%'resizeElL.style.width = '10px'resizeElL.style.top = '0px'img.style.position = 'absolute'img.style.top = '50%'// console.log('binding', binding.value)// 区分右侧侧边栏和左侧侧边栏if (binding.value === 'right') {resizeElL.style.left = '0px'img.style.left = '-12px'resizeElL.onmousedown = (e) => {const elW = dragDom.clientWidthconst EloffsetLeft = dragDom.offsetLeftconst clientX = e.clientXdocument.onmousemove = function(e) {e.preventDefault()if (clientX > EloffsetLeft && clientX < EloffsetLeft + 10) {// 往右拖拽if (e.clientX > clientX) {// console.log('向右-----------------------------')if (dragDom.clientWidth >= minWidth) {dragDom.style.width = elW - (e.clientX - clientX) + 'px'}}if (e.clientX < clientX) {// console.log('向左-----------------------------')dragDom.style.width = elW + (clientX - e.clientX) + 'px'}}}// 拉伸结束document.onmouseup = function(e) {document.onmousemove = nulldocument.onmouseup = null}}} else {resizeElL.style.right = '0px'img.style.right = '-12px'resizeElL.onmousedown = (e) => {const elW = dragDom.clientWidthconst EloffsetLeft = dragDom.offsetLeft + dragDom.offsetWidthconst clientX = e.clientXdocument.onmousemove = function(e) {e.preventDefault()if (clientX < EloffsetLeft && clientX > EloffsetLeft - 10) {if (e.clientX > clientX) {// console.log('向右-----------------------------')dragDom.style.width = elW + (e.clientX - clientX) + 'px'}if (e.clientX < clientX) {// console.log('向左-----------------------------')if (dragDom.clientWidth >= minWidth) {dragDom.style.width = elW - (clientX - e.clientX) + 'px'}}}}// 拉伸结束document.onmouseup = function(e) {document.onmousemove = nulldocument.onmouseup = null}}}}
}

图标自取 stretch.png
在这里插入图片描述

http://www.yayakq.cn/news/669562/

相关文章:

  • 效果型网站网建科技北京有限公司
  • 网站三个月没排名做网站建设要什么证
  • 如何选择网站建设公司网站推广软件下拉管家
  • 寮步镇仿做网站windows做网站服务器吗
  • 国外网站阻止国内访问怎么做电商怎么做
  • 游戏咨询网站建设目标是什么WordPress开发微信支付
  • 永久个人网站外贸采购平台推荐
  • 信息平台网站建设产品网站推广
  • 徐州网站建设推广wordpress 安装主题 ftp
  • 网站维护机构广州交易中心
  • 兰州网站建设模板下载什么是关键词排名优化
  • 恩施网站建设模板网站建设如何推广业务
  • 造价员可以做兼职的网站太原网站制作计划
  • 辽宁做网站的公司内容网站管理系统
  • 门户网站建设工作领导小组html表格编辑器
  • 网站建设阿里巴巴wordpress首页留言板
  • 专业商城网站建设价格低番禺建设网站报价
  • 商务网站建设实验报告网站开发项目职责
  • 个人定制网站PHP网站开发程序员招聘
  • 游戏推广网站如何做的股权众筹网站开发
  • 网站倒计时jsp网站开发网上订餐系统
  • 广州购物网站建设报价有什么做美食的网站
  • 网站建设网站排行wordpress模板优劣
  • 网站开发需要经费么毕业设计论文网站
  • wordpress网站检测百度ai智能搜索引擎
  • html5国外酷炫网站物流网站建设规划书
  • 旅游网站的设计思路成华区建设局门户网站
  • 猎头网站 做猎头的流程怎么用wordpress找东西
  • 分类信息网站有哪些怎么制作长图
  • 黑河做网站的公司做网站如何选主机