From ec51573a2733e7b64c81903b2953edf8786672c0 Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 03 七月 2024 09:40:00 +0800 Subject: [PATCH] # --- pages/mat/matSelected.vue | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue index 10d3118..a625ec9 100644 --- a/pages/mat/matSelected.vue +++ b/pages/mat/matSelected.vue @@ -24,7 +24,7 @@ <view class="form-item"> <view class="form-item-desc"><text>鏁伴噺</text></view> <view class="form-item-content"> - <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" /> + <uni-number-box :value="mat.anfme" :max="max" :step='1' color="#747474" @change="changeValue" /> </view> </view> </view> @@ -48,6 +48,7 @@ }, baseIP:'', basePORT:'', + max: 99999999 } }, onLoad(option) { @@ -63,7 +64,15 @@ eventChannel.on('mat', function(data) { that.mat = data.data console.log(data.data); - that.mat.anfme = 1 + if (data.data.maxNum > 0) { + that.mat.anfme = data.data.maxNum + that.max = data.data.maxNum + } else if (data.data.maxNum == 0) { + uni.showToast({title: '褰撳墠鐗╂枡鏈�澶у彲鍏ユ暟閲忎负 0', icon: "none", position: 'top'}); + that.mat.anfme = 0 + that.max = data.data.maxNum + } + }) -- Gitblit v1.9.1