File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 22 * @Author : lee
33 * @Date : 2021-05-10 11:45:50
44 * @LastEditors : lee
5- * @LastEditTime : 2021-05-14 10:46:44
5+ * @LastEditTime : 2021-05-20 15:39:43
66 * @Description : file content
77 */
88import Print from './printarea.js' ;
@@ -30,15 +30,16 @@ export default {
3030 if ( typeof binding . value === 'string' ) {
3131 // 全局打印
3232 id = binding . value ;
33- window . print ( ) ;
34- return
3533 } else if ( typeof binding . value === 'object' && ! ! binding . value . id ) {
3634 // 局部打印
3735 id = binding . value . id ;
3836 let ids = id . replace ( new RegExp ( "#" , "g" ) , '' ) ;
3937 let elsdom = document . getElementById ( ids ) ;
4038 if ( ! elsdom ) console . log ( "id in Error" ) , id = '' ;
4139
40+ } else {
41+ window . print ( ) ;
42+ return
4243 }
4344 localPrint ( ) ;
4445 } ) ;
Original file line number Diff line number Diff line change 44
55 </div >
66 <div v-if =" config" >
7- <button v-print =" printObj " >Print the entire page</button >
7+ <button v-print =" '#printMe' " >Print the entire page</button >
88 <div class =" box"
99 v-show =" printLoading" >
1010 <div class =" loader-04" ></div >
You can’t perform that action at this time.
0 commit comments