当前位置:网站首页>el-table的render-header用法
el-table的render-header用法
2022-07-02 02:42:00 【一加一不是二】
el-table,:render-header
<template>
<el-table :data="tabledata" style="width: 100%" border>
<el-table-column prop="oldOrderBy" label="排序" :render-header="renderHeader">
</el-table-column>
<el-table-column prop="productName" label="产品名称"></el-table-column>
</el-table>
</template>
<script>
export default {
data() {
return {
tabledata: [],
isDragon:true
};
},
created() {
this.getTableData()
},
methods: {
renderHeader(h, { column }) {
return h('span', { style: { padding: '0' } },
[
h('span', { style: { paddingRight: '3px' } }, column.label),
h('a', {
style: { color: '#008AE1', fontSize: '12px' },
on: { click: () => { this.isDragon = false } },
props: { content: column.label },
}, '编辑')
]
)
},
getTableData() {
this.tabledata = [{oldOrderBy:1,productName:'产品一'},
{oldOrderBy:2,productName:'产品二'}];
},
}
};
</script>
边栏推荐
- SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
- oracle创建只读权限的用户简单四步走
- If you want to rewind the video picture, what simple methods can you use?
- Summary of some experiences in the process of R & D platform splitting
- Deployment practice and problem solving of dash application development environment based on jupyter Lab
- Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
- C # use system data. The split mixed mode assembly is generated for the "v2.0.50727" version of the runtime, and it cannot be loaded in the 4.0 runtime without configuring other information
- Cesium dynamic diffusion point effect
- 2022-2028 global military computer industry research and trend analysis report
- Pychart creates new projects & loads faster & fonts larger & changes appearance
猜你喜欢
[opencv] - comprehensive examples of five image filters
How to hide the scroll bar of scroll view in uniapp
[liuyubobobo play with leetcode algorithm interview] [00] Course Overview
Special symbols in SAP ui5 data binding syntax, and detailed explanation of absolute binding and relative binding concepts
Infix expression to suffix expression (computer) code
If you want to rewind the video picture, what simple methods can you use?
CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
[question 008: what is UV in unity?]
STM32__ 05 - PWM controlled DC motor
Leetcode face T10 (1-9) array, ByteDance interview sharing
随机推荐
MongoDB非關系型數據庫
超图iServer rest服务之feature查询
Share the basic knowledge of a common Hongmeng application
附加:信息脱敏;
How to hide the scroll bar of scroll view in uniapp
A quick understanding of analog electricity
How to batch add background and transition effects to videos?
Face++ realizes face detection in the way of flow
2022 low voltage electrician test question simulation test question bank simulation test platform operation
[staff] pitch representation (bass clef | C1 36 note pitch representation | C2 48 note pitch representation | C3 60 note pitch representation)
A quick understanding of digital electricity
JS slow animation
Quality means doing it right when no one is looking
Decipher the AI black technology behind sports: figure skating action recognition, multi-mode video classification and wonderful clip editing
Coordinatorlayout + tablayout + viewpager2 (there is another recyclerview nested inside), and the sliding conflict of recyclerview is solved
Which kind of sports headphones is easier to use? The most recommended sports headphones
批量检测url是否存在cdn—高准确率
Comparative analysis of MVC, MVP and MVVM, source code analysis
Connected block template and variants (4 questions in total)
STM32__05—PWM控制直流电机