直接编译就报错,只要传结构
- 发布:2021-11-01 14:52
- 更新:2023-02-16 15:34
- 阅读:668
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10专业版
第三方开发者工具版本号: 1.05.2110110
基础库版本号: 2.8.3
项目创建方式: CLI
CLI版本号: 0.1.0
操作步骤:
预期结果:
预期数据能显示,H5正常
预期数据能显示,H5正常
实际结果:
小程序报错
VM492:1507 页面【pages/home/index-scroll-list-wrapper-dataList]错误:
TypeError: wx.createComponent is not a function
at index-scroll-list-wrapper-dataList.js? [sm]:2
at require (WAService.js:1)
at <anonymous>:1504:7
at doWhenAllScriptLoaded (<anonymous>:1609:21)
at Object.scriptLoaded (<anonymous>:1637:5)
at Object.<anonymous> (<anonymous>:1662:22)(env: Windows,mp,1.05.2110110; lib: 2.8.3)
WAService.js:1 thirdScriptError
sdk uncaught third Error
wx.createComponent is not a function
TypeError: wx.createComponent is not a function
at http://127.0.0.1:56251/appservice/pages/home/index-scroll-list-wrapper-dataList.js:4:4
at require (WAService.js:1:1442918)
at <anonymous>:1504:7
at doWhenAllScriptLoaded (<anonymous>:1609:21)
at Object.scriptLoaded (<anonymous>:1637:5)
at Object.<anonymous> (<anonymous>:1662:22)(env: Windows,mp,1.05.2110110; lib: 2.8.3)
小程序报错
VM492:1507 页面【pages/home/index-scroll-list-wrapper-dataList]错误:
TypeError: wx.createComponent is not a function
at index-scroll-list-wrapper-dataList.js? [sm]:2
at require (WAService.js:1)
at <anonymous>:1504:7
at doWhenAllScriptLoaded (<anonymous>:1609:21)
at Object.scriptLoaded (<anonymous>:1637:5)
at Object.<anonymous> (<anonymous>:1662:22)(env: Windows,mp,1.05.2110110; lib: 2.8.3)
WAService.js:1 thirdScriptError
sdk uncaught third Error
wx.createComponent is not a function
TypeError: wx.createComponent is not a function
at http://127.0.0.1:56251/appservice/pages/home/index-scroll-list-wrapper-dataList.js:4:4
at require (WAService.js:1:1442918)
at <anonymous>:1504:7
at doWhenAllScriptLoaded (<anonymous>:1609:21)
at Object.scriptLoaded (<anonymous>:1637:5)
at Object.<anonymous> (<anonymous>:1662:22)(env: Windows,mp,1.05.2110110; lib: 2.8.3)
bug描述:
插槽无法对外传值
只要写了结构,直接小程序报错
<ScrollListWrapper
@reachBottomCb="reachBottomCb"
:fetchDataMethod="fetchDataMethod"
>
<template v-slot:dataList="{youName}" >
<view>{{ youName }}</view>
</template>
</ScrollListWrapper>
<div class="DATA_WRAPPER">
<slot name="dataList" :youName="'chenxuxin'" >
</slot>
</div>
小程序报错
VM492:1507 页面【pages/home/index-scroll-list-wrapper-dataList]错误:
TypeError: wx.createComponent is not a function
at index-scroll-list-wrapper-dataList.js? [sm]:2
at require (WAService.js:1)
at <anonymous>:1504:7
at doWhenAllScriptLoaded (<anonymous>:1609:21)
at Object.scriptLoaded (<anonymous>:1637:5)
at Object.<anonymous> (<anonymous>:1662:22)(env: Windows,mp,1.05.2110110; lib: 2.8.3)
WAService.js:1 thirdScriptError
sdk uncaught third Error
wx.createComponent is not a function
TypeError: wx.createComponent is not a function
at http://127.0.0.1:56251/appservice/pages/home/index-scroll-list-wrapper-dataList.js:4:4
at require (WAService.js:1:1442918)
at <anonymous>:1504:7
at doWhenAllScriptLoaded (<anonymous>:1609:21)
at Object.scriptLoaded (<anonymous>:1637:5)
at Object.<anonymous> (<anonymous>:1662:22)(env: Windows,mp,1.05.2110110; lib: 2.8.3)
3 个回复
q***@live.cn
我也遇到这个问题 解决了吗
q***@live.cn
解决了,更新 uni-app 版本,
npx @dcloudio/uvm alpha
2***@qq.com
我把Hbuilder X插件中的uni-app (vue3)编译器卸载之后解决了