已解决,就是组件库源码里的问题。更改js代码里的action === 'confirm' ? resolve(instance) : reject(instance);改为action === 'confirm' ? resolve(instance) : resolve(instance); callback: (action, instance) => { action === 'confirm' ? resolve(instance) : resolve(instance); },
VantWeapp中Dialog异步关闭点击关闭弹框不关闭?按官网案例在编辑器里,当点击确认时1S后关闭了弹框,点击取消确没关闭弹框。所以把resolve(true)设置在else里,但是这样确报错Unhandled promise rejection。这个异步关闭是要怎么正确设置呢? setTimeout(() => { if (action === 'confirm') { resolve(true); } else { // 拦截取消操作 resolve(false); } }, 1000);
2021-05-27