摘要: 在Java中,可以使用split()方法来分割字符串。split()方法接受一个正则表达式作为参数,根据该正则表达式将字符串分割成一个字符串数组。 public class Main { public static void main(String[] args) { String str = "H 阅读全文
posted @ 2023-11-26 07:06 dmyi 阅读(500) 评论(0) 推荐(0)
摘要: 在Java中,可以使用BigDecimal类来处理金额 import java.math.BigDecimal; public class Main { public static void main(String[] args) { BigDecimal amount = new BigDecim 阅读全文
posted @ 2023-11-26 07:03 dmyi 阅读(223) 评论(0) 推荐(0)
摘要: 1. 在输入框的change事件中添加验证逻辑: <template> <view> <input type="number" v-model="amount" @change="validateAmount" /> </view></template> 2. 在methods中定义validate 阅读全文
posted @ 2023-11-26 06:54 dmyi 阅读(630) 评论(0) 推荐(0)
摘要: 1. 前端编码,解码函数 // 将字符串转换为base64编码export function stringToBase64(str) { return btoa(unescape(encodeURIComponent(str)));} // 将base64编码转换为字符串export functio 阅读全文
posted @ 2023-11-26 06:47 dmyi 阅读(3258) 评论(0) 推荐(0)