update 优化 excel 导出字典默认转为下拉框

This commit is contained in:
疯狂的狮子Li
2023-07-28 20:00:58 +08:00
parent 0c09adfe0a
commit 1cabccc9a8
14 changed files with 22 additions and 21 deletions

View File

@ -128,6 +128,9 @@ public class ExcelDownHandler implements SheetWriteHandler {
}
}
}
if (CollUtil.isEmpty(dropDownOptions)) {
return;
}
dropDownOptions.forEach(everyOptions -> {
// 如果传递了下拉框选择器参数
if (!everyOptions.getNextOptions().isEmpty()) {

View File

@ -196,10 +196,8 @@ public class ExcelUtil {
// 合并处理器
builder.registerWriteHandler(new CellMergeStrategy(list, true));
}
if (CollUtil.isNotEmpty(options)) {
// 添加下拉框操作
builder.registerWriteHandler(new ExcelDownHandler(options));
}
// 添加下拉框操作
builder.registerWriteHandler(new ExcelDownHandler(options));
builder.doWrite(list);
}