用的是vue+iview
<template>
<div>
<div style="width: 80%;margin: 20px auto 0">
<Row :gutter="20">
<Col span="24">
<Table :columns="columns" :data="tableData" ref="searchTable" border id="content">
<template slot-scope="{row}" slot="keyWord">
<span style="color: #00b38a">{
{
row.keyWord}}</span>
</template>
<template slot-scope="{row}" slot="searchIndex">
<span>{
{
row.searchIndex}}</span>
</template>
<template slot-scope="{row}" slot="searchResult">
<span>{
{
row.searchResult}}</span>
</template>
<template slot-scope="{row}" slot="searchFirstApply">
<span style="color: #00b38a">{
{
row.searchFirstApply}}</span>
</template>
<template slot-scope="{row}" slot="action">
<div style="cursor: pointer">
<Icon type="ios-cart-outline" size="40" style="color: rgb(255, 169, 93)"
@click="addToCart (row)"/>
</div>
</template>
</Table>
</Col>
</Row>
</div>
<!-- 底部购物车 -->