w***@126.com
w***@126.com
  • 发布:2020-03-01 22:40
  • 更新:2020-05-04 11:33
  • 阅读:3166

错误ModuleError如何解决?

分类:uni-app

22:29:19.203 Module Error (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
22:29:19.316 (Emitted value instead of an instance of Error)
22:29:19.324 Errors compiling template:
22:29:19.325 :value="item.content" conflicts with v-model on the same element because the latter already expands to a value binding internally
22:29:19.347 9 | <view class="item" v-if="item.type == 'image'"><image :src="item.content" :data-index="index" mode="widthFix" @tap="removeImg" /></view>
22:29:19.356 10 | <view class="item" v-if="item.type == 'text'">
22:29:19.371 11 | <textarea :value="item.content" placeholder="" v-model="artList[index].content" />
22:29:19.372 | ^^^^^^^^^^^^^^^^^^^^^
22:29:19.379 12 | <view :data-index="index" class="deleteText" @tap="deleteText">删除</view>
22:29:19.379 13 | </view>
22:29:19.387 at C:\phpstudy_pro\WWW\yuedu\yueduXcc\pages\write\write.vue:0
22:29:19.388 Module Error (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js):
22:29:19.394 (Emitted value instead of an instance of Error)
22:29:19.395 Errors compiling template:
22:29:19.407 :value="item.content" conflicts with v-model on the same element because the latter already expands to a value binding internally
22:29:19.408 9 | <view class="item" v-if="item.type == 'image'"><image :src="item.content" :data-index="index" mode="widthFix" @tap="removeImg" /></view>
22:29:19.416 10 | <view class="item" v-if="item.type == 'text'">
22:29:19.422 11 | <textarea :value="item.content" placeholder="" v-model="artList[index].content" />
22:29:19.423 | ^^^^^^^^^^^^^^^^^^^^^
22:29:19.429 12 | <view :data-index="index" class="deleteText" @tap="deleteText">删除</view>
22:29:19.430 13 | </view>
22:29:19.440 at C:\phpstudy_pro\WWW\yuedu\yueduXcc\pages\editArt\editArt.vue:0
22:29:19.440 ERROR Build failed with errors.

2020-03-01 22:40 负责人:无 分享
已邀请:
麦东西

麦东西 - 代码改变世界

解决了?

new_snow

new_snow

value="item.content" 改为name="item.content"

该问题目前已经被锁定, 无法添加新回复