wxml <view class="meetTimeDesc">例会的开始时间</view> <picker mode="date" name="meetStartDate" value="{{meetStartDate}}" bindchange="bindStartDateChange"> <view class="datePicker" > {{meetStartDate}} </view> </picker> js data: { meetStartDate:"2021-12-12", meetStartTime:"11:11" } bindStartDateChange:function(e){ this.setData({ meetStartDate: e.detail.value }) }, 这样定义之后,在submit 的时候 submit(e){ console.log('form发生了submit事件,携带数据为:', e.detail.value) wx.request({ url: 'http://localhost:8080/creatMeeting', data:e.detail.value, header: { 'content-type': 'application/json;charset=utf-8' // 默认值 }, method:'POST' }) } 这样不管是修改后的日期就可以带到后台去了
from表单内使用picker,mode=date,提交时如何快速获得当前选择的日期值?如题,想在from表单内使用日期选择器,调用submit的时候怎么样能快速获得选择器的日期
2021-11-28{ "pages": [ "pages/index/index", "pages/logs/logs" ], "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "工具", "navigationBarTextStyle": "black" }, "style": "v2", "sitemapLocation": "sitemap.json", "lazyCodeLoading": "requiredComponents", "tabBar": { "list": [{ "pagePath": "pages/index/index", "selectedIconPath": "images/selectHome.png", "iconPath": "images/home.png", "text": "首页" }, { "pagePath": "pages/index/index", "selectedIconPath": "images/selectPlus.png", "iconPath": "images/plus.png", "text": "创建" }, { "pagePath": "pages/logs/logs", "selectedIconPath": "images/selectMy.png", "iconPath": "images/my.png", "text": "我的" }] } } 就是初始的页面,找了几个图片测试tabBar功能
tabBar组件设置长度为3,真机测试只有两个?如题,在测试的时候tabBar组件设置长度为3,真机测试只有两个,题头也偏移到左侧了, 不知道哪位遇到过这样的问题,
2021-11-19