当前位置:网站首页>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
边栏推荐
- leetcode-31:下一个排列
- 1039 Course List for Student
- Leetcode-6109: number of people who know secrets
- Leetcode-6108: decrypt messages
- Operator priority, one catch, no doubt
- The difference between CPU core and logical processor
- Currently clicked button and current mouse coordinates in QT judgment interface
- Leetcode stack related
- 1996. number of weak characters in the game
- leetcode-9:回文数
猜你喜欢
MySQL advanced part 1: index
Sqlmap tutorial (II) practical skills I
Doing SQL performance optimization is really eye-catching
MySQL advanced part 1: stored procedures and functions
NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar
1.15 - 输入输出系统
wordpress切换页面,域名变回了IP地址
leetcode-6108:解密消息
Chapter 6 relational database theory
MySQL advanced part 1: View
随机推荐
什么是套接字?Socket基本介绍
【Rust 笔记】15-字符串与文本(下)
Basic explanation of typescript
2021apmcm post game Summary - edge detection
4. 对象映射 - Mapping.Mapster
The sum of the unique elements of the daily question
Leetcode-6110: number of incremental paths in the grid graph
RGB LED infinite mirror controlled by Arduino
传统数据库逐渐“难适应”,云原生数据库脱颖而出
Regulations for network security events of vocational group in 2022 Guizhou Vocational College skill competition
Multi screen computer screenshots will cut off multiple screens, not only the current screen
Appium基础 — 使用Appium的第一个Demo
Overview of variable resistors - structure, operation and different applications
剑指 Offer II 058:日程表
阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
Leetcode array operation
TypeScript 基础讲解
[rust notes] 15 string and text (Part 1)
LeetCode 0108. Convert an ordered array into a binary search tree - the median of the array is the root, and the left and right of the median are the left and right subtrees respectively
1996. number of weak characters in the game