当前位置:网站首页>JS ternary expression complex condition judgment
JS ternary expression complex condition judgment
2022-07-01 19:40:00 【Goody red dust】
<template>
<div>
<!-- <span v-for="item in demoArry" :key="item.id" >{
{
item.name ? " Yes ":" nothing "}}</span> -->
<div v-for="(item,index) in demoArry" :key=index >{
{
item.name=="1" ? " To audit ":item.name=="2" ? " to examine ":item.name=="3" ? " nucleus ":item.name=="4" ? " Love ":''}}</div>
<!-- <div v-for="(item,index) in demoArry" :key=index >{
{
item.name=="1" ? " To audit " :(item.name=="2" ? " to examine ":(item.name=="3" ? " nucleus ":''))}}</div> -->
</div>
</template>
<script>
export default {
data () {
return {
demoArry: [
{
name: '1',
id: '111'
},
{
name: '2',
id: '222'
},
{
name: '3',
id: '333'
},
{
name: '4',
id: '444'
},
{
name: '5',
id: '444'
}
],
dataform: {
title: 'qq'
}
}
}
}
</script>
<style>
</style>
边栏推荐
- Detailed explanation of JUnit unit test framework
- Methods of finding various limits
- CMU AI PhD 第一年总结
- js三元表达式复杂条件判断
- DTD modeling
- Salesmartly has some tricks for Facebook chat!
- Opencv video quality detection -- sharpness detection
- AAAI2020: Real-time Scene Text Detection with Differentiable Binarization
- Uni app product classification
- How to correctly use vertx to operate redis (3.9.4 with source code analysis)
猜你喜欢

大厂音视频职位面试题目--今日头条

pickle.load报错【AttributeError: Can‘t get attribute ‘Vocabulary‘ on <module ‘__main__‘】

DTD modeling

Case sharing: basic networking configuration of QinQ

精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会

EasyGBS主子码流都为H.265时,切换出现花屏如何解决?

Shell高级进阶

The use of subplot function in MATLAB

Summary of SQL query de duplication statistics methods
![[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function](/img/1e/bed6a761f07c052e43b1e3b1701760.png)
[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function
随机推荐
brpc理解
Uni app product classification
DTD modeling
Introduction to relevant processes and functions of wechat official account development
Learning notes [Gumbel softmax]
[SQL optimization] the difference between with as and temporary tables
ddr4测试-2
ffmpeg AVFrame 转 cv::Mat
optaplanner学习笔记(一)案例Cloud balance
音频编解码基础知识
Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
Collation of open source protocols of open source frameworks commonly used in Web Development
SIP protocol of gb28181
Reading the paper [learning to discretely compose reasoning module networks for video captioning]
GC垃圾回收
axure不显示元件库
241. Different Ways to Add Parentheses
Enabling "new Chinese enterprises", SAP process automation landing in China
宝,运维100+服务器很头疼怎么办?用行云管家!
精耕渠道共謀發展 福昕攜手偉仕佳傑開展新產品培訓大會