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

网站建设域名是什么意思电子商务网站建设与运营方向

网站建设域名是什么意思,电子商务网站建设与运营方向,百度的seo排名怎么刷,赤峰建设厅官方网站eltable 合计行添加tooltip 问题描述#xff1a; eltable 合计行单元格内容过长会换行#xff0c;需求要求合计行数据超长显示 … #xff0c;鼠标 hover 时显示提示信息。 解决方案#xff1a;eltable合计行没有对外的修改接口#xff0c;想法是 自己实现一个tooltip eltable 合计行单元格内容过长会换行需求要求合计行数据超长显示 … 鼠标 hover 时显示提示信息。 解决方案eltable合计行没有对外的修改接口想法是 自己实现一个tooltip 为合计行单元添加鼠标移入移出事件移入显示tooltip移出隐藏tooltiptooltip的定位和内容通过移入时拿到单元格位置和内容。 实现代码 最后有优化代码 templatediv classcontentel-table show-summary :datadatael-table-columnv-foritem in headerv-binditem:show-overflow-tooltiptrue/el-table-column/el-table!-- 自定义tooltip --Transition nameel-fade-indiv v-showtoolTipVisble idcustomTooltip refcustomTooltip{{ tipMsg }}div classpopper__arrow/div/div/Transition/div /templatescript export default {components: {},data() {return {//合计行提示toolTipVisble: false,tipMsg: ,header: [{ label: 列1, prop: col1, width: 70px },{ label: 列2, prop: col2, width: 70px },{ label: 列3, prop: col3, width: 70px },{ label: 列4, prop: col4, minWidth: 70px },],data: [{col1: 23333333333333,col2: 2345679,col3: 66666666666666,col4: 4,},{ col1: 2, col2: 2, col3: 3, col4: 4 },{ col1: 2, col2: 2, col3: 3, col4: 4 },{ col1: 2, col2: 2, col3: 3, col4: 4 },{ col1: 2, col2: 2, col3: 3, col4: 4 },],};},mounted() {this.setSummaryListener();},methods: {setSummaryListener() {let that this;let table document.querySelector(.el-table__footer-wrappertable);this.$nextTick(() {for (let rowIndex 0; rowIndex table.rows.length; rowIndex) {let row table.rows[rowIndex].cells;for (let colIndex 0; colIndex row.length; colIndex) {let col row[colIndex];let cells col.getElementsByClassName(cell);if (cells cells.length 0) {let cell cells[0];if (cell.scrollWidth cell.offsetWidth) {cell.onmouseenter function () {that.setTooltip(true, rowIndex, colIndex, cell);};cell.onmouseleave function () {that.setTooltip(false, rowIndex, colIndex, cell);};}}}}});},setTooltip(isShow, rowIndex, columnIndex, colEl) {this.toolTipVisble isShow;if (isShow) {this.tipMsg colEl.innerText || colEl.textContent;let toolTip this.$refs.customTooltip;let rect colEl.getBoundingClientRect();//向上偏移量const offsetTop 50;toolTip.style.top rect.top - offsetTop px;this.$nextTick(() {const cellBorderWidth 1;toolTip.style.left rect.left -(toolTip.offsetWidth / 2 -(colEl.offsetWidth cellBorderWidth * 2) / 2) px;});}},}, }; /scriptstyle /* 合计行单元格样式 */ .el-table__footer-wrapper .el-table__footer .el-table__cell .cell {overflow: hidden;text-overflow: ellipsis;word-break: break-all;white-space: nowrap; } /stylestyle langscss scoped #customTooltip {position: absolute;transform-origin: center bottom;background: #303133;color: #fff;border-radius: 4px;padding: 10px;font-size: 12px;line-height: 1.2;word-wrap: break-word;.popper__arrow {position: absolute;display: block;width: 0px;height: 0px;bottom: -12px;left: 42%;border-left: 6px solid transparent;border-right: 6px solid transparent;border-bottom: 6px solid transparent;border-top: 6px solid #303133;} } .content {display: flex;flex-direction: column;width: 100%;height: 500px; } /style实现效果 瞅瞅源码 eltable 数据行单元格提示信息show-overflow-tooltip源码实现思路跟上面差不多。 单元格的提示信息也是绑定鼠标移入移出事件提示信息用的el-tooltip。 el-tooltip这里el-tooltip标签里面没有内容之后通过鼠标移入事件绑定。 单元格绑定鼠标事件 referenceElm 绑定目标对象提示信息定位对象。 优化一下我自己写的tooltip用el-tooltip实现。 templatediv classcontentel-table show-summary :datadatael-table-columnv-foritem in headerv-binditem:show-overflow-tooltiptrue/el-table-column/el-table!-- 自定义tooltip --!-- Transition nameel-fade-indiv v-showtoolTipVisble idcustomTooltip refcustomTooltip{{ tipMsg }}div classpopper__arrow/div/div/Transition --el-tooltipplacementtopreftooltip:contenttooltipContent/el-tooltip/div /templatescript export default {components: {},data() {return {tooltipContent: ,header: [{ label: 列1, prop: col1, width: 70px },{ label: 列2, prop: col2, width: 70px },{ label: 列3, prop: col3, width: 70px },{ label: 列4, prop: col4, minWidth: 500px },],data: [{col1: 23333333333333,col2: 2345679,col3: 66666666666666,col4: 4,},{ col1: 2, col2: 2, col3: 3, col4: 4 },{ col1: 2, col2: 2, col3: 3, col4: 4 },{ col1: 2, col2: 2, col3: 3, col4: 4 },{ col1: 2, col2: 2, col3: 3, col4: 4 },],};},mounted() {this.setSummaryListener();},methods: {setSummaryListener() {let that this;let table document.querySelector(.el-table__footer-wrappertable);this.$nextTick(() {for (let rowIndex 0; rowIndex table.rows.length; rowIndex) {let row table.rows[rowIndex].cells;for (let colIndex 0; colIndex row.length; colIndex) {let col row[colIndex];let cells col.getElementsByClassName(cell);if (cells cells.length 0) {let cell cells[0];if (cell.scrollWidth cell.offsetWidth) {cell.onmouseenter function () {that.setTooltip(true, rowIndex, colIndex, cell);};cell.onmouseleave function () {that.setTooltip(false, rowIndex, colIndex, cell);};}}}}});},setTooltip(isShow, rowIndex, columnIndex, colEl) {const tooltip this.$refs.tooltip;if (isShow) {this.tooltipContent colEl.innerText || colEl.textContent;tooltip.referenceElm colEl;tooltip.$refs.popper (tooltip.$refs.popper.style.display none);tooltip.doDestroy();tooltip.setExpectedState(true);tooltip.handleShowPopper();} else {tooltip.setExpectedState(false);tooltip.handleClosePopper();}},}, }; /scriptstyle /* 合计行单元格样式 */ .el-table__footer-wrapper .el-table__footer .el-table__cell .cell {overflow: hidden;text-overflow: ellipsis;word-break: break-all;white-space: nowrap; } /stylestyle langscss scoped .content { width: 100%;height: 500px; } /style
http://www.hkea.cn/news/14557247/

相关文章:

  • 提供邯郸做wap网站阿里巴巴外贸平台怎么收费
  • 自己做网站怎么弄泰安市住房和城乡建设厅网站
  • 网站建设汇报评估丽水网站建设公司
  • 做电商网站用什么系统建设评标专家在哪个网站
  • net112企业建站系统网站建设自身优势的分析
  • 温州网站建设大全wordpress 繁简
  • 商城网站开发实训报告南京企业网站设计公司
  • 装修设计公司快餐店兰州网站seo技术厂家
  • 湘潭网站开发公司策划案怎么做
  • 衍艺 网站建设网站关键字标签
  • 泰安集团网站建设价格xmlrpc wordpress关闭
  • 金湖县建设工程质量监督网站杭州网站设计推荐柚米
  • 如何将自己做的网站上传vue做的网站
  • 手机怎么建造网站老网站删除做新站会影响收录吗
  • 用dw做的网站生成链接吗深圳网络公司推广
  • 适合学生做的网站类型网站建设公司的服务器
  • 山东做网站的ps做图软件怎么下载网站
  • 网站竞争对手的选定一般参考什么标准的仅有网站做app
  • 建设网站有哪些目的是什么意思郑州广告牌制作市场
  • 注册网站流程及资料优化师
  • 宁波网站建设制作推广互联网产品推广方案范文
  • 唐山网站制作价格表白小程序制作
  • 深圳 赢客创想网络技术股份有限公司 网站建设如何推广引流
  • 区块链 做网站网站建设太金手指六六二七
  • 网站建设内容3000字域名更新自动转跳
  • 网站首页用什么字体好wordpress word发布文章
  • 成都协会网站建设百度h5发布
  • 网站建设与规划的书兰州做it网站运营的怎么样
  • 石家庄网站建设机构开发网站
  • 电子元器件网站怎么做wordpress多条件筛选插件