修复顽固问题
This commit is contained in:
parent
8f926b8126
commit
437f9ae806
@ -23,6 +23,7 @@
|
||||
"@codemirror/state": "^6.5.2",
|
||||
"@codemirror/view": "^6.37.2",
|
||||
"@nanostores/i18n": "^1.0.1",
|
||||
"@nanostores/persistent": "^1.0.0",
|
||||
"axios": "^1.10.0",
|
||||
"bulma": "^1.0.4",
|
||||
"nanostores": "^1.0.1",
|
||||
@ -30,7 +31,6 @@
|
||||
"url-parse": "^1.5.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nanostores/persistent": "^1.0.0",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^8.3.0",
|
||||
"postcss": "^8.5.6",
|
||||
|
||||
@ -1,10 +1,35 @@
|
||||
// 从核心库导入 deepMap 和它的可写类型
|
||||
import { deepMap, type DeepMapStore } from 'nanostores';
|
||||
|
||||
// 从持久化库导入持久化包装函数
|
||||
import { persistentMap } from '@nanostores/persistent';
|
||||
import 'bulma/bulma.sass';
|
||||
import './styles/mystyles.scss'
|
||||
|
||||
export type singleArg={
|
||||
arg: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export type exampleStatus={
|
||||
code: string;
|
||||
status: 'unsent' | 'success' | 'error';
|
||||
}
|
||||
|
||||
export type Example={
|
||||
basrUrl: string;
|
||||
args: singleArg[];
|
||||
status: exampleStatus;
|
||||
replyRaster: string;
|
||||
replyFormatted: string;
|
||||
}
|
||||
|
||||
export class PostSet {
|
||||
private divElement: HTMLDivElement | null;
|
||||
private options: any;
|
||||
private baseurl: string;
|
||||
private expamples: DeepMapStore <Example>[];
|
||||
private exampleCurrent: DeepMapStore <Example>;
|
||||
|
||||
constructor(divId: string, options: any) {
|
||||
// 尝试获取 DOM 元素并赋值给成员变量
|
||||
@ -40,18 +65,13 @@ export class PostSet {
|
||||
this.options.baseurl = baseurl;
|
||||
}
|
||||
|
||||
public generate_const_baseurl(): void{
|
||||
this.generate_const_baseurl(this.options.baseUrl);
|
||||
}
|
||||
public generate_const_baseurl(baseUrl:string): void{
|
||||
public generate_const_baseurl(baseUrl?: string): void {
|
||||
const finalBaseUrl = baseUrl ?? this.options.baseUrl;
|
||||
|
||||
}
|
||||
|
||||
public generate_dynamic_baseurl(): void{
|
||||
this.generate_dynamic_baseurl(this.options.baseUrl);
|
||||
}
|
||||
public generate_dynamic_baseurl(baseUrl:string): void{
|
||||
public generate_dynamic_baseurl(baseUrl?: string): void {
|
||||
const finalBaseUrl = baseUrl ?? this.options.baseUrl;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user