kaola-fed / megalo

基于 Vue 的小程序开发框架
MIT License
1.63k stars 116 forks source link

WXMLRT_$gwx:./components/slots.wxml:template:22:30: Template `xxxx` not found. #289

Open js5323 opened 5 years ago

js5323 commented 5 years ago

代码与复现步骤

vue组件1:app-wrap.vue

<template>
    <div class="app-wrap"><slot></slot></div>
<template>

vue组件2:comp.vue

<template>
    <div class="comp">comp</div>
<template>

页面: index.vue

<template>
    <app-wrap>
        <template v-if="info">{{info}}</template>
        <comp v-else></comp>
    </app-wrap>
</template>
<script>
import appWrap from './app-wrap'
import comp from './comp'
export default {
    data: (() => { info: null }),
    components: { comp, appWrap }
}
</script>

问题现象

开发者工具包找不到相关模板:WXMLRT_$gwx:./components/slots.wxml:template:22:30: Template comp$166ddb24 not found.

版本

using @megalo/template-compiler@0.10.1 using megalo@0.10.1

操作系统信息

MacOS Mojave 10.14.6