search

Home  >  Q&A  >  body text

javascript - vue project, how to import all functions of another js file in one js file

A login component needs to use RS encryption, and three files Barrett.js, BigInt.js and RSA.js are imported.
The file tree and login are imported as shown in the figure:

login:

But I only exported the functions needed in the component in the js file, taking the RSA file as an example
##RSAkeyPair function code:

But the background error says that the biFormHex function is undefined. This function is a function in the BigInt.js

file, so you need to import the bigFormHex function in BigInt.js
in the RSA file, but they call each other's functions. There are too many. It is too troublesome to export them one by one. Could you please tell me how to export the functions of the entire js file together instead of exporting them one by one. Thanks!

PHP中文网PHP中文网2727 days ago1045

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-12 09:33:59

    import * as main from "to/path"
    export * from "to/path"

    reply
    0
  • Cancelreply