父组件调用material-list组件
<material-list v-if="dialogVisible3" :dialog-visible3="dialogVisible3" :prod-type="prodType" :params-obj="paramsObj" @fetchSelectList="fetchSelectList">
<!-- 增加物料搜索条件 -->
<template #queryParam="slotName">
<el-col :xl="4" :lg="5" :md="6" :sm="18">
<el-tag>{{ slotName.canshuName.status }}</el-tag>
</el-col>
</template>
<el-form-item :label="$t('contract.ProductGroup')" prop="prodType">
<el-input v-model="slotParams.param"></el-input>
</el-form-item>
</template> -->
</material-list>
子组件
<el-col :span="6">
<slot name="queryParam" :canshuName="queryParam" />
</el-col>
data(){
return:{
queryParam: {
status: 456
},
}
}
Vue的slot传参
最新推荐文章于 2024-08-22 11:25:48 发布