fix: 样式扩展增加显示商品属性的方法

This commit is contained in:
邹景立 2025-05-03 12:36:23 +08:00
parent 7cbf6e6163
commit 8fe550f83f
2 changed files with 16 additions and 0 deletions

View File

@ -45,4 +45,12 @@ $(function () {
window.showTableImage = function (image, circle, size, title) { window.showTableImage = function (image, circle, size, title) {
return $.layTable.showImage(image, circle, size, title); return $.layTable.showImage(image, circle, size, title);
}; };
// 显示商品规格
window.showSpec = function (spec) {
let names = [];
return layui.each(spec.split(';;'), function (i, vv) {
names.push(vv.split('::').pop());
}), names.join(' ');
}
}); });

View File

@ -45,4 +45,12 @@ $(function () {
window.showTableImage = function (image, circle, size, title) { window.showTableImage = function (image, circle, size, title) {
return $.layTable.showImage(image, circle, size, title); return $.layTable.showImage(image, circle, size, title);
}; };
// 显示商品规格
window.showSpec = function (spec) {
let names = [];
return layui.each(spec.split(';;'), function (i, vv) {
names.push(vv.split('::').pop());
}), names.join(' ');
}
}); });