Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of changing the parameters of Mini Program js file and updating it on view in time

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report