84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
my question is. Click 1111 and then 111 is hidden and 222 is displayed. . The question is, how do I hide the sibling elements instead of all 2222? ?One more questionHow to use this syntax? ? Isn't this function b(return a 1)? ?
First question: You should use it according toVue’s rules
Vue
new Vue({ el: '#app', data() { return { items: [{ content1: "11111", content2: "22222", visible: true }, { content1: "33333", content2: "44444", visible: true }] } } });
Online demo: https://jsfiddle.net/n6sga9v2/
Second question:
Are you talking about arrow functions? If so, then the grammar you use is wrong. There is a short article you can read
ES2015 Getting Started Series 3-Arrow Function
Control different elements with different attributes
const b = () => d + 1
Learn the basics of JS before asking questions.
First question: You should use it according to
Vue
’s rulesOnline demo: https://jsfiddle.net/n6sga9v2/
Second question:
Are you talking about arrow functions? If so, then the grammar you use is wrong. There is a short article you can read
ES2015 Getting Started Series 3-Arrow Function
Control different elements with different attributes
const b = () => d + 1
Learn the basics of JS before asking questions.