This article mainly introduces the detailed introduction of mini-program data binding. you can refer to this article to introduce the detailed introduction of mini-program data binding, for more information, see
{Message }}
Component properties
Control attributes
Ternary operators
I am the calculation result --- {a + B }}+ {c} + d
Asdf
{"Hello" + name }}
{Item }}
Data. js
Page ({data: {// content bound message: 'Hello webapp', // component property bound id: 0, // control property bound condition: true, // trielement flag: false, // arithmetic operation a: 1, B: 2, c: 3, // logical judgment length: 6, // string operation name: 'SuBo', // array combination zero: 0, // object x: 0, y: 1, // object expansion obj1: {a: 1, B: 2 }, obj2: {c: 3, d: 4}, p: 5, // The key and value of the object are both foo: 'My-Foo', bar: 'My-bar '},})
The above is a detailed introduction to small program data binding. For more information, see other related articles in the first PHP community!