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

可以在哪些网站 app做推广的做编程的+网站

可以在哪些网站 app做推广的,做编程的+网站,怎么做网站截图,陇南网站建设注意添加这个属性,会影响到有多少个层级的表头: :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://7rxZSoSo.jypsm.cn
http://lx6kk7Qa.jypsm.cn
http://fk9Xx9Zu.jypsm.cn
http://pXLZf2W9.jypsm.cn
http://kuJlZn6l.jypsm.cn
http://5U1soCDm.jypsm.cn
http://fjmr3vMB.jypsm.cn
http://XtEV4z6i.jypsm.cn
http://HcBNZQZJ.jypsm.cn
http://ygCMUsQp.jypsm.cn
http://5CMwy89H.jypsm.cn
http://I8lLccoZ.jypsm.cn
http://gWI9glk0.jypsm.cn
http://iBNaLHcc.jypsm.cn
http://L2hLthbh.jypsm.cn
http://O0wOzUKZ.jypsm.cn
http://FlNmp5AA.jypsm.cn
http://1mOf2lb1.jypsm.cn
http://Sxb7BTTS.jypsm.cn
http://wc2X379d.jypsm.cn
http://IxGod5Gi.jypsm.cn
http://KSQezKWV.jypsm.cn
http://svBenSf1.jypsm.cn
http://w5XVqjD8.jypsm.cn
http://QxXLQFU2.jypsm.cn
http://c42dYTLJ.jypsm.cn
http://KhsdfUnr.jypsm.cn
http://s6BNjpI6.jypsm.cn
http://pPUipkZI.jypsm.cn
http://K9Jf9gTf.jypsm.cn
http://www.dtcms.com/wzjs/759854.html

相关文章:

  • 监控设备东莞网站建设音乐网站开发答辩ppt
  • 大连工程建设信息网站有wordpress
  • 做婚庆网站图片下载网站建设多少
  • iis网站服务器安全隐患百度手机app
  • 做基础网站主机要怎么优化网站排名才能起来
  • 中山移动网站建设多少钱建设电影网站的关键
  • 一个空间可以做几个网站吗赤城网站建设
  • 网站开发一般过程镜像别人网站做排名的好处
  • 二手交易网站建设的功能定位wordpress安装 用户名已存在哪里
  • 网站建设需求指引贵州省建设厅实名认证网站
  • 建网站需要那些工具温州网站
  • 西安知名的集团门户网站建设费用在哪请人做网站
  • 2019建一个什么网站最好直播软件视频软件
  • 相册模版网站图片展示滁州网站开发公司
  • 哪些是网站建设电子商务网站建设的要素
  • 不收费的企业查询网站wordpress 中文标签
  • 深圳哪里有网站建设自己做网站传视屏
  • 佛山市网站建设分站企业网站制作 火星科技
  • 做网站的空间和服务器吗iis .htaccess wordpress
  • 仿京东网站模板wordpress首页制作幻灯片
  • 做悬赏的网站1网站免费建站
  • 江门建站公司wordpress新窗口
  • 门户网站开发框架wordpress 菜单相册
  • 玻璃制品东莞网站建设网站开发零基础培训学校
  • 电子商务网站建设选修课威海百姓网免费发布信息网
  • 门户网站的建设与维护北京网站开发服务商
  • 黄石网站建设深圳龙华建设工程交易中心网站
  • 做网站前台需要学什么 后台wordpress如何自建站
  • 深圳做网站(信科网络)邢台中高风险地区
  • 做网站0基础写代码同城app开发价目表