微信小程序运行时显示 wxml 文件编译错误,但是浏览器运行时正常显示
错误信息:
[ WXML 文件编译错误] ./pages/detail/detail.wxml
unexpected character `,`
> 1 | <view><view><text>唱跳rap篮球\n</text>
<text selectable="true" space="ensp">唱跳rap 篮 球2\n</text>
<text selectable="true" space="emsp">唱跳rap 篮 球3\n</text>
<text selectable="true" space="nbsp">唱跳rap 篮 球4\n</text>
</view><view><text selectable="true">叶卡捷琳娜·阿列克谢耶芙娜</text></view>
<view>符号解析:1: ,2:< ,3:> ,4:& ,5:' ,6: ,7: ,over</view>
<view class="box1" hover-class="box1-active">
<view class="box2" hover-start-time="{{2000}}" hover-stay-time="{{2000}}"
hover-class="box2-active" hover-stop-propagation="true">盒子</view></view>
<button>按钮</button>
<button size="mini">小按钮</button>
<button type="primary">按钮</button>
<button type="primary" plain="{{true}}">按钮</button
><button type="primary" disabled="{{true}}">按钮</button>
<button loading="{{true}}"></button></view>
| ^
at files://pages/detail/detail.wxml#1(env: Windows,mp,1.05.2109101; lib: 2.23.2)
源代码
<template>
<view>
<view>
<text>唱跳rap篮球\n</text>
<text selectable="true" space="ensp">唱跳rap 篮 球2\n</text>
<text selectable="true" space="emsp">唱跳rap 篮 球3\n</text>
<text selectable="true" space="nbsp">唱跳rap 篮 球4\n</text>
</view>
<view>
<text selectable="true">叶卡捷琳娜·阿列克谢耶芙娜</text>
</view>
<view>符号解析:1: ,2:&3:> ,4:< , ,5:' ,6:  ,7:  ,over</view>
<view class="box1" hover-class="box1-active">
<view class="box2" :hover-start-time="2000" :hover-stay-time="2000"
hover-class="box2-active" hover-stop-propagation="true">盒子</view>
</view>
<button>按钮</button>
<button size="mini">小按钮</button>
<button type="primary">按钮</button>
<button type="primary" plain>按钮</button>
<button type="primary" disabled>按钮</button>
<button loading></button>
</view>
</template>
<script>
</script>
<style>
.box1{
width: 200px;
height: 200px;
background: #FA8072;
}
.box1-active{
background: #FF7256;
}
.box2{
width: 100px;
height: 100px;
background: #FFDEAD;
}
.box2-active{
background: #F4A460;
}
</style>
微信小程序页面显示:
浏览器页面显示: