tauri-kargo-tools 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/vue-builder.ts
CHANGED
|
@@ -126,8 +126,21 @@ export class Builder {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/** Monte `ui` dans `selector`. */
|
|
129
|
-
boot<T extends object>(a: T, selector
|
|
130
|
-
|
|
129
|
+
boot<T extends object>(a: T, selector?: string): VueRuntime<T> {
|
|
130
|
+
if (!selector) {
|
|
131
|
+
document.body.className = "app"
|
|
132
|
+
this.container = document.createElement("div")
|
|
133
|
+
document.body.appendChild(this.container)
|
|
134
|
+
const link = document.createElement("link")
|
|
135
|
+
link.rel ="stylesheet"
|
|
136
|
+
const scriptUrl = import.meta.url;
|
|
137
|
+
const scriptDir = scriptUrl.substring(0, scriptUrl.lastIndexOf('/') + 1);
|
|
138
|
+
const cssLink= `${scriptDir}css/vue-darkmode.css`
|
|
139
|
+
link.href = cssLink
|
|
140
|
+
document.body.appendChild(link)
|
|
141
|
+
} else {
|
|
142
|
+
this.container = document.querySelector(selector) as HTMLElement | null;
|
|
143
|
+
}
|
|
131
144
|
if (!this.container) throw new Error('Conteneur introuvable : ' + selector);
|
|
132
145
|
this.container.replaceChildren()
|
|
133
146
|
return this.bootInto(this.findVueFor(a)!, a, this.container);
|
|
@@ -206,7 +219,7 @@ export class Builder {
|
|
|
206
219
|
case 'custom': buildCustom(this, node as CustomNode<T, any, any>, ctx); break;
|
|
207
220
|
case "bootVue": buildBootVue(this, node as BootVueNode<T, any>, ctx); break;
|
|
208
221
|
case 'staticBootVue': buildStaticBootVue(this, node as StaticBootVueNode<T>, ctx); break;
|
|
209
|
-
case "space":buildSpace(this,node as Space,ctx);
|
|
222
|
+
case "space": buildSpace(this, node as Space, ctx);
|
|
210
223
|
}
|
|
211
224
|
}
|
|
212
225
|
}
|