///////////////////////////////////js
Page({
data: {
downFilelist: ["No File Select!"],
index: 0,
}
onLoad: function () {
MFile.InitWXA_FanucPMCPass()
let that = this;
// console.log(`${wx.env.USER_DATA_PATH}`)
var res = MFile.ReadDir(`${wx.env.USER_DATA_PATH}`);
if (res) {
that.setData({
downFilelist: res,
})
}
console.log(that.data.downFilelist);
},
})
//////////////////////////////////////////////////////////////////////////////WXML
<view class="section__title">PLC文件选择:</view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{downFilelist}}">
<view class="picker">
当前选择:{{downFilelist[index]}}
</view>
</picker>
</view>
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。