Interpretation and analysis of Applet components: 5. text,
Text component description:
Text is the text displayed in the applet.
The following is the WXML code:
[XML]View plain text Copy code
I am a text component
{Text }}
The following is the JS code:
[JavaScript]View plain text Copy code
Page ({/*** initialize data */data: {text: "I am the text bound to the js file"}, onLoad: function (options) {// parameters brought about by
[$ basket_position] = $ newprice;} Else {// If it is not in your basket, add a new project at the end of the array$ Ses_basket_name [] = $ basket;
$ Ses_basket_amount [] = 1;
$ Ses_basket_price [] = $ price;
$ Ses_basket_id [] = $ id;
$ Ses_basket_items ++;
}
? $ #@ 62;
Great. Now you can fill in the mini shopping basket and display it.
Organize code snippets together
Let's organize the Code together and save it as minibasket. inc.
$
Interfaces (interface)In this course, we mainly learn about the features and use of interfaces in C #. In my opinion, interfaces are very much like abstract classes but different, or excuses are an escalation of abstract classes.The main difference between interface and abstract class: interface can be placed anywhere in the program layer, and the abstract class can only be placed at the top. 、declaring interfaces:public interface Istorable{void Read ();void Write (object);}Using interfaces:publ
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.