From ab70c6eb4a181b282af0eb200275cd8a4d2ab172 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 13 十一月 2024 16:41:32 +0800
Subject: [PATCH] 2024.11.13

---
 component/inputcell/inputcell.wxml |   40 +++++++++++++++++++++++++++++++---------
 1 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/component/inputcell/inputcell.wxml b/component/inputcell/inputcell.wxml
index 61ee1f0..b70eda8 100644
--- a/component/inputcell/inputcell.wxml
+++ b/component/inputcell/inputcell.wxml
@@ -1,16 +1,38 @@
-<view class="page">
+<view wx:if="{{item.show != false}}">
   <view class="hr-view"></view>
   <mp-cell ext-class="ext-cell">
-    <view slot="title" class="title-cell">{{item.name}}</view>
-    <image wx:if="{{item.src}}" slot="icon" class="header-img" src="{{item.src}}"></image>
+    <view slot="title" class="title-cell"
+      ><text class="{{item.required != false ? 'required' : 'not-required'}}"
+        >*</text
+      >{{item.name}}</view
+    >
+    <image
+      wx:if="{{item.src}}"
+      slot="icon"
+      class="header-img"
+      src="{{item.src}}"
+    ></image>
 
     <view class="flexbox {{alignLeft?'':'flexbox-end'}}">
-      <input wx:if="{{item.input}}" type="{{item.type?item.type:'text'}}"
-        maxlength="{{item.maxLength?item.maxLength:'-1'}}" id="{{item.id?item.id:''}}"
-        placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}"
-        bindinput="changeV" value="{{item.value}}" placeholder="{{item.placeholder ? item.placeholder : '璇疯緭鍏�' + item.name}} " />
-      <view wx:else="{{text}}" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}">{{item.value}}</view>
+      <input
+        wx:if="{{item.input}}"
+        type="{{item.type?item.type:'text'}}"
+        maxlength="{{item.maxLength?item.maxLength:'-1'}}"
+        id="{{item.id?item.id:''}}"
+        placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};"
+        class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}} {{item.disable ? 'input-disable':''}}"
+        bindinput="changeV"
+        value="{{item.value}}"
+        placeholder="{{item.placeholder ? item.placeholder : '璇疯緭鍏�' + item.name}} "
+        confirm-type="next"
+        disabled="{{item.disable}}"
+      />
+      <view
+        wx:else="{{text}}"
+        class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}"
+        >{{item.value}}</view
+      >
       <view class="unit">{{item.unit}}</view>
     </view>
   </mp-cell>
-</view>
\ No newline at end of file
+</view>

--
Gitblit v1.9.3