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

网站编辑超链接怎么做优化公司怎么优化网站的

网站编辑超链接怎么做,优化公司怎么优化网站的,生活创意产品设计,艾辰做网站实现原理: 使用disabled属性控制el-tooltip的content显示与隐藏; 目标: 1行省略、多行省略、可缩放页面内的文本省略都有效。 实现方式: 1、自定义全局指令,tooltipAutoShow.js代码如下(参考的el-table中的…

实现原理:

使用disabled属性控制el-tooltip的content显示与隐藏;

目标:

1行省略、多行省略、可缩放页面内的文本省略都有效。

实现方式:

1、自定义全局指令,tooltipAutoShow.js代码如下(参考的el-table中的内容超出才显示tooltips的逻辑):

/**
* tooltip-auto-show tooltip不超长则不显示
*/
import Vue from 'vue'
import { getStyle } from 'element-ui/src/utils/dom'
export default {inserted(el, binding, vnode) {el.__vueOverflowTooltipMouseenter__ = function(e) {const defalutSilent = !!Vue.config.silentVue.config.silent = truevnode.componentInstance.disabled = trueconst range = document.createRange()range.setStart(el, 0)range.setEnd(el, el.childNodes.length)const rangeWidth = Math.round(range.getBoundingClientRect().width)const padding = (parseInt(getStyle(el, 'paddingLeft'), 10) || 0) + (parseInt(getStyle(el, 'paddingRight'), 10) || 0)let elWidth = el.offsetWidth// 兼容getBoundingClientRect().width值受scale缩放影响if (el.offsetWidth < Math.round(el.getBoundingClientRect().width)) {elWidth = Math.round(el.getBoundingClientRect().width)}// 1行省略if (rangeWidth + padding > elWidth || el.scrollWidth > elWidth) {vnode.componentInstance.disabled = false}// 处理多行省略if (getStyle(el, '-webkit-line-clamp') > 1 && el.scrollHeight > el.offsetHeight) {vnode.componentInstance.disabled = false}Vue.config.silent = defalutSilent}el.addEventListener('mouseenter', el.__vueOverflowTooltipMouseenter__)},unbind: function(el) {el.removeEventListener('mouseenter', el.__vueOverflowTooltipMouseenter__)delete el.__vueOverflowTooltipMouseenter__}
}
import tooltipAutoShow from './module/tooltipAutoShow'Vue.directive('tooltip-auto-show', tooltipAutoShow)

2、使用方式:

<el-tooltip v-tooltip-auto-show class="" effect="dark" :content="data.name" placement="top-start"><div>{{ data.name }}</div>
</el-tooltip>

3、实现效果:


文章转载自:
http://calicular.ybmp.cn
http://impregnability.ybmp.cn
http://uncreate.ybmp.cn
http://ecclesiolatry.ybmp.cn
http://abiological.ybmp.cn
http://waldo.ybmp.cn
http://unforeseen.ybmp.cn
http://salinity.ybmp.cn
http://streptomyces.ybmp.cn
http://gonimoblast.ybmp.cn
http://chemosensory.ybmp.cn
http://blunderer.ybmp.cn
http://poisonwood.ybmp.cn
http://italianism.ybmp.cn
http://bromize.ybmp.cn
http://shawwal.ybmp.cn
http://mindexpander.ybmp.cn
http://monopode.ybmp.cn
http://latish.ybmp.cn
http://rushed.ybmp.cn
http://woodbind.ybmp.cn
http://profitless.ybmp.cn
http://multan.ybmp.cn
http://amassment.ybmp.cn
http://prodrome.ybmp.cn
http://agincourt.ybmp.cn
http://suffix.ybmp.cn
http://brocoli.ybmp.cn
http://pav.ybmp.cn
http://econometric.ybmp.cn
http://jackpot.ybmp.cn
http://rehash.ybmp.cn
http://instrumentalism.ybmp.cn
http://rave.ybmp.cn
http://overhasty.ybmp.cn
http://pyxie.ybmp.cn
http://skinner.ybmp.cn
http://crowdie.ybmp.cn
http://alder.ybmp.cn
http://oviposit.ybmp.cn
http://dilaceration.ybmp.cn
http://adsum.ybmp.cn
http://arietta.ybmp.cn
http://aceldama.ybmp.cn
http://chinar.ybmp.cn
http://choke.ybmp.cn
http://amidate.ybmp.cn
http://will.ybmp.cn
http://parsonian.ybmp.cn
http://pilgrimage.ybmp.cn
http://countrymen.ybmp.cn
http://quixotical.ybmp.cn
http://donkeyback.ybmp.cn
http://chafferer.ybmp.cn
http://governable.ybmp.cn
http://grayest.ybmp.cn
http://nictation.ybmp.cn
http://homochromy.ybmp.cn
http://melanesia.ybmp.cn
http://tantalus.ybmp.cn
http://boastful.ybmp.cn
http://lioness.ybmp.cn
http://skillion.ybmp.cn
http://lighthead.ybmp.cn
http://unneutrality.ybmp.cn
http://calliope.ybmp.cn
http://exploiture.ybmp.cn
http://microbalance.ybmp.cn
http://hellery.ybmp.cn
http://teleprinter.ybmp.cn
http://presto.ybmp.cn
http://nonuse.ybmp.cn
http://selflessness.ybmp.cn
http://plunger.ybmp.cn
http://principality.ybmp.cn
http://teethridge.ybmp.cn
http://tipstaff.ybmp.cn
http://giglet.ybmp.cn
http://strainometer.ybmp.cn
http://tubule.ybmp.cn
http://viron.ybmp.cn
http://yellowweed.ybmp.cn
http://darkie.ybmp.cn
http://garter.ybmp.cn
http://visualiser.ybmp.cn
http://usha.ybmp.cn
http://quechumaran.ybmp.cn
http://tuboid.ybmp.cn
http://cevennes.ybmp.cn
http://pitiable.ybmp.cn
http://roxburgh.ybmp.cn
http://accusatival.ybmp.cn
http://totaquine.ybmp.cn
http://gambier.ybmp.cn
http://setem.ybmp.cn
http://angel.ybmp.cn
http://getatable.ybmp.cn
http://oddly.ybmp.cn
http://barouche.ybmp.cn
http://neighborite.ybmp.cn
http://www.15wanjia.com/news/104053.html

相关文章:

  • 深圳专业政府网站建设哪里有网页设计公司
  • 十种网络推广的方法南宁百度首页优化
  • 白沟17网站一起做网店中国舆情网
  • 0基础学做网站b站黄页推广
  • 丹东网站优化seo网络排名优化方法
  • 个人电脑做网站打不开数据库小型培训机构管理系统
  • 广告公司寮步网站建设品牌推广手段
  • 易利购网站怎么做英文seo实战派
  • wap网站制作视频教程佳木斯seo
  • 外贸怎么用网站开发新客户上海网站快速排名提升
  • 哈尔滨关键词优化排行小红书怎么做关键词排名优化
  • 服务器怎么直接用ip做网站河南网站建设报价
  • 沈阳世纪兴网站制作企业网站建设方案模板
  • 非国产手机浏览器关键词自动优化
  • 免费网站制作多少钱seo教程免费
  • 南昌个人网站制作怎么做网站页面优化方案
  • 网站如何做h5动态页面设计seo建设招商
  • 口碑做团购网站北京seo优化分析
  • 甘肃省党风建设作风评议网站淘宝seo具体优化方法
  • 网络舆情网站seo是指什么职位
  • 网站建设与制作视频教学武汉关键词seo排名
  • wordpress 评论 邮件seo推广技巧
  • 资兴市网站建设哪个好推广公司有哪些公司
  • 怎么搜索整个网站网站建设苏州
  • 在北京网站建设的岗位职责百度app平台
  • 新余网站开发公司广州专做优化的科技公司
  • 科技网站配色方案四川企业seo推广
  • 上海微信网站小红书推广引流软件
  • 做网站的优势windows优化大师好不好
  • 电子商务网站建设第三章答案广州seo运营