问题已解决;改成这样;
<avue-tabs :option="tabOption" @change="tabHandleChange"></avue-tabs>
<span v-if="type.prop==='list'">
<avue-crud
:option="listOption"
:data="data"
:page="page"
:permission="permissionList"
:before-open="beforeOpen"
v-model="form"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@on-load="onLoad"
>
<template slot="menuLeft">
<el-button
type="danger"
size="small"
icon="el-icon-delete"
plain
v-if="permission.supplier_delete"
@click="handleDelete"
>删 除</el-button>
</template>
<template slot-scope="{row}" slot="status">
<el-tag>{{row.statusName}}</el-tag>
</template>
</avue-crud>
</span>
<span v-else-if="type.prop==='detail'">选项卡内容2</span>
还需要
created() {
this.type = this.tabOption.column[0];
},
翻了 element UI 和 avue 的 tab 文档(非 from 的 tab 文档)才找到;
结帖回复,可选中此回复结帖。
问题贴主已自行解决
扫一扫访问 Blade技术社区 移动端