修改样式,修改不能输入负数的问题

This commit is contained in:
2025-09-19 14:37:33 +08:00
parent aea85af0f9
commit 345a362c74
17 changed files with 212 additions and 56 deletions

View File

@@ -19,6 +19,7 @@ Page({
*/
onLoad(options) {
const { id } = options;
this.getMeterList(id)
},
async getMeterList(id) {
@@ -29,7 +30,8 @@ Page({
}
this.setData({
meterList: data?.meterRouteDetail || [],
meterInfo: data?.meterRouteDetail?.[0] || {}
meterInfo: data?.meterRouteDetail?.[0] || {},
routeId: id
})
},
changeMeter(e) {
@@ -46,7 +48,7 @@ Page({
handleNext() {
const { active = 0, meterList } = this.data;
let newIndex = active + 1
if (active > meterList?.length - 1) {
if (newIndex > meterList?.length - 1) {
newIndex = meterList?.length - 1
}
this.setData({
@@ -58,6 +60,11 @@ Page({
active: this.data.active === 0 ? 0 : this.data.active - 1
})
},
onSetFinishNumber(e) {
this.setData({
finishNumber: e.detail,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/