taro-vant icon indicating copy to clipboard operation
taro-vant copied to clipboard

vant4 field组件用taro3 构建的微信小程序中,用v-model 绑定数据报错traceEndEvent mismatch

Open shiyl962 opened this issue 1 year ago • 0 comments

重现链接 https://github.com/shiyl962/taro3-vant4-test

Vant 版本 vant 4.6

描述一下你遇到的问题。 如题,报错信息: WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 Error: traceEndEvent mismatch, args={} at n (WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at a (WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at Proxy. (WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at Function. (.._src_dom_root.ts:184) at f (WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 at r. (WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at Function. (WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at p (WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1(env: Windows,mp,1.06.2306020; lib: 2.32.3) errorReport @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 n @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 a @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ .._src_dom_root.ts:184 f @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 p @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 setTimeout (async) globalThis.setTimeout @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 globalThis.setTimeout @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 performUpdate @ .._src_dom_root.ts:91 enqueueUpdate @ .._src_dom_root.ts:82 enqueueUpdate @ .._src_dom_node.ts:298 setAttribute @ .._src_dom_element.ts:202 set @ .._src_dom_form.ts:18 set @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:516 updateValue @ ._node_modules_vant_es_field_Field.mjs:253 (anonymous) @ ._node_modules_vant_es_field_Field.mjs:473 callWithErrorHandling @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:155 callWithAsyncErrorHandling @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:164 job @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:1782 flushPreFlushCbs @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:328 updateComponentPreRender @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5715 componentUpdateFn @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5628 run @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:185 instance.update @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5689 updateComponent @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5514 processComponent @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5447 patch @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5033 patchKeyedChildren @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5809 patchChildren @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5752 processFragment @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5432 patch @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5026 patchKeyedChildren @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5809 patchChildren @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5752 patchElement @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5265 processElement @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5113 patch @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5030 componentUpdateFn @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5655 run @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:185 instance.update @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5689 callWithErrorHandling @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:155 flushJobs @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:396 Promise.then (async) queueFlush @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:285 queueJob @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:279 (anonymous) @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:5687 triggerEffect @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:394 triggerEffects @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:384 trigger @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:352 set @ .node_modules@vue_reactivity_dist_reactivity.esm-bundler.js:523 set @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:3158 testRef @ ._src_pages_test-field_index.vue:44 onClick._cache.._cache. @ ._src_pages_test-field_index.vue:11 callWithErrorHandling @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:155 callWithAsyncErrorHandling @ .node_modules@vue_runtime-core_dist_runtime-core.esm-bundler.js:164 invoker @ .node_modules@vue_runtime-dom_dist_runtime-dom.esm-bundler.js:369 handler @ .._src_dom_event-target.ts:47 dispatchEvent @ .._src_dom_element.ts:327 dispatch @ .._src_dom_event.ts:169 eventHandler @ .._src_dom_event.ts:193 o.safeCallback @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 Rn @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 _e @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 fe @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 (anonymous) @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 emit @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 dispatch @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 cb @ WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 a @ VM9 asdebug.js:1 c @ VM9 asdebug.js:1 (anonymous) @ VM9 asdebug.js:1 g @ VM9 asdebug.js:1 f @ VM9 asdebug.js:1 (anonymous) @ VM9 asdebug.js:1 _ws.onmessage @ VM9 asdebug.js:1 Show 54 more frames WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 TypeError: Cannot read property 'treeManager' of undefined at Proxy. (WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at Proxy. (WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at Function. (.._src_dom_root.ts:184) at :11243/appservice/ at WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1 at r. (WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at Function. (WASubContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at p (WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1) at WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1 at WAServiceMainContext.js?t=wechat&s=1689296040726&v=2.32.3:1(env: Windows,mp,1.06.2306020; lib: 2.32.3)

重现步骤 用微信开发者工具导入本项目的dist/weapp ,将显示测试页面: 页面源码为本项目src/pages/test-field/index.vue, 点击测试按钮1,微信开发者工具控制台显示错误信息,经跟踪是执行到 vant/es/field/Field.mjs 的 watch(() => props.modelValue, () => { updateValue(getModelValue()); resetValidation(); validateWithTrigger("onChange"); nextTick(adjustTextareaSize); }); 时报错的。经试验,如果同时把响应式变量绑定给一个taro原生field,则vant field也不会报错,效果见测试按钮2

设备/浏览器 微信开发者工具

shiyl962 avatar Jul 17 '23 06:07 shiyl962