You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/src/index.tsx

38 lines
990 B

import * as React from 'react';
import { WebCAD } from './UI/Layout/ApplicationLayout';
import './UI/Css/style.less';
//黄金布局
7 years ago
import '../node_modules/golden-layout/src/css/goldenlayout-base.css';
// import '../node_modules/golden-layout/src/css/goldenlayout-dark-theme.css';
import '../node_modules/golden-layout/src/css/goldenlayout-soda-theme.css';
//蓝图
import '../node_modules/normalize.css/normalize.css';
import '../node_modules/@blueprintjs/core/dist/blueprint.css';
import { commandMachine } from './Editor/CommandMachine';
//禁止选中
document.onselectstart = () => false
//禁止右键
// document.oncontextmenu = () => false;
7 years ago
window.onload = function ()
{
new WebCAD("app");
};
async function loadFirst()
{
let cmd = (await import("./Add-on/test")).Test;
commandMachine.RegisterCommand("tt", new cmd());
}
loadFirst();//必须先加载一次,否则无法触发热模块替换
if (module.hot)
{
module.hot.accept('./Add-on/test', loadFirst)
}