<form bindsubmit="jiGong">
<view class="root">
<view class="jigong">
<view class="jigong_rq">日期:</view>
<picker mode="date" name="riqi" value="{{time}}" bindchange="getTime">
<view class="jigong_riqi">{{time?time:'请选择'}}</view>
</picker>
</view>
<view class="jigong">
<view class="jigong_rq">项目:</view>
<input class="jigong_riqi" name="xiangmu" />
</view>
<view>
<view class="jigong">
<view class="jigong_rq">负责人:</view>
<input class="jigong_riqi" placeholder="请输入负责人给的手机号" name="fuzeren" />
</view>
</view>
</view>
<view class="jigong_xinxi">
<view class="jigong_xinxi_1">
<view class="jigong_xinxi_text">地址:</view>
<image class="jigong_xinxi_dizhi" src="/image/dz.png" wx:if="{{!dizhi}}" ></image>
<view class="jigong_xinxi_dizhi1" wx:else name="dizhi">{{dizhi}}</view>
</view>
<view class="jigong_xinxi_1">
<view class="jigong_xinxi_text">工资:</view>
<input class="jigong_xinxi_num" placeholder="请输入工资" type="number" name="gongzi" />
</view>
<view class="jigong_xinxi_2">
<view class="jigong_xinxi_text_1">备注:</view>
<textarea class="jigong_xinxi_beizhu" placeholder="请输入备注..." name="beizhu" />
</view>
<view class="jigong_xinxi_1">
<view class="jigong_xinxi_text">款项:</view>
<picker mode="selector" value='{{type}}' range="{{kuanxiang}}" bindchange="getKuanXiang" name="kuanxiang">
<view class="jigong_xinxi_kuanxiang{{type.length>0?'kuanxiang':''}}" >{{type?type:'请选择'}}</view>
</picker>
</view>
<view class="jigong_xinxi_2">
<view class="jigong_xinxi_text_1">照片:</view>
<image class="jigong_xinxi_img" wx:if="{{!image}}" src="/image/tpj.png" mode="scaleToFill" bindtap="getImage" />
<image class="jigong_xinxi_img1" wx:else="" src="{{image}}" mode="scaleToFill" name="tupian" />
</view>
<button class="jigong_queren" form-type="submit">确认保存</button>
</view>
</form>
调试器显示出来的值。
- currentTarget: {id: "", offsetLeft: 0, offsetTop: 10, dataset: {…}}
- detail:
- target: {id: "", dataset: {…}, offsetTop: 550, offsetLeft: 14}
- value:
- beizhu: ""
- fuzeren: ""
- gongzi: ""
- kuanxiang: null
- riqi: ""
- xiangmu: ""
image不是表单组件。
意思是不能用view 和image组件。