How to call a webassembly method in vue.js?
问题 I'm trying to transpose to vue.js this simple html page add.html: <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> </head> <body> <input type="button" value="Add" onclick="callAdd()" /> <script> function callAdd() { const result = Module.ccall('Add', 'number', ['number', 'number'], [1, 2]); console.log(`Result: ${result}`); } </script> <script src="js_plumbing.js"></script> </body> </html> which calls the Add function defined in add.c : #include <stdlib.h> #include <emscripten.h> // If