图片列与链接列

本页演示 wpDataTables 中”图片列”与”链接列”的展示能力:图片列会把单元格里的图片地址(URL)自动渲染成缩略图,让数据表直接呈现商品或资源的视觉预览;链接列则把网址渲染为可点击的按钮或文字链接,访客点击即可跳转到对应的详情或购买页面。

下方是一个实时加载的数据表格。你会看到每行带有商品缩略图、可点击的链接入口,以及用货币格式显示的现价与原价、用百分比格式显示的折扣幅度。这种组合非常适合商品目录、资源清单等需要”图文 + 跳转 + 价格”一体化展示的场景。

图片与链接列

图片 编号 商品 类别 现价 原价 折扣 库存 评分 详情
SKU-0001 保温杯 B 家居 4,507.75 4,745.00 5.00 19 4.20 https://wordpress.955505.xyz/?p=1
SKU-0002 保温杯 C 办公用品 1,087.41 1,623.00 33.00 313 4.20 https://wordpress.955505.xyz/?p=2
SKU-0003 27寸显示器 D 食品 1,198.86 1,378.00 13.00 443 4.60 https://wordpress.955505.xyz/?p=3
SKU-0004 蓝牙耳机 E 家居 2,825.96 4,558.00 38.00 191 3.00 https://wordpress.955505.xyz/?p=4
SKU-0005 机械键盘 F 家居 3,297.32 4,849.00 32.00 403 4.30 https://wordpress.955505.xyz/?p=5
SKU-0006 U盘 G 服饰 252.54 366.00 31.00 26 3.20 https://wordpress.955505.xyz/?p=6
SKU-0007 27寸显示器 H 服饰 734.50 1,130.00 35.00 278 4.40 https://wordpress.955505.xyz/?p=7
SKU-0008 保温杯 I 服饰 2,020.00 2,020.00 0.00 258 5.00 https://wordpress.955505.xyz/?p=8
SKU-0009 蓝牙耳机 J 食品 2,179.20 2,270.00 4.00 431 4.70 https://wordpress.955505.xyz/?p=9
SKU-0010 无线鼠标 K 电子产品 1,510.96 2,222.00 32.00 431 4.40 https://wordpress.955505.xyz/?p=10
SKU-0011 蓝牙耳机 L 食品 836.40 984.00 15.00 279 4.30 https://wordpress.955505.xyz/?p=11
SKU-0012 蓝牙耳机 M 家居 2,951.52 4,472.00 34.00 456 4.70 https://wordpress.955505.xyz/?p=12
SKU-0013 人体工学椅 N 电子产品 453.75 605.00 25.00 215 3.90 https://wordpress.955505.xyz/?p=13
SKU-0014 保温杯 O 食品 843.60 1,110.00 24.00 458 4.40 https://wordpress.955505.xyz/?p=14
SKU-0015 U盘 P 办公用品 273.00 273.00 0.00 153 4.00 https://wordpress.955505.xyz/?p=15
SKU-0016 U盘 Q 家居 2,493.44 3,896.00 36.00 112 4.40 https://wordpress.955505.xyz/?p=16
SKU-0017 人体工学椅 R 电子产品 4,107.18 4,191.00 2.00 327 3.20 https://wordpress.955505.xyz/?p=17
SKU-0018 保温杯 S 电子产品 4,365.97 4,501.00 3.00 485 3.30 https://wordpress.955505.xyz/?p=18
SKU-0019 保温杯 T 服饰 2,121.90 3,215.00 34.00 493 4.80 https://wordpress.955505.xyz/?p=19
SKU-0020 蓝牙耳机 U 电子产品 893.65 1,465.00 39.00 451 4.60 https://wordpress.955505.xyz/?p=20
SKU-0021 LED台灯 V 食品 1,169.46 1,602.00 27.00 93 3.30 https://wordpress.955505.xyz/?p=21
SKU-0022 蓝牙耳机 W 办公用品 2,127.00 2,836.00 25.00 295 3.40 https://wordpress.955505.xyz/?p=22
SKU-0023 移动电源 X 办公用品 3,254.40 3,390.00 4.00 305 3.30 https://wordpress.955505.xyz/?p=23
SKU-0024 LED台灯 Y 家居 1,726.52 2,539.00 32.00 75 4.30 https://wordpress.955505.xyz/?p=24
SKU-0025 LED台灯 Z 家居 1,523.66 2,146.00 29.00 277 4.10 https://wordpress.955505.xyz/?p=25
SKU-0026 人体工学椅 A 办公用品 2,809.62 3,267.00 14.00 308 3.10 https://wordpress.955505.xyz/?p=26
SKU-0027 无线鼠标 B 家居 1,335.70 1,805.00 26.00 344 4.30 https://wordpress.955505.xyz/?p=27
SKU-0028 移动电源 C 办公用品 1,872.04 2,753.00 32.00 259 3.80 https://wordpress.955505.xyz/?p=28
SKU-0029 保温杯 D 家居 3,317.25 4,423.00 25.00 28 4.80 https://wordpress.955505.xyz/?p=29
SKU-0030 机械键盘 E 家居 2,277.00 3,036.00 25.00 226 3.90 https://wordpress.955505.xyz/?p=30
编号 商品 类别 库存 评分
  • 图片列:在数据源中填写图片的完整 URL,并将该列类型设置为”图片”,表格会自动生成统一尺寸的缩略图,避免大图撑乱布局。
  • 链接列:将列类型设置为”URL/链接”,可选择以按钮或文字形式呈现,并自定义链接文案与新标签页打开,提升点击体验。
  • 价格与折扣:把”现价””原价”列设为货币格式(统一货币符号与小数位),”折扣”列设为百分比格式,数值展示更专业、更易对比。
  • 展示建议:将图片、链接与价格列合理排序,并开启排序与搜索,方便访客在商品目录或资源列表中快速定位目标。
  • 本页使用的短代码: