feat: add demo user and fix __dirname and fix cdn for panel upload
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
type HTMLOptions = {
|
||||
title?: string;
|
||||
rootId: string;
|
||||
dataKey?: string;
|
||||
};
|
||||
export const getHTML = (opts: HTMLOptions) => {
|
||||
return `<!DOCTYPE html>
|
||||
@@ -29,7 +30,7 @@ export const getHTML = (opts: HTMLOptions) => {
|
||||
<div id="root"></div>
|
||||
<script type="module">
|
||||
import { Container } from 'https://kevisual.xiongxiao.me/root/container/index.js'
|
||||
import { data } from './data.js'
|
||||
import { data } from './${opts.dataKey || 'data'}.js'
|
||||
const container = new Container({
|
||||
root: 'root',
|
||||
data: data
|
||||
|
||||
Reference in New Issue
Block a user