Open cbz20000 opened 2 years ago
经测试,内嵌模式会把数据域中picker对应的name的变量的变量值清空,把变量值备份等待picker初始化完成后再延迟赋值可以解决此问题,但是延迟多长时间不好确定。
onEvent: { stepChange: { actions: [ { actionType: 'custom', script: 'console.log(context);if(event.data.step==2 && context.props.data.items){var itemsBak = context.props.data.items; setTimeout(function(){console.log("itemsBak=",itemsBak);doAction({"actionType": "setValue","componentId": "wizard", args: {"value": {"items":itemsBak}}});},itemsBak.length*100>1000?itemsBak.length*100:1000);};', }, ], }, },
描述问题:
picker的内嵌模式,选中值会丢失,非内嵌模式不会丢
截图或视频:
非内嵌模式从第三步返回第二步 第二步选中的数据不会丢 内嵌模式从第三步返回第二步 第二步选中的数据会丢
如何复现(请务必完整填写下面内容):
你是如何使用 amis 的?
sdk
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 v1.10.0
粘贴有问题的完整
amis schema
代码:操作步骤 请简单描述一下复现的操作步骤...