Uniapp assignment method: First create a code sample file; then assign the value through "onLoad(){this.mobile=xxxxxxx}".
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, thinkpad t480 computer.
Recommended (free): uni-app development tutorial
uni-app assigns value to input
uniapp It is based on vuejs, so if you want to develop uniapp smoothly, it is recommended to become proficient in vuejs first.
The code is as follows:
<input type="text" v-model="mobile" placeholder="请输入手机号码"> export default { data() { return { mobile: '1866666', } }, onLoad() { //这里就是赋值 this.mobile = xxxxxxx } }
The above is the detailed content of How to assign value in uniapp. For more information, please follow other related articles on the PHP Chinese website!