支持分页、批量删除、列属性定义、权限传参,继承自ElementUI按钮组件,支持基础组件的属性、方法与事件 >[info] 显示效果 ![](https://img.kancloud.cn/33/68/336819d55641b7b8c3d83e3f617019c6_257x74.png) >[info] 示例代码 ``` <template> <ext-button :disabled="this.selections.length===0" :label="$t('action.batchDelete')" :perms="permsBatchDelete" :size="normalSize" @click="handleBatchDelete()" style="float:left;" type="danger" /> </template> <script> import extButton from '@/components/core/ext_button' export default { components: { extButton }, props: { normalSize: { type: String, default: 'small' }, permsBatchDelete: String }, data () { return { selections: [] // 列表选中列 } }, methods: { // 批量删除 handleBatchDelete () { this.$confirm('确认删除选中记录吗?', '提示', { type: 'warning' }).then(() => { const _ids = [] this.selections.map((item) => { _ids.push(item.id) }) if (this.batchDelete) { this.batchDelete(_ids) } }) } } } </script> ``` >[info] 属性说明 label:按钮文字显示 >[info] 事件说明 click:删除回调