可以使用 slot 元素,
<div>
<div slot="title" style="float: right">
<div>这里显示的内容不会被打印</div>
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="window.print()">打 印</el-button>
<el-button type="success" @click="saveData()">保 存</el-button>
</div>
<div>这里显示的是要打印的</div>
</div>