- 提示TypeError: Property value expected type of string but got undefined
打包时提示以下报错
TypeError: Property value expected type of string but got undefined
at Object.validate (E:\33product\产品化项目\app\node_modules\_@babel_types@7.19.4@@babel\types\lib\definitions\utils.js:159:13)
at validateField (E:\33product\产品化项目\app\node_modules\_@babel_types@7.19.4@@babel\types\lib\validators\validate.js:24:9)
at validate (E:\33product\产品化项目\app\node_modules\_@babel_types@7.19.4@@babel\types\lib\validators\validate.js:17:3)
at validateNode (E:\33product\产品化项目\app\node_modules\_@babel_types@7.19.4@@babel\types\lib\builders\validateNode.js:16:27)
at Object.stringLiteral (E:\33product\产品化项目\app\node_modules\_@babel_types@7.19.4@@babel\types\lib\builders\generated\index.js:456:36)
at parseEventByCallExpression (E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:177:30)
at E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:302:15
at Array.forEach (<anonymous>)
at E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:301:28
at Array.forEach (<anonymous>)
at parseEvent (E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:242:15)
at _processEvent (E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:429:9)
at processEvent (E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\event.js:496:5)
at E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\index.js:34:5
at Array.forEach (<anonymous>)
at traverseData (E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\data\index.js:33:13)
at Object.CallExpression (E:\33product\产品化项目\app\node_modules\_@dcloudio_uni-template-compiler@2.0.0@@dcloudio\uni-template-compiler\lib\script\traverse\visitor.js:179:58)
at NodePath._call (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:100:31)
at TraversalContext.visitQueue (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:105:16)
at TraversalContext.visitMultiple (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:74:17)
at TraversalContext.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:131:19)
at traverseNode (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\traverse-node.js:24:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:107:52)
at TraversalContext.visitQueue (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:105:16)
at TraversalContext.visitMultiple (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:74:17)
at TraversalContext.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:131:19)
at traverseNode (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\traverse-node.js:24:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:107:52)
at TraversalContext.visitQueue (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:105:16)
at TraversalContext.visitMultiple (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:74:17)
at TraversalContext.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:131:19)
at traverseNode (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\traverse-node.js:24:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:107:52)
at TraversalContext.visitQueue (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:105:16)
at TraversalContext.visitMultiple (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:74:17)
at TraversalContext.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:131:19)
at traverseNode (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\traverse-node.js:24:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:107:52)
at TraversalContext.visitQueue (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:105:16)
at TraversalContext.visitMultiple (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:74:17)
at TraversalContext.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:131:19)
at traverseNode (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\traverse-node.js:24:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:107:52)
at TraversalContext.visitQueue (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:105:16)
at TraversalContext.visitMultiple (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:74:17)
at TraversalContext.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\context.js:131:19)
at traverseNode (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\traverse-node.js:24:17)
at NodePath.visit (E:\33product\产品化项目\app\node_modules\_@babel_traverse@7.19.4@@babel\traverse\lib\path\context.js:107:52)
因为标签绑定绑定一个函数的参数中传入一个函数时,不能直接加入括号传承,不支持方法中套方法的操作,
错误:
<u-icon
name="thumb-up-fill"
@click.native.stop="
$_debounce(addThumbsUp(item.id))
"
></u-icon>
正确
<u-icon
name="thumb-up-fill"
@click.native.stop="
$_debounce(addThumbsUp,item.id)
"
></u-icon>
应该把参数传入函数中以回调的形式去调用,不能直接在标签上嵌套文章来源:https://www.toymoban.com/news/detail-577769.html
- Errors compiling template:目前仅支持解构插槽 l_item,如 v-slot=“{ user }”
在使用作用域插槽时候这样使用的
<template slot-scope="l_item"></template>
需要在参数两边加大括号文章来源地址https://www.toymoban.com/news/detail-577769.html
<template slot-scope="{ l_item} "></template>
到了这里,关于uniapp运行到微信小程序踩坑记录的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!