- 改文件名报错?
T.T这是什么问题,我只不过是把上面几个文件名改了下,他就这样了,json里面的路径也改了哇 [图片]
2022-08-30 - 怎么把上一页的input显示到这一页的input?
<!--井深1.xml--> <view class="MH_HD"> <text>井深(mm):</text> <input class="XS_HD" bindinput="XS_HD" type="number" placeholder="请输入井深"/> </view> <!--井深2.xml第一页的XS_HD怎么传到第二页的XS_HD中--> <view class="MH_HD"> <text>井深(mm):</text> <input class="XS_HD" bindinput="XS_HD" type="number" placeholder="请输入井深"/> </view>
2022-08-26 - 如何将上一个页面的选项参数在点击事件后传递到下一个页面的选项参数中?
<!--1.xsml第一页选择数据--> <picker bindchange="XS_Model" value="{{XS_Model_index}}" range="{{XS_Model_array}}"> <view class="XS_Model_picker"> 梯型:{{XS_Model_array[XS_Model_index]}} </view> </picker><!--梯型--> <button class="TJ_third" bindtap="TJ_third">确认</button> <!--2.xsml第二页显示的数据根据第一页的传递过来--> <picker bindchange="XS_Model" value="{{XS_Model_index}}" range="{{XS_Model_array}}"> <view class="XS_Model_picker"> 梯型:{{XS_Model_array[XS_Model_index]}} </view> </picker><!--梯型--> //1.ts data: { XS_Model:'', XS_Model_array: ['ML-PE02', 'ML-PE01', 'ML-K', 'ML-WK'], XS_Model_index: 0, }, XS_Model(e) { const { XS_Model_array = [] } = this.data const { detail: { value: XS_Model_index = 0 } = {} } = e const XS_Model = XS_Model_array[XS_Model_index] this.setData({ XS_Model, XS_Model_index }) //怎么赋值给下一个页面这边不知道该怎么写了 }, //2.ts //页面1将数据传递到页面2,同时页面2的选项与1相同 data: { XS_Model:'', XS_Model_array: ['ML-PE02', 'ML-PE01', 'ML-K', 'ML-WK'], XS_Model_index: 0, }, XS_Model(e) { const { XS_Model_array = [] } = this.data const { detail: { value: XS_Model_index = 0 } = {} } = e const XS_Model = XS_Model_array[XS_Model_index] this.setData({ XS_Model, XS_Model_index }) //这里如何接收上一个页面传递过来的值并显示
2022-08-26 - 使用picker做好选项框后,怎么让全局变量取到选择的值?
<!--wxnml--> <picker bindchange="XS_Model" value="{{XS_Model_index}}" range="{{XS_Model_array}}"> <view class="XS_Model_picker"> 梯型:{{XS_Model_array[XS_Model_index]}} </view> </picker><!--梯型--> /** js */ data: { XS_Model_array: ['ML-PE02', 'ML-PE01', 'ML-K', 'ML-WK'], objectXS_Model_array: [ {id: 0,name:'ML-PE02'}, {id: 1,name:'ML-PE01'}, {id: 2,name:'ML-K'}, {id: 3,name:'ML-WK'}, ], } onLoad:function(){ app.globalData.XS_Model=this.data.objectXS_Model_array console.log(app.globalData.XS_Model) } })
2022-08-25