uniapp 引入自定义组件的时候报错
报错信息:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
<template>
<view>
<z-comm :commodity="commodity"></z-comm>
<view class="fence">
<view class="fenceItem">
<view class="label">退款金额:</view>
<view class="price">¥ {
{commodity.price}}</view>
</view>
<view class="fenceItem">
<view class="label">退款原因:</view>
<input type="text" class="reason" placeholder="必填"></view>
</view>
</view>
<view class="fence">
<view class="fenceItem">上传凭证:</view>
<view class="fenceItem">
<image class