I am having an issue with some code snippet:
<Col
span="8"
v-for="(item,index) in this.data"
>
<Card>
<p slot="title" style="">{{ item.area_partition.homepage_show || item.area_partition.name }} </p>
<div>
<Row :gutter="5">
<Col span="12" :key='index'>
<Card :padding='5' class='business-type'>
<router-link to="/home/aftersale_physicalserver_workpanel/true/+ (item.area_partition.homepage_show || item.area_partition.name)"> # there do not get my requirement.
<span class="icon">
<Icon type="ios-barcode" :size='28' color='#ff9900'></Icon>
</span>
Whenever
{{ item.area_partition.homepage_show || item.area_partition.name }}
is used, if item.area_partition.homepage_show
is null, then item.area_partition.name
is used instead.
It works fine here:
<p slot="title" style="">{{ item.area_partition.homepage_show || item.area_partition.name }} </p>
But the router-link
is not meeting my requirements:
<router-link to="/home/aftersale_physicalserver_workpanel/true/+ (item.area_partition.homepage_show || item.area_partition.name)">
I am unable to achieve my requirements with the following method:
"/home/aftersale_physicalserver_workpanel/true/+ (item.area_partition.homepage_show || item.area_partition.name)"
What I need is to add
item.area_partition.homepage_show
if it is not null, and if it is null, use /home/aftersale_physicalserver_workpanel/true/ + item.area_partition.name
.