export default { data() { return { printHidden: true, printIndex: 0, printType: '', print: { id: '', closeCallback: () => { console.log('关闭') this.$nextTick(() => { this.printHidden = true }) }, clickMounted: () => { console.log('触发点击打印回调') }, openCallback: () => { console.log('执行打印') this.printIndex += 1 } } } }, watch: { printIndex(val) { if (val) { this.printType = 'warning' } } }, created() { this.print.id = this.printId } }