当前位置:网站首页>Render header usage of El table
Render header usage of El table
2022-07-02 02:45:00 【One plus one is not two】
el-table,:render-header
<template>
<el-table :data="tabledata" style="width: 100%" border>
<el-table-column prop="oldOrderBy" label=" Sort " :render-header="renderHeader">
</el-table-column>
<el-table-column prop="productName" label=" The product name "></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 },
}, ' edit ')
]
)
},
getTableData() {
this.tabledata = [{oldOrderBy:1,productName:' Product 1 '},
{oldOrderBy:2,productName:' Product 2 '}];
},
}
};
</script>
边栏推荐
- STM32F103 - two circuit PWM control motor
- Build a modern data architecture on the cloud with Amazon AppFlow, Amazon lake formation and Amazon redshift
- Use the open source project [banner] to achieve the effect of rotating pictures (with dots)
- [learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
- query词权重, 搜索词权重计算
- Face++ realizes face detection in the way of flow
- What is the principle of bone conduction earphones and who is suitable for bone conduction earphones
- How to run oddish successfully from 0?
- 2022-2028 global manual dental cleaning equipment industry research and trend analysis report
- Kibana操控ES
猜你喜欢
Which kind of sports headphones is easier to use? The most recommended sports headphones
Coordinatorlayout + tablayout + viewpager2 (there is another recyclerview nested inside), and the sliding conflict of recyclerview is solved
How to turn off the LED light of Rog motherboard
How to run oddish successfully from 0?
Feature query of hypergraph iserver rest Service
Soul app released the annual report on generation Z behavior: nearly 20% of young people love shopping in the vegetable market
Mongodb base de données non relationnelle
Après le mariage
Which brand of sports headset is better? Bluetooth headset suitable for sports
Remote connection to MySQL under windows and Linux system
随机推荐
JVM interview
SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
Baohong industry | four basic knowledge necessary for personal finance
[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
Es interview questions
自定义组件的 v-model
[liuyubobobo play with leetcode algorithm interview] [00] Course Overview
Remote connection to MySQL under windows and Linux system
Jvm-01 (phased learning)
CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
Use the open source project [banner] to achieve the effect of rotating pictures (with dots)
What kind of good and cost-effective Bluetooth sports headset to buy
[opencv] - comprehensive examples of five image filters
How to hide the scroll bar of scroll view in uniapp
Quality means doing it right when no one is looking
[staff] restore mark (Introduction to the use of restore mark | example analysis of Metaphone mark and restore mark)
CVPR 2022 | Dalian Institute of technology proposes a self calibration lighting framework for low light level image enhancement of real scenes
实现一个自定义布局的扫码功能
2022-2028 global wood vacuum coating machine industry research and trend analysis report
2022-2028 global soft capsule manufacturing machine industry research and trend analysis report