const mySingleton = (function (){ let instance = null; functioninit(){ // 私有的成员函数和私有变量 functionprivateMethod(){ console.log("I am a private Method."); } const private_var = "I am a private data."; const private_num = Math.random(); return { // return出去的函数是属于公有的方法 publicMethod: function (){ console.log("Public can see me."); privateMethod(); }, getRandomNumber:function(){ return private_num; }, public_var: "I am a public data.", } }
await page.pdf({ path:file_pdf, format:"letter" }); await page.screenshot({path:file_png,fullscreen:true}); console.log("PDF and screenCapture has Process done.");
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.