1.CPP文件中的内容 #include "mytest.h" #include <iostream> using namespace std; int add(const int a, const int b) { cout << "a=" << a << endl; cout << "b=" << b << endl; return (a + b); } 2.
import {GetPosition} from '../../lib/utils' //找到 该方法的文件路径,然后 用{}拿到 该方法 var position =GetPosition(); 就可以在 下面 正式调用了 我的GetPosition方法如下: export function GetPosition() { var obj = document.getElementById("waibao"); var tmp = obj.offsetTop; var