avue的三种slot 插槽

avue的三种插槽

//菜单插槽
<template slot="menuLeft">
<el-button type="danger" @click="openDialogAdjustPrice" size="small" icon="el-icon-sort"
v-if="permissions['mall:goodssku:calculateMarketPrice']">一键调价</el-button>
<el-button type="success" @click="uploadPicSearch()" size="small" icon="el-icon-top"
v-if="permissions['mall:goodsspusearch:index']">上传图片检索</el-button>
</template>

//功能插槽
<template slot="menu" slot-scope="scope">
<el-button type="text" icon="el-icon-folder-checked" @click="openAuditConfirm(scope.row)"
v-if="scope.row.verifyStatus==='0' &&permissions['mall:goodsspu:verify']">审核</el-button>
<el-button type="text" icon="el-icon-top" @click="openShelfOnConfirm(scope.row)"
v-if="scope.row.shelf==='0'&&scope.row.verifyStatus==='1'&&permissions['mall:goodsspu:shelf']">上架</el-button>
<el-button type="text" icon="el-icon-bottom" @click="openShelfOffConfirm(scope.row)"
v-if="scope.row.shelf==='1'&&scope.row.verifyStatus==='1' &&permissions['mall:goodsspu:shelf']">下架</el-button>
</template>

//搜索插槽
<template v-if="isShowSupplier" slot="supplierIdSearch" slot-scope="scope">
<el-select v-model="paramsSearch.supplierId"
placeholder="选择或搜索供应商" filterable clearable remote reserve-keyword size="small"
@focus="getSupplierPage" :remote-method="getSupplierPage" :loading="false">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</template>
<template slot="picUrlsSearch" slot-scope="scope">
<el-upload ref="upload" class="avatar-uploader" :headers="headers"
action="/mall/goodsspusearch/getSearchKey"
:limit="1" :before-upload="uploadBefore" :on-remove="uploadRemove" :on-success="uploadAfter">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</template>


posted @ 2023-11-20 19:34  海逸庭  阅读(931)  评论(0编辑  收藏  举报