[web教学] vue的h渲染函数和customRender在ant design vue的table组件的使用

[复制链接]
查看900 | 回复7 | 2023-8-23 11:49:39 | 显示全部楼层 |阅读模式 来自 中国北京
需求和办理



  • 使用ant design vue 的table组件,没有使用插槽的情况下,我想你给我使用tooltip,这样子我就不消又写插槽又写html结构了
  • 因为我们使用table组件,想自界说结构,一样寻常是先使用插槽,然后插槽填写内容,比如下面做法
  1. const columns = [
  2.   {
  3.     title:'演示',
  4.     dataIndex:'demo',
  5.     slots:{customRender:'demo'},
  6.     ellipsis:true,
  7.     align:'center',
  8.   },
  9.   ]
  10. <a-table :columns="columns">
  11.         <template #demo={record,text}>
  12.         <!--要书写的结构-->
  13.         <a-tooltip>
  14.                 <template #title>我是内容</template>
  15.             我是内容
  16.         </a-tooltip>
  17.     </template>
  18. </a-table>
复制代码


  • 这个时间我们可以使用组件列表columns说明的customRender属性来简化这一个操纵
  1. import {h} from "vue";
  2. import {Tooltip} from "ant-design-vue";
  3. columns = [
  4.   {
  5.     title:'演示',
  6.     dataIndex:'demo',
  7.     slots:{customRender:'demo'},
  8.     ellipsis:true,
  9.     align:'center',
  10.     customRender:({record})=>{
  11.       return h(Tooltip,{title:record.corpName,placement:'top'},{ default: () => record.corpName })
  12.     }
  13.   }
  14. ]
  15. <a-table :columns="columns"></a-table>
  16. <!--这上面一行代码就等同于下面的代码-->
  17. <a-table :columns="columns">
  18.         <template #demo={record,text}>
  19.         <!--要书写的结构-->
  20.         <a-tooltip>
  21.                 <template #title>我是内容</template>
  22.             我是内容
  23.         </a-tooltip>
  24.     </template>
  25. </a-table>
  26.   
复制代码
来源:https://blog.csdn.net/u014582342/article/details/127580431
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

FrankJScott | 2025-5-6 21:24:19 | 显示全部楼层 来自 英国

Great Login Tajir4D Tips

For the man asking about slot play online, link togel dan slot, daftar situs slot terbesar di indonesia, daftar situs togel online terpercaya, judi slot online terpercaya, situs slot terbesar indonesia, slot pragmatic, situs casino online, situs togel online resmi terpercaya, deposit dengan pulsa,  I highly recommend this more about tajir4d details or aplikasi link togel, web slot terbaru, slot judi online terpercaya, toto terbesar, situs habanero, situs slot bisa deposit pulsa, games online terbaru, slot play, toto togel, play pragmatic slot, which is worth considering with this clicking here on tajir4d link alternatif details together with situs online resmi, apa judi slot, situs judi slot gampang menang, situs judi online slot, main game slot online, slot yang asli, situs online terbaru, situs resmi slot online, rekomendasi situs judi slot online, pemenang judi slot, on top of this additional resources on login tajir4d details which is also great. Also, have a look at this useful login tajir4d blog as well as main game slot, situs togel 2d, yang kami, situs slot tembak ikan, situs togel yang aman dan terpercaya, slot pragmatic play, situs situs slot terbaik, judi online resmi, situs slot terbesar di indonesia, situs agen slot, alongside all this dig this on tajir4d url alongside all situs slot asli, permainan slot terbaru, slot situs terpercaya, situs lengkap togel, situs idn live,  right here on not to mention agen slot joker, slot game terbaru, tentang slot online, slot yg bisa deposit pulsa, nama situs judi slot online,  for good measure. Check more @ Great Tajir4D Link Alternatif Site 3_52177
回复

使用道具 举报

FrankJScott | 2025-5-7 02:03:35 | 显示全部楼层 来自 英国

Useful Laser Facial Skin Treatment Blog

In response to the guy talking about best co2 laser for face, microneedling skin tightening, skin care peels, best rf microneedling treatment, microneedling in florida, laser treatment for skin tightening, cosmetic skin treatment, face fillers juvederm, facial aesthetics sarasota, prp facial,  I highly recommend this over at this website about laser treatment results blog or prp vampire, chemical peel treatment for face, dermaplane facial, laser therapy for skin tightening, ultimate med spa, dermal filler lip enhancement, minimally invasive non surgical thread, non surgical skin tightening, priapus shot, best non surgical face treatments, not forgetting sites such as this cool laser facial skin tightening link on top of best chemical peel treatment, perfect aesthetics, fl aesthetics, non invasive thread lift, non invasive treatments for facial rejuvenation, best skin care treatment, best co2 laser skin resurfacing, we aesthetics, hair aesthetics, treatment laser treatment, which is worth considering with this find about laser spa Sarasota advice which is also great. Also, have a look at this continue about laser spa Sarasota forum not forgetting sites such as aesthetics medical, face tightening and lifting, prp fillers, medical skin care treatments, tissue tightening, fibroblast skin tightening, microneedling with peel, red light therapy skin products, skin rejuvenation process, facial rejuvenation injections, bearing in mind this top rated laser treatment results advice which is worth considering with renuva fat, laser face peel, led light therapy on skin, lift for skin, skin care after laser treatment,  recommended reading on and don't forget spa aesthetics, good lip fillers, about dermal fillers, o injections, us aesthetics,  for good measure. Check more @ Great Best Laser Tr 6bab48d
回复

使用道具 举报

FrankJScott | 2025-5-26 23:08:36 | 显示全部楼层 来自 英国

New DVL TOTO Guide

For the guy inquiring about permainan slot adalah, togel terpercaya indonesia, permainan judi yang gampang menang, game slot online terpercaya, permainan judi togel, kumpulan situs slot online terbaik, toto online terbaik, agen togel singapore, mesin slot terbaik, situs agen togel terpercaya,  I highly suggest this top DVLTOTO forum or pada slot, situs resmi togel terpercaya, slot game adalah, judi slot uang asli, situs terbaik slot online, pojok slot login, slot permainan, togel online terbesar dan terpercaya, situs judi on, habanero slot online, on top of this great post to read on DVL TOTO link on top of situs alternatif, situs slot pg soft, slot jackpot, situs slot game, memainkan permainan, situs togel slot terpercaya, buat slot, bandar togel online terbesar, situs bandar slot terpercaya, permainan game slot online, alongside all this for beginners about DVL TOTO blog which is also great. Also, have a look at this recommended you read on DVL TOTO tips alongside all bandar togel online terbesar, permainan yang dapat, game slot tembak ikan, permainan tembak ikan judi, situs casino terbaik, antara slot login, pg soft login, link slot spadegaming, link slot terpercaya di indonesia, rupiah slot login, not forgetting sites such as this my sources on DVL TOTO link alongside all situs bandar togel online terpercaya, permainan casino online, situs online slot terbaik, situs judi online terpercaya, situs judi slot terbaik dan terpercaya,  total stranger on not to mention joker gaming slot, situs situs slot terbaik, situs judi indonesia, situs agen, slot pragmatic,  for good measure. Check more @ Great Laser Treatment Near Me Info fd98ce0
回复

使用道具 举报

FrankJScott | 2025-5-27 08:50:56 | 显示全部楼层 来自 英国

Top Rated TAJIR4D Login Website

In reply to the person talking about link alternatif slot, togel online terbesar dan terpercaya, indonesia slot, situs toto online terpercaya, link slot online terpercaya, games slot pg, bisa bermain, slot game uang asli, game slot mudah jackpot, situs togel bonus,  I highly recommend this top rated Tajir4D advice or tentang judi slot, situs resmi web bandar judi togel, jenis permainan slot yang mudah menang, provider slot terbaik, situs resmi togel terpercaya, situs judi slot indonesia, kumpulan situs judi slot terpercaya, bandar togel terbesar terpercaya, daftar game slot online terpercaya, situs terbaru slot online, not forgetting sites such as this high rated Tajir4D blog alongside all aplikasi togel online terpercaya, slot terbaik pg soft, slot micro gaming, situs slot terbesar di indonesia, perjudian slot, login link alternatif, togel terpercaya indonesia, situs bandar online terpercaya, agen judi slot online terpercaya, website judi slot terpercaya, which is worth considering with this top rated TAJIR4D Login blog which is also great. Also, have a look at this high rated Tajir4D site alongside all bermain togel, togel online terbaik, agen judi, sbobet alternatif, bandar online terpercaya di indonesia, situs judi game slot terbaik, slot yg gampang menang, game slot yg mudah menang, slot bandar togel, link slot yang mudah menang, on top of this great post to read on Tajir4D link together with permainan casino yang mudah menang, permainan slot paling mudah menang, situs judi slot terpercaya, game judi slot online terbaik, situs slot terbesar terpercaya,  over at this website on which is worth considering with link slot judi terpercaya, slot live, judi tembak ikan online terpercaya, tentang slot online, situs slot terbesar di indonesia,  for good measure. Check more @ Updated DVL TOTO Blog 6043b3f
回复

使用道具 举报

FrankJScott | 4 天前 | 显示全部楼层 来自 英国

Awesome We Buy House As Is Blog

In reply to the lady asking about purchase homes, house is sold, sell my house fast ri, sell my house fast iowa, ways to sell a house quickly, offer on the house, we will buy your home, need to sell house quickly, home buyer investors, need to sell fast,  I highly recommend this cool quick house buy blog or houses in sell, sell property, sell my inherited property, home quickly, buy chalet, sell and buy a home, houses company, house sale sale, sell my house fast usa, ways to sell your home, as well as this related site for quick house buy advice on top of home quickly, all houses, offer on the house, sell my house cash fast, we buy houses legit, buy houses for cash reviews, sell my house fast indiana, houses in area for sale, i want to buy the house, buying property to sell, alongside all this killer deal for quick house buy info which is also great. Also, have a look at this made my day on quick house buy blog and don't forget buy my house cash, looking to sell your home, we buy houses fast for cash, cash home purchase process, sell that house, sell bungalow, property offer, i need to sell my home, your house, quick buy and sell, on top of this learn more for quick house buy link on top of i sold my home, home on sell, cash buyer property for sale, we sell houses fast for cash, sell your property for cash,  redirected here about not forgetting sites such as sell home, usa homes, sell my house instantly, want to sale my house, buy your property,  for good measure. Check more @ Best AI Stock Picker Platform Guide ab48d8c
回复

使用道具 举报

FrankJScott | 昨天 05:23 | 显示全部楼层 来自 英国

Cool 322 Togel Blog

For the person inquiring about apk judi online, cara transfer ke bank indonesia, rtp slot online, 4d toto 4d, cara kirim uang dari dana ke link aja, main judi online, olympus slot game, hacksaw slot, informasi bank mandiri, login jago,  I highly recommend this top DVL TOTO details or cara buat akun link aja, agar menang main slot, rtp slot itu apa, login ke dana, bca casino, cara login link aja, bca link aja, slot home, online slot indonesia, slot rtp gacor, together with this top 322toto tips as well as pada slot, main judi online, cara tf bank bca ke bri, tutorial transfer bank bri, cara transfer bank mandiri ke bank mandiri, play to win casino apk, mega cuan 88 slot, cara transfer bank bri ke bank bni, rtp slot games, situs slot bank mandiri online 24 jam, and don't forget this link for 322 Togel link which is also great. Also, have a look at this read more here for 322 Togel details not forgetting sites such as sistem main slot, mega88 online casino, slot server singapore, link judi online, apk judi online, cara transfer dari link aja ke dana, cara tambah saldo, login linkaja, download game judi, rtp slot game, and don't forget this this site on CUANSLOT88 details on top of bank rama, bandar judi terbesar, megagacor login, nama situs judi slot online, slot yg,  next page about not forgetting sites such as hot slot, apa saja game slot, cara toto, cara mengisi saldo akun dana, cara daftar aplikasi link aja,  for good measure. Check more @ Top Laser Spa Sarasota Website 1d047ad
回复

使用道具 举报

FrankJScott | 昨天 09:00 | 显示全部楼层 来自 英国

Recommended Unigox Onramp Offramp Info

For the people asking about web 3 crypto, crypto company, cool crypto websites, start crypto, web 3 and crypto, starting in crypto, paying in crypto, crypto p2p, krypto web, web3 payment,  I highly suggest this experienced for unigox usdt exchange info or crypto and web3, start crypto, useful crypto websites, web3 crypto, crypto website, crypto hotline, crypto growth, cryptocurrency meaning, web3 payment, crypto as payment, alongside all this go to the website on unigox crypto platform tips bearing in mind crypto company meaning, crypto web 3, crypto meaning, web3 crypto, crypto tel, crypto payment meaning, starting in crypto, payment crypto, p2p in crypto, crypto payment website, on top of this his comment is here on unigox onramp offramp url which is also great. Also, have a look at this super fast reply on unigox wallet advice not forgetting sites such as crypto as payment, payment by crypto, crypto and web3, crypto hotline, crypto contacts, crypto payment, https crypto, crypto company, crypto meaning, p2p crypto meaning, and don't forget this best unigox wallet link together with payment crypto, crypto helpline, crypto contacts, start a crypto, career in crypto,  over at this website for on top of crypto web 3, start with crypto, crypto payment meaning, company crypto, crypto p2p,  for good measure. Check more @ Updated Laser Treatment Spots Face Sarasota Tips 6043b3f
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则