当前位置:网站首页>Nested method, calculation attribute is not applicable, use methods
Nested method, calculation attribute is not applicable, use methods
2022-07-05 06:17:00 【hamimelon2020】
<template>
<div>
<ul v-for="numbers in sets" :key="numbers.id">
<li v-for="n in even(numbers)" :key="n">{
{
n }}</li>
</ul>
</div>
</template>
<script>
export default {
name: 'item',
data() {
return {
sets: [[ 1, 2, 3, 4, 5 ], [6, 7, 8, 9, 10]]
}
},
methods: {
even(numbers) {
return numbers.filter(number => number % 2 === 0)
}
}
}
</script>
even() even numbers
边栏推荐
- 2021apmcm post game Summary - edge detection
- 什么是套接字?Socket基本介绍
- Sqlmap tutorial (II) practical skills I
- 【Rust 笔记】14-集合(下)
- A reason that is easy to be ignored when the printer is offline
- leetcode-31:下一个排列
- Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
- 2022年貴州省職業院校技能大賽中職組網絡安全賽項規程
- Daily question 1984 Minimum difference in student scores
- New title of module a of "PanYun Cup" secondary vocational network security skills competition
猜你喜欢
Erreur de connexion Navicat à la base de données Oracle Ora - 28547 ou Ora - 03135
leetcode-6111:螺旋矩阵 IV
Appium foundation - use the first demo of appium
QQ computer version cancels escape character input expression
Leetcode-6111: spiral matrix IV
Leetcode array operation
1.15 - input and output system
redis发布订阅命令行实现
Navicat連接Oracle數據庫報錯ORA-28547或ORA-03135
Appium基础 — 使用Appium的第一个Demo
随机推荐
SQL三种连接:内连接、外连接、交叉连接
Binary search template
One question per day 1765 The highest point in the map
【LeetCode】Day94-重塑矩阵
MatrixDB v4.5.0 重磅发布,全新推出 MARS2 存储引擎!
WordPress switches the page, and the domain name changes back to the IP address
[leetcode] day94 reshape matrix
阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
【Rust 笔记】15-字符串与文本(下)
Error ora-28547 or ora-03135 when Navicat connects to Oracle Database
做 SQL 性能优化真是让人干瞪眼
11-gorm-v2-02-create data
对for(var i = 0;i < 5;i++) {setTimeout(() => console.log(i),1000)}的深入分析
CPU内核和逻辑处理器的区别
[leetcode] day95 effective Sudoku & matrix zeroing
Leetcode-22: bracket generation
Leetcode-3: Longest substring without repeated characters
Leetcode-6109: number of people who know secrets
MySQL advanced part 2: SQL optimization
Sqlmap tutorial (II) practical skills I