dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
40k stars 3.63k forks source link

使用函数式组件,提示错误:“Error in render: "TypeError: Cannot read property '_c' of undefined"” #575

Closed CaptainLiao closed 3 years ago

CaptainLiao commented 5 years ago

问题描述 在 uniapp 中,使用函数式组件,会报错:Error in render: "TypeError: Cannot read property '_c' of undefined"。

复现步骤 声明一个简单的函数式组件, 如下

<template functional>
<div>sss</div>
</template>

预期结果 组件正确被渲染出来。

实际结果 image

系统信息:

fxy060608 commented 5 years ago

暂不支持函数式组件

nyrf commented 3 years ago

@fxy060608 请问下函数式组件vue3后续还有计划支持么?很多时候模板还是不够灵活

fxy060608 commented 3 years ago

@fxy060608 请问下函数式组件vue3后续还有计划支持么?很多时候模板还是不够灵活

你说的是手写render函数吧,暂无计划支持

nyrf commented 3 years ago

@fxy060608 请问下函数式组件vue3后续还有计划支持么?很多时候模板还是不够灵活

你说的是手写render函数吧,暂无计划支持

是的,了解。麻烦看下vue3下ref在onMounted时得不到值的问题谢谢。https://github.com/dcloudio/uni-app/issues/2461