el表达式取整

利用jstl的格式化标签fmt进行转化

代码如下:

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>el表达式取整</title>
</head>
<body>
<div>
  价格:<fmt:formatNumber value="${money}"></fmt:formatNumber>
</div>
</body>
</html>

 

分页有问题多分出来400页<div class=“block”> <el-pagination layout=“prev, pager, next” :total=“total” :current-page=“currentPage” @current-change=“handleCurrentChange”> </el-pagination> </div><script th:inline=“javascript”> document.addEventListener(“DOMContentLoaded”, function () { // 直接使用 Thymeleaf 表达式 const dataArray = /*[[ParseError: KaTeX parse error: Expected '}', got '#' at position 96: &hellip; el: '#̲app', &hellip;/, message: ‘请输入正确的手机号’, trigger: ‘blur’} // ], } }, methods: { performSearch() { // 保留当前分页参数(可选) const url = new URL(window.location.href); url.searchParams.set(‘ALARMTIMEKEY’, this.searchKeyword); url.searchParams.set(‘page’, 1); // 重置到第一页 window.location.href = url.toString(); }, handleCurrentChange(val) { alert(this.currentPage) if (this.dialogVisible) { this.$message.warning('请先关闭当前编辑窗口'); return; } this.currentPage = val; window.location.href = `/index?page=${val}&size=${dataArray.size}`; }, async fetchTableData(id) { try { const response = await fetch(`/list?page=${this.currentPage}&size=${dataArray.size}&id=${id}`); if (!response.ok) { throw new Error('Network response was not ok'); } const data = await response.json(); this.tableData = data.data.records || []; this.total = parseInt(data.data.total) || 0; } catch (error) { console.error('Error fetching table data:', error); this.$message.error('获取表格数据失败'); } } } }); }); </script>
最新发布
03-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值