微信开发者工具版本是1.05.2201240,目前的最新版,项目目录中一开始有中文,之后改成了英文,问题代码如下:
<!--index.wxml-->
<import src="../templates/itemtem.wxml"/>
<view class="container">
<template is="itemtem" data="{{...itemdataobject}}"></template>
</view>
<!--itemtem.wxml-->
<template name="itemtem">
{{itemdata}}
</template>
在开发者工具中,它显示的问题是:Path `../templates/itemtem.wxml` not found from `./pages/index/index.wxml`.
../templates/itemtem.wxml改成
../templates/itemtem应该就可以了