The method of changing the parameters of Mini Program js file and updating it on view in time
This article mainly introduces Mini Program js file to change parameters and update the view of the relevant knowledge, the contents of detailed easy to understand, simple and fast operation, with a certain reference value, I believe that after reading this Mini Program js file and the timely update of the method article will have a harvest, let's take a look at it.
1. Simple parameters
XX.wxml
{{str}} change XX.js Page ({data: {str:' good morning'}, change: function () {this.setData ({str: "good evening"})}) 2.Array of known subscript
Dns "> XX.wxml
{{array [0] .text}} change XX.js Page ({data: {array: [{text: 'good morning'}],}, change: function () {this.setData ({'array [0] .text': 'good evening')}) 3. Dynamic indexed array
XX.wxml
{{item.text}} change change XX.js
Page ({data: {array: [{text:'1111'}, {text:'2222'}, {text:'3333'}]}, change:function (e) {let param = {}; let string = "array [" + e.target.dataset.index+ "] .text; param [string] = '00000 targets holding this.setData (param)) }}) this is the end of the article on "how to change the parameters of Mini Program js files and update them on the view". Thank you for reading! I believe that you all have a certain understanding of the knowledge of "Mini Program js file change parameters and timely update on the view" knowledge, if you want to learn more knowledge, welcome to follow the industry information channel.