UNPKG

@uiw-admin/plugins

Version:
14 lines (13 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getInitIndexTemp = exports.getInitCssTemp = void 0; var getInitIndexTemp = function getInitIndexTemp(config) { return "\n// @ts-ignore\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport Control from '@uiw-admin/router-control'\nimport '@uiw/reset.css'\nimport './index.css'\n".concat(config.swr && "import { request } from '@uiw-admin/utils'" || '', "\n").concat(config.swr && "import { SWRConfig } from 'swr'" || '', "\n").concat(config.globalCss && "import '@/global.css'" || '', "\nReactDOM.render(\n ").concat(config.swr ? "<SWRConfig\n value={{\n ".concat(config.SWRConfig && "...".concat(JSON.stringify(config.SWRConfig), ",") || '', "\n fetcher: (resource, init) => {\n return request(resource, init)\n },\n provider: () => new Map()\n }}\n >\n <Control\n routeType=\"hash\"\n />\n </SWRConfig>") : "<Control\nrouteType = \"hash\"\n /> ", ",\n document.getElementById('root')\n)\n"); }; exports.getInitIndexTemp = getInitIndexTemp; var getInitCssTemp = function getInitCssTemp() { return "\n#root, body, html {\n height: 100%;\n} \n \n"; }; exports.getInitCssTemp = getInitCssTemp;