当前位置:网站首页>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>
边栏推荐
猜你喜欢

Why must we move from Devops to bizdevops?

Test self-study people must see: how to find test items in software testing?

安装sharp报错

JVM内存模型

AAAI2020: Real-time Scene Text Detection with Differentiable Binarization

类加载机制

自定义插入页面标签以及实现类似通讯录的首字母搜索

Shell advanced

Wireshark packet analysis TCP, FTP

正则表达式=Regex=regular expression
随机推荐
703. 数据流中的第 K 大元素
GC垃圾回收
sql查询去重统计的方法总结
直播HLS协议
Basic knowledge of audio coding and decoding
【org.slf4j.Logger中info()方法】
Compile ffmpeg source code with msys+vs2019 under win10
商业智能BI开发和报表开发有什么本质区别?
ffmpeg AVFrame 转 cv::Mat
Go Language Advanced
狼人杀攻略:你当我好骗吗,我们相信谁!
Extensive reading of the paper [film: visual reasoning with a general condition layer]
Redo和Undo的区别
JDBC中如何添加事务
Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference
torch.nn.functional.interpolate函数
Opencv video quality detection -- sharpness detection
类加载机制
Thesis reading [distinctive late semantic graph for video capturing]
任务:拒绝服务DoS