找回密码
 立即注册
首页 资源区 代码 如何使用 vue vxe-table 来实现一个产品对比表表格 ...

如何使用 vue vxe-table 来实现一个产品对比表表格

庞悦 2025-6-26 21:48:57
如何使用 vue  vxe-table 来实现一个产品对比表表格
查看官网:https://vxetable.cn
gitbub:https://github.com/x-extends/vxe-table
gitee:https://gitee.com/x-extends/vxe-table
效果

1.gif

代码
  1. <template>
  2.   
  3.     <vxe-grid v-bind="gridOptions">
  4.       <template #img11>
  5.         <vxe-image src="https://vxeui.com/resource/productImg/m11.jpg" width="100%"></vxe-image>
  6.       </template>
  7.       <template #img12>
  8.         <vxe-image src="https://vxeui.com/resource/productImg/m12.jpg" width="100%"></vxe-image>
  9.       </template>
  10.       <template #img21>
  11.         <vxe-image src="https://vxeui.com/resource/productImg/m21.jpg" width="100%"></vxe-image>
  12.       </template>
  13.       <template #img22>
  14.         <vxe-image src="https://vxeui.com/resource/productImg/m22.jpg" width="100%"></vxe-image>
  15.       </template>
  16.       <template #img31>
  17.         <vxe-image src="https://vxeui.com/resource/productImg/m31.jpg" width="100%"></vxe-image>
  18.       </template>
  19.       <template #img32>
  20.         <vxe-image src="https://vxeui.com/resource/productImg/m32.jpg" width="100%"></vxe-image>
  21.       </template>
  22.       <template #cell11="{ row }">
  23.         {{ row.product11 ? '✔️' : '❌' }}
  24.         {{ row.product11 }}
  25.       </template>
  26.       <template #cell12="{ row }">
  27.         {{ row.product12 ? '✔️' : '❌' }}
  28.         {{ row.product12 }}
  29.       </template>
  30.       <template #cell21="{ row }">
  31.         {{ row.product21 ? '✔️' : '❌' }}
  32.         {{ row.product21 }}
  33.       </template>
  34.       <template #cell22="{ row }">
  35.         {{ row.product22 ? '✔️' : '❌' }}
  36.         {{ row.product22 }}
  37.       </template>
  38.       <template #cell31="{ row }">
  39.         {{ row.product31 ? '✔️' : '❌' }}
  40.         {{ row.product31 }}
  41.       </template>
  42.       <template #cell32="{ row }">
  43.         {{ row.product32 ? '✔️' : '❌' }}
  44.         {{ row.product32 }}
  45.       </template>
  46.     </vxe-grid>
  47.   
  48. </template>
复制代码
https://gitee.com/x-extends/vxe-table

来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
您需要登录后才可以回帖 登录 | 立即注册