问题: config.has_button_batch_delete 经过hooks传值 没有正确解析到值 “init:batch_del” ,而只解析到 “” 空字符串,所以不能输出预期结果
解决方案:
v-if = "config.has_button_batch_delete"
先使用 v-if 判断
<el-button
v-if="config.batch_delete && config.has_button_batch_delete"
:disabled="!table_data.data_id"
@click="handleDelete('batch')"
v-has-button="config.has_button_batch_delete"
>批量删除</el-button
>