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

网站的关键词库怎么做百度在线客服中心

网站的关键词库怎么做,百度在线客服中心,自己的网络平台怎么做,如何让单位网站做防护注意添加这个属性,会影响到有多少个层级的表头: :header-height“[50, 40]”,即后面的columnIndex 如果有fix的列CustomizedHeader会被调用多次,如果有多个层级的表头,也会被调用多次, 实际被调用次数是(fix数 1 * 表头层级数量) 以下代码均删除了JSX TS版本代码 <templ…

注意添加这个属性,会影响到有多少个层级的表头: :header-height=“[50, 40]”,即后面的columnIndex

如果有fix的列CustomizedHeader会被调用多次,如果有多个层级的表头,也会被调用多次, 实际被调用次数是(fix数+ 1 * 表头层级数量)

以下代码均删除了JSX

TS版本代码

<template><div  style="width: 100%;height: calc(100vh - 84px)"><el-auto-resizer><template #default="{ height, width }"><el-table-v2fixed:columns="columns":data="data":sort-by="sortBy":header-height="[50, 40]":header-class="headerClass"@column-sort="onSort":width="width":height="height"><template #header="props"><customized-header v-bind="props"></customized-header></template></el-table-v2></template></el-auto-resizer></div>
</template><script lang="ts" setup>
import {h, ref} from 'vue'
import {TableV2FixedDir, TableV2Placeholder, TableV2SortOrder} from 'element-plus'
import type {HeaderClassNameGetter,TableV2CustomizedHeaderSlotParam,
} from 'element-plus'
import type {SortBy} from 'element-plus'// 生成带二级表头的 columns
function generateColumns(length = 10, prefix = 'column-', props?: any) {return Array.from({length}).map((_, columnIndex) => ({...props,key: `${prefix}${columnIndex}`,dataKey: `${prefix}${columnIndex}`,title: `Column ${columnIndex}`,width: 150,}))
}function generateData(columns: ReturnType<typeof generateColumns>,length = 200,prefix = 'row-'
) {return Array.from({ length }).map((_, rowIndex) => {return columns.reduce((rowData, column, columnIndex) => {rowData[column.dataKey] = `Row ${rowIndex} - Col ${columnIndex}`return rowData},{id: `${prefix}${rowIndex}`,parentId: null,})})
}function CustomizedHeader({cells, columns, headerIndex}) {if (headerIndex === 1) return cellsconst groupCells = []let width = 0let idx = 0columns.forEach((column, columnIndex) => {if (column.placeholderSign === TableV2Placeholder) {groupCells.push(cells[columnIndex])} else {width += cells[columnIndex].props.column.widthidx++const nextColumn = columns[columnIndex + 1]if (columnIndex === columns.length - 1 ||nextColumn?.placeholderSign === TableV2Placeholder ||idx === (headerIndex === 0 ? 4 : 2)) {groupCells.push(h('div',{class: 'flex items-center justify-center custom-header-cell',role: 'columnheader',style: {...cells[columnIndex].props.style,width: `${width}px`,border: `2px solid #fff`}},`Group width ${width}`))width = 0idx = 0}}})return groupCells;
}const headerClass = ({headerIndex,}: Parameters<HeaderClassNameGetter<any>>[0]) => {if (headerIndex === 0) return 'el-primary-color'return ''
}const columns = generateColumns(70)
let data = generateData(columns, 20)columns[0].fixed = TableV2FixedDir.LEFTfor (let i = 0; i < 3; i++) columns[i].sortable = trueconst sortBy = ref<SortBy>({key: 'column-0',order: TableV2SortOrder.ASC,
})const onSort = (_sortBy: SortBy) => {data = data.reverse()sortBy.value = _sortBy
}
</script><style>
.el-el-table-v2__header-row .custom-header-cell {border-right: 1px solid var(--el-border-color);
}.el-el-table-v2__header-row .custom-header-cell:last-child {border-right: none;
}.el-primary-color {background-color: var(--el-color-primary);color: var(--el-color-white);font-size: 14px;font-weight: bold;
}.el-primary-color .custom-header-cell {padding: 0 4px;
}
</style>

JS版本

<template><div style="width: 100%;height: calc(100vh - 84px)"><el-auto-resizer><template #default="{ height, width }"><el-table-v2fixed:columns="columns":data="data":sort-by="sortBy":header-height="[50, 40]":header-class="headerClass"@column-sort="onSort":width="width":height="height"><template #header="props"><CustomizedHeader v-bind="props"></CustomizedHeader></template></el-table-v2></template></el-auto-resizer></div>
</template><script setup>
import { h, ref } from 'vue'
import {TableV2FixedDir,TableV2Placeholder,TableV2SortOrder
} from 'element-plus'// 生成带二级表头的 columns
function generateColumns(length = 10, prefix = 'column-') {return Array.from({ length }).map((_, columnIndex) => ({key: `${prefix}${columnIndex}`,dataKey: `${prefix}${columnIndex}`,title: `Column ${columnIndex}`,width: 150}))
}function generateData(columns, length = 200, prefix = 'row-') {return Array.from({ length }).map((_, rowIndex) => {return columns.reduce((rowData, column, columnIndex) => {rowData[column.dataKey] = `Row ${rowIndex} - Col ${columnIndex}`return rowData},{id: `${prefix}${rowIndex}`,parentId: null})})
}function CustomizedHeader({ cells, columns, headerIndex }) {if (headerIndex === 1) return cellsconst groupCells = []let width = 0let idx = 0columns.forEach((column, columnIndex) => {if (column.placeholderSign === TableV2Placeholder) {groupCells.push(cells[columnIndex])} else {width += cells[columnIndex].props.column.widthidx++const nextColumn = columns[columnIndex + 1]if (columnIndex === columns.length - 1 ||nextColumn?.placeholderSign === TableV2Placeholder ||idx === (headerIndex === 0 ? 4 : 2)) {groupCells.push(h('div',{class: 'flex items-center justify-center custom-header-cell',role: 'columnheader',style: {...cells[columnIndex].props.style,width: `${width}px`,border: `2px solid #fff`}},`Group width ${width}`))width = 0idx = 0}}})return groupCells
}const headerClass = ({ headerIndex }) => {return headerIndex === 0 ? 'el-primary-color' : ''
}const columns = generateColumns(70)
let data = generateData(columns, 20)columns[0].fixed = TableV2FixedDir.LEFTfor (let i = 0; i < 3; i++) {columns[i].sortable = true
}const sortBy = ref({key: 'column-0',order: TableV2SortOrder.ASC
})const onSort = (_sortBy) => {// 创建新数组以保持响应性data = [...data].reverse()sortBy.value = _sortBy
}</script><style>
.el-el-table-v2__header-row .custom-header-cell {border-right: 1px solid var(--el-border-color);
}.el-el-table-v2__header-row .custom-header-cell:last-child {border-right: none;
}.el-primary-color {background-color: var(--el-color-primary);color: var(--el-color-white);font-size: 14px;font-weight: bold;
}.el-primary-color .custom-header-cell {padding: 0 4px;
}
</style>
http://www.dtcms.com/wzjs/411403.html

相关文章:

  • 上海哪家公司提供专业的网站建设seo快速排名软件价格
  • 杭州建设委员会网站什么是关键词广告
  • 河北邯郸做网站百度搜索排名机制
  • 做艺术文字的网站制作一个网站的费用是多少
  • php网站建设模板seo最新快速排名
  • b2b电子商务网站有发布软文的平台
  • 博达网站建设怎么建立下载代运营一家店铺多少钱
  • wordpress注册完成请检查电子邮件网站优化入门免费教程
  • 徐州网站建设的特点营销神器
  • untitled怎么做网页seo搜索引擎优化推广
  • 辛集做网站公司网站运营公司
  • 钙网logo设计免费seo技术培训课程
  • 网站建设 迅雷下载磁力猫引擎
  • 网上做淘宝优惠券的网站靠谱吗湖南靠谱seo优化公司
  • 网站怎么做微博认证如何做个人网站
  • 域名注册了后怎么建设网站单页网站设计
  • 网页设计有哪些软件重庆网站seo教程
  • wordpress做淘宝客网站网络优化的工作内容
  • 网站建设需要什么教材海外推广方案
  • 广州科技网站建设关键词林俊杰百度云
  • 成都网络推广中联无限上海seo推广整站
  • 网站媒体作风建设年工作总结站长工具中文
  • 北京装饰公司电话seo技术蜘蛛屯
  • 做团购的网站有哪些青岛网站seo
  • 如何用h5自己做网站百度官网客服
  • seo企业网站模板站长工具seo综合查询 分析
  • 网络营销又可以称为seo 资料包怎么获得
  • 体育馆做网站公司建站
  • 360免费建站pomhubseo优化内页排名
  • 好学校平台网站模板下载安装企业网站推广外包