We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当在.vue文件内export导入的文件为js,js 内 export 时提示 template 'xxx' not found 问题复现步骤:
index.vue <template> <div> <a></a> <b></b> </div> </template> <script> import {b, c} from './a' export default { components: {b, c} } </script>
<template>
<div>
<a></a>
<b></b>
</div>
</template>
<script>
import {b, c} from './a'
export default {
components: {b, c}
}
</script>
a/index.js import b from './b' import c from './c' export { b, c }
import b from './b'
import c from './c'
export {
b, c
a/b.vue <template> <div>b</div> </template> <script> export default { ... } </script>
<div>b</div>
...
a/c.vue <template> <div>c</div> </template> <script> export default { ... } </script>
<div>c</div>
npm run dev
VM11791:2 ./a/index$77e68f06.wxml (anonymous) @ VM11791:2 VM11791:3 Template "index$7e88f077" not found. 2 | <template name="index$77e68f06"> 3 | <view class="_div data-v-c964d3c4 container"> > 4 | <template data="{{...$root[$kk+'0'], $root}}" is="index$7e88f077"></template> | ^ 5 | </view> 6 | </template> (anonymous) @ VM11791:3
VM11791:2 ./a/index$77e68f06.wxml
(anonymous) @ VM11791:2
VM11791:3 Template "index$7e88f077" not found.
2 | <template name="index$77e68f06">
3 | <view class="_div data-v-c964d3c4 container">
> 4 | <template data="{{...$root[$kk+'0'], $root}}" is="index$7e88f077"></template>
| ^
5 | </view>
6 | </template>
(anonymous) @ VM11791:3
The text was updated successfully, but these errors were encountered:
目前 mpvue-loader 不支持这种方式,mpvue/mpvue-loader#23 这个 pr 可以参考下
Sorry, something went wrong.
issue超过30天无更新或响应,7天后将自动关闭,如果问题状态有更新请及时更新issue
No branches or pull requests
[问题简单描述]
当在.vue文件内export导入的文件为js,js 内 export 时提示 template 'xxx' not found
问题复现步骤:
index.vue
<template>
<div>
<a></a>
<b></b>
</div>
</template>
<script>
import {b, c} from './a'
export default {
components: {b, c}
}
</script>
a/index.js
import b from './b'
import c from './c'
export {
b, c
}
a/b.vue
<template>
<div>b</div>
</template>
<script>
export default {
...
}
</script>
a/c.vue
<template>
<div>c</div>
</template>
<script>
export default {
...
}
</script>
npm run dev
VM11791:2 ./a/index$77e68f06.wxml
(anonymous) @ VM11791:2
VM11791:3 Template "index$7e88f077" not found.
2 | <template name="index$77e68f06">
3 | <view class="_div data-v-c964d3c4 container">
> 4 | <template data="{{...$root[$kk+'0'], $root}}" is="index$7e88f077"></template>
| ^
5 | </view>
6 | </template>
(anonymous) @ VM11791:3
The text was updated successfully, but these errors were encountered: