第一种方法(这种方法在r124版本及以后将不能使用) 新建一个文件 three.js import * as THREE from 'three'; // const THREE = require('three'); window.THREE = THREE; require("three/examples/js/controls/OrbitControls.js");