TypeError: Property value expected type of string but got undefined
[HBuilder] 11:35:05.377 TypeError: Property value expected type of string but got undefined
[HBuilder] 11:35:05.385 at Object.validate (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/definitions/utils.js:134:13)
[HBuilder] 11:35:05.397 at validateField (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/validators/validate.js:21:9)
[HBuilder] 11:35:05.398 at validate (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/validators/validate.js:15:3)
[HBuilder] 11:35:05.408 at validateNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/builders/validateNode.js:12:27)
[HBuilder] 11:35:05.409 at Object.stringLiteral (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/types/lib/builders/generated/index.js:432:36)
[HBuilder] 11:35:05.422 at parseEventByCallExpression (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:177:30)
[HBuilder] 11:35:05.434 at /Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:318:15
[HBuilder] 11:35:05.448 at Array.forEach (<anonymous>)
[HBuilder] 11:35:05.458 at /Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:317:28
[HBuilder] 11:35:05.471 at Array.forEach (<anonymous>)
[HBuilder] 11:35:05.471 at parseEvent (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:258:15)
[HBuilder] 11:35:05.482 at _processEvent (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:441:9)
[HBuilder] 11:35:05.483 at processEvent (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/event.js:502:5)
[HBuilder] 11:35:05.491 at /Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:40:5
[HBuilder] 11:35:05.503 at Array.forEach (<anonymous>)
[HBuilder] 11:35:05.503 at traverseData (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/data/index.js:39:13)
[HBuilder] 11:35:05.518 at Object.CallExpression (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:191:58)
[HBuilder] 11:35:05.518 at NodePath._call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:46:20)
[HBuilder] 11:35:05.531 at NodePath.call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:36:17)
[HBuilder] 11:35:05.539 at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:84:31)
[HBuilder] 11:35:05.539 at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.555 at TraversalContext.visitSingle (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:72:19)
[HBuilder] 11:35:05.556 at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:121:19)
[HBuilder] 11:35:05.573 at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.574 at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:90:52)
[HBuilder] 11:35:05.585 at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.599 at TraversalContext.visitMultiple (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:67:17)
[HBuilder] 11:35:05.608 at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:119:19)
[HBuilder] 11:35:05.619 at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.620 at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:90:52)
[HBuilder] 11:35:05.631 at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.631 at TraversalContext.visitSingle (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:72:19)
[HBuilder] 11:35:05.640 at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:121:19)
[HBuilder] 11:35:05.652 at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.664 at traverse (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/index.js:50:34)
[HBuilder] 11:35:05.665 at NodePath.traverse (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/index.js:109:24)
[HBuilder] 11:35:05.672 at traverseRenderList (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/render-list.js:157:22)
[HBuilder] 11:35:05.686 at Object.CallExpression (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/script/traverse/visitor.js:208:11)
[HBuilder] 11:35:05.700 at NodePath._call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:46:20)
[HBuilder] 11:35:05.701 at NodePath.call (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:36:17)
[HBuilder] 11:35:05.715 at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:84:31)
[HBuilder] 11:35:05.715 at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.724 at TraversalContext.visitSingle (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:72:19)
[HBuilder] 11:35:05.725 at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:121:19)
[HBuilder] 11:35:05.740 at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:05.741 at NodePath.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/path/context.js:90:52)
[HBuilder] 11:35:05.758 at TraversalContext.visitQueue (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:96:16)
[HBuilder] 11:35:05.758 at TraversalContext.visitMultiple (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:67:17)
[HBuilder] 11:35:05.769 at TraversalContext.visit (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/context.js:119:19)
[HBuilder] 11:35:05.772 at traverseNode (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
[HBuilder] 11:35:24.580 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
[HBuilder] 11:35:24.591 Error: Compile failed at components/description/index.vue
[HBuilder] 11:35:24.603 at compile (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/uni-template-compiler/lib/index.js:149:13)
[HBuilder] 11:35:24.614 at actuallyCompile (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:70:96)
[HBuilder] 11:35:24.615 at compileTemplate (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/vue-cli-plugin-uni/packages/@vue/component-compiler-utils/dist/compileTemplate.js:31:16)
[HBuilder] 11:35:24.624 at Object.<anonymous> (/Users/mac/Desktop/uniApp/tx_carling_buyer_app/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js:46:20)
[HBuilder] 11:35:24.624 ERROR Build failed with errors.
[HBuilder] 11:35:24.657 项目 'tx_carling_buyer_app' 发布微信小程序失败.
错误文件是:Error: Compile failed at components/description/index.vue
在这个文件我发现事件我是这样写的:
@click.stop="preview(img, item.compute(item))"
把这句改成:
@click.stop="preview(img, item)"
就成功了
在写事件的时候,不能反复套函数
网友评论