123456789101112131415161718192021222324252627282930313233343536373839 |
- import { render } from "solid-js/web";
- import { Router } from "solid-app-router";
- import Routers from "./router/index";
- import utils from "./utils/index"
- import "./assets/style/layout.css"
- import "./assets/style/base.css"
- window.onresize = function () {
- utils.screenSize()
- }
- // 兼容requestAnimFrame
- window.requestAnimFrame = (function () {
- return window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- function (callback) {
- window.setTimeout(callback, 60000 / 60);
- };
- })();
- window.cancelrequestAnimFrame = (function () {
- return window.cancelAnimationFrame ||
- window.webkitCancelAnimationFrame ||
- window.mozCancelAnimationFrame ||
- function (ID) {
- window.clearTimeout(ID);
- };
- })();
- render(() => {
- // 初始化根字体
- utils.screenSize()
- return (
- <Router>
- <Routers />
- </Router>
- )
- }, document.getElementById("root"));
|