当前位置:网站首页>成立时间用了时间插件,但在网页上修改参数的时候,如果未修改时间第一次保存会报错,第二次才行
成立时间用了时间插件,但在网页上修改参数的时候,如果未修改时间第一次保存会报错,第二次才行
2022-06-21 05:50:00 【连胜是我偶像】
背景:
新增时间插件,学习参考网址:日期和时间组件文档 - Layui (pearadmin.com)
在对应的新增编辑js模块,使用laydate组件

然后在新增编辑 html 模块,使用laydate对应的 id 引用

配置好了后,进行重启工程,测试时间插件效果

解决:后端需要修改一下JacksonConfig.class配置
@Override
public TemplateModel wrap(Object object) throws TemplateModelException {
if (object instanceof LocalDate) {
return new SimpleScalar(DateTimeFormatter.ofPattern(TimeFormat.DEFAULT_DATE_FORMAT).format(((LocalDate) object)));
}
if (object instanceof LocalTime) {
return new SimpleScalar(DateTimeFormatter.ofPattern(TimeFormat.DEFAULT_TIME_FORMAT).format(((LocalTime) object)));
}
if (object instanceof LocalDateTime) {
return new SimpleScalar(DateTimeFormatter.ofPattern(TimeFormat.DEFAULT_DATE_TIME_FORMAT).format(((LocalDateTime) object)));
}
return super.wrap(object);
}

边栏推荐
- Analog ambient light sensor chip used in backlight display of electronic products
- Kali shortcut keys and settings
- DP backpack summary
- 数字式温度传感器工作原理以及测温原理分析
- 【Grafana】Grafana Mimir在海量时间序列指标中的优化
- 新零售品牌“三只松鼠”遇挫,摆脱困境的两大方法
- Ironocr 2022.1.0 supports 127 national languages
- A comprehensive interpretation of the gold content, detailed introduction and test strategy of CKA certification
- 【Prometheus】Prometheus联邦的一次优化记录
- Canvas制作经典贪吃蛇
猜你喜欢

Small program design scheme for appointment of beauty agencies

Librosa 𞓜 the most humorous explanation of Mel spectrum

BGP - route announcement and reflector (explanation + configuration command)

Implementation and analysis of transformer model

Vscode+platformio development STM32 (VII)

应用在LED植物照明中的LED照明灯

Factory pattern

AI open day - how to optimize product and business revenue by adopting open source technology

Private board of directors of science and technology innovators · digital intelligence future (issue 4): demonstration of transformation - survivor bias and blind people touching elephants

C#常用Chart组件
随机推荐
Deep thinking caused by a namenode RPC delay troubleshooting
Research and Analysis on the current situation of China's video conference transcription market and forecast report on its development prospects (2022)
Eth Denver conference is a Web3 foam signal? See what investors and builders say respectively
基于注意力的seq2seq模型
新零售品牌“三只松鼠”遇挫,摆脱困境的两大方法
arm权威指南及我们组项目笔记
Qaudiooutput use
vscode+platformIO开发STM32(七)
Global and Chinese markets for implantable heart devices 2022-2028: Research Report on technology, participants, trends, market size and share
librosa | 梅尔谱图最幽默的解释
ssh-copy-id 批量免密脚本
Embedded programming complexity
[open source tutorial] DIY tutorial of 2020 new version of brushless power regulation [Author: I love loli love loli] (brief introduction and circuit construction)
Sentinel fusing and current limiting is really too slippery
DosBox安装
The writing style of the construction and interpretation of the mini LISP interpreter
Importance of variables in code
Huashao, founder of Kechuang · kuxuan Technology: make products with win-win thinking, connect ecology, and realize large-scale development
build opencv3.4.16
Application of JS promise