javascript - vue causes error when using ref
高洛峰
高洛峰 2017-06-12 09:28:54
0
3
857


I would like to ask, what is the reason for the error?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
習慣沉默

has nothing to do with ref. The error message says that the splice method is not defined during render.

The splice method is the method of Array/array. The description is probably asking for props of type array, but you didn't give it.

淡淡烟草味

The reason for the error is that the object you should operate on is not an array. As for the relationship with ref, it is not clear from the picture you provided

为情所困
<form v-model="yourModel" ref="yourModel">
   <input v-model="yourModel.value" type="text">
</form>

<script>
   this.$refs.yourModel
</script>

I usually use it like this, XD

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!