javascript - vue project, how to import all functions of another js file in one js file
PHP中文网
PHP中文网 2017-06-12 09:31:59
0
1
1046

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中文网

认证0级讲师

reply all(1)
曾经蜡笔没有小新

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template