<el-curd>组件表格头部按钮可自定义
<el-curd
ref="curd"
:search-date="false">
<template v-slot:button>
<el-button @click="backup()">数据库备份</el-button>
</template>
</el-curd>
<script>
new Vue({
el: '#app',
data() {
return {
field: [],
}
},
methods: {
/**
* 备份
*/
backup() {
this.$notify({ showClose: true, message: '数据备份完成', type: 'success' });
this.$refs.curd.getData(); // 重新获取表格数据
},
},
})
</script>